forked from opentensor/developer-docs
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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). | ||
- **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) | ||
|
||
|
@@ -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) | ||
|
@@ -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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. with the way i understand it, shouldn't this be
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. | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.