Skip to content

PalletId-based subnet account Ids maintain subnet TAO reserves#2524

Draft
gztensor wants to merge 2 commits intodevnet-readyfrom
chore/imbalances
Draft

PalletId-based subnet account Ids maintain subnet TAO reserves#2524
gztensor wants to merge 2 commits intodevnet-readyfrom
chore/imbalances

Conversation

@gztensor
Copy link
Contributor

@gztensor gztensor commented Mar 19, 2026

Description

  • Every subnet will have an account ID and the subnet swap pool reserves will be stored in subnet account balance.
  • The subnet account ID is derived from SubtensorModule account ID and does not have a private key, so no transactions may be initiated by this account.
  • Use of subnet account IDs as hotkeys for staking, registration of neurons, or as a subnet owner hotkey will be forbidden.

Checklist:

  • Derive subnet account IDs
  • Create runtime API subnetInfoRuntimeApi::getSubnetAccountId for clients to read the subnet account IDs
  • Deprecate SubnetTAO map, migrate TAO stored in SubnetTAO into subnet accounts. This will make balances pallet TotalIssuance match the subtensor pallet TotalIssuance.
  • Use subnet accounts as subnet reserves for Alpha <> TAO swaps.
  • Use subnet accounts for injecting of newly minted TAO in run_coinbase.

Related Issue(s)

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Other (please describe):

Breaking Change

The SubnetTAO map will be removed. Instead, clients should use subnetInfoRuntimeApi::getSubnetAccountId to get the account ID of the netuid reserve and then pallet_system::account to get the account balance.

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have run ./scripts/fix_rust.sh to ensure my code is formatted and linted correctly
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Screenshots (if applicable)

Please include any relevant screenshots or GIFs that demonstrate the changes made.

Additional Notes

Please provide any additional information or context that may be helpful for reviewers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant