Transaction Fees in Bittensor
This page describes the blockchain transaction fees charged by Bittensor.
Many extrinsic transactions that change the state of the blockchain are subject to a flat fee of approximately 0.0013 .
Staking and unstaking operations incur weight-based fees as well as amount-based fees of 0.05% of the transacted liquidity.
Reading the state of the chain is always free.
Weight-Based Transaction Fees
Many extrinsics in Bittensor are subject to a flat weight-based fee. In Polkadot-based chains like Subtensor (Bittensor's layer 1 blockchain), weight is a measure of compute time.
Fee Details:
- Current rate:
- Payment source: Sender's TAO free balance by default. For specific extrinsics, if TAO is insufficient to cover fees, the chain will charge fees in Alpha instead (see "Smart Fee Payments (Alpha Fallback)" below).
- Denomination: TAO by default. When fees are paid in Alpha, the TAO fee amount is converted to Alpha using the current Alpha price (no slippage).
- Impact on liquidity: Fees are recycled (deducted from
TotalIssuance
) See: Recycling and Burning
It is currently planned that the fee coefficient will be reduced to (10x reduction).
Staking Operations
add_stake
remove_stake
add_stake_limit
remove_stake_limit
remove_stake_full_limit
move_stake
transfer_stake
swap_stake
swap_stake_limit
unstake_all
unstake_all_alpha
Wallet and Identity Management
Registration
Subnet Management
Burn/recycle alpha
Child Hotkey Management
Governance
See how it's calculated!
pub struct LinearWeightToFee;
impl WeightToFeePolynomial for LinearWeightToFee {
type Balance = Balance;
fn polynomial() -> WeightToFeeCoefficients<Self::Balance> {
let coefficient = WeightToFeeCoefficient {
coeff_integer: 0,
coeff_frac: Perbill::from_parts(500_000), // 0.05%
negative: false,
degree: 1,
};
smallvec!(coefficient)
}
}
Source code reference: runtime/src/lib.rs:448-463
Alpha Fallback
For extrinsics that charge fees by swapping Alpha for TAO, if the sender's TAO balance cannot cover the weight-based transaction fee, the chain will fall back to charging the fee in Alpha. If both TAO and Alpha balances are insufficient to cover the anticipated fee, the transaction fails validation and will not be included in the mempool. When fees are paid in Alpha, the TAO fee is converted to Alpha using the current Alpha price with no slippage.
Affected extrinsics
remove_stake
remove_stake_limit
remove_stake_full_limit
unstake_all
unstake_all_alpha
move_stake
transfer_stake
swap_stake
swap_stake_limit
recycle_alpha
burn_alpha
Complete unstaking handling
For remove_stake
, remove_stake_limit
, recycle_alpha
, and burn_alpha
: after withdrawing Alpha fees, if the remaining Alpha balance is too small to keep as a dust balance, the transaction will consume and process the entire remaining Alpha balance in the same call.
Updated handling of NotEnoughStakeToWithdraw
For remove_stake
, remove_stake_limit
, recycle_alpha
, and burn_alpha
: if the requested amount exceeds the available Alpha, the amount is capped at the available Alpha and the extrinsic succeeds (assuming no other errors).
Swap Fees for Stake and Unstake Operations
In addition to the weight-based fee above, staking and unstaking operations are subject to fees based on a percentage of the quantity of transacted liquidity.
Fee Details:
- Rate: 0.05%
- For staking: Fee paid in TAO from the staking amount
- For unstaking: Fee paid in Alpha from the unstaking amount
Example
btcli stake add
...
Amount to stake (TAO τ): 100
Staking to:
Wallet: 2MuchTau!, Coldkey ss58: 5Xj...
Network: test
┃ ┃ ┃ ┃ ┃ ┃ ┃ Rate with ┃ Partial
┃ ┃ ┃ ┃ Est. ┃ ┃ Extrinsic ┃ tolerance: ┃ stake
Netuid ┃ Hotkey ┃ Amount (τ) ┃ Rate (per τ) ┃ Received ┃ Fee (τ) ┃ Fee (τ) ┃ (0.5%) ┃ enabled
━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━
2 │ 5GrwvaEF5zX… │ 100.0000 τ │ 2416.813286… │ 241,556.4147 │ Τ 0.0504 │ 0.0013 τ │ 2404.7893 │ False
│ │ │ β/Τ │ β │ │ │ β/Τ │
────────┼───── ─────────┼────────────┼──────────────┼──────────────┼──────────┼──────────────┼──────────────┼──────────────
│ │ │ │ │ │ │ │
Source code references:
Fee-Free Extrinsics
The following extrinsics are free.
Weight Setting & Commit-Reveal
set_weights
- Setting validator weightscommit_weights
- Commit weight hashbatch_commit_weights
- Batch commit weight hashesreveal_weights
- Reveal committed weightscommit_crv3_weights
- Commit CRv3 encrypted weightsbatch_reveal_weights
- Batch reveal committed weights
Administrative & Operational
- Sudo and admin extrinsics
- Governance-related functions