Skip to content

fee updates from subtensor v3.2.4 #58

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 19, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 33 additions & 2 deletions docs/fees.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ Many extrinsics in Bittensor are subject to a flat **weight-based fee**. In Polk

**Fee Details**:
- **Current rate**: $\approx0.0013 \tau$
- **Payment source**: Free balance of the transaction sender
- **Denomination**: TAO
- **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).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe you intended to link to the "Alpha fallback" subheading.

- **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](./glossary#recycling-and-burning)

Expand Down Expand Up @@ -47,6 +47,11 @@ It is currently planned that the fee coefficient will be reduced to $0.005%$ (10
- [`try_associate_hotkey`](https://github.com/opentensor/subtensor/blob/main/pallets/subtensor/src/macros/dispatches.rs#L1938)
- [`schedule_swap_coldkey`](https://github.com/opentensor/subtensor/blob/main/pallets/subtensor/src/macros/dispatches.rs#L1333)

### Registration

- [`register`](https://github.com/opentensor/subtensor/blob/main/pallets/subtensor/src/macros/dispatches.rs#L895)
- [`burned_register`](https://github.com/opentensor/subtensor/blob/main/pallets/subtensor/src/macros/dispatches.rs#L930)

### Subnet Management

- [`start_call`](https://github.com/opentensor/subtensor/blob/main/pallets/subtensor/src/macros/dispatches.rs#L1963)
Expand Down Expand Up @@ -88,6 +93,32 @@ It is currently planned that the fee coefficient will be reduced to $0.005%$ (10

</details>

## 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.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with the way i understand it, shouldn't this be

For extrinsics that charge fees by swapping TAO for Alpha, ...

I believe "swapping alpha for TAO" means that the alpha takes precedence and is converted to TAO.


### 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.
Expand Down