Current Value
0.001 TAO (1000000 raw)
Conversion: ÷ 10^9 (RAO → TAO)
Relevant for: validatorsminersdevelopers
The Big Picture
Unlike KeySwapCost (global swap), this is the per-subnet cost for swapping a hotkey on a specific subnet. If you're registered on 5 subnets and want to swap your hotkey on just one, you pay this cost instead of the global swap cost. It's more granular key management.
Why This Matters
Per-subnet swaps let you rotate keys on specific subnets without affecting others. Useful for operational isolation - compromise on one subnet doesn't require global key rotation.
Example
Registered on subnets 1, 3, 5. If subnet 3 key might be compromised, pay KeySwapOnSubnetCost to rotate just that key. Your keys on subnets 1 and 5 remain unchanged.
Common Questions
- Is per-subnet swap cheaper than global?
- Typically yes. You pay for one subnet, not all. If you're only on one subnet, global and per-subnet costs may be similar.
- Can I use different hotkeys per subnet?
- After swapping, yes. Start with one hotkey, swap on specific subnets to isolate operations. Advanced key management strategy.
From Chain Metadata
Cost of swapping a hotkey in a subnet.
Use Cases
- Hotkey swap
- Fee calculations
Code Examples
import { ApiPromise, WsProvider } from "@polkadot/api";
import { stringCamelCase } from "@polkadot/util";
const provider = new WsProvider("wss://entrypoint-finney.opentensor.ai:443");
const api = await ApiPromise.create({ provider });
// Query KeySwapOnSubnetCost constant
const value = api.consts[stringCamelCase("SubtensorModule")][stringCamelCase("KeySwapOnSubnetCost")];
console.log("KeySwapOnSubnetCost:", value.toHuman());
// Convert RAO to TAO if this is a balance value
const taoValue = value.toBigInt() / BigInt(1e9);
console.log("TAO:", taoValue.toString());Type Information
- Type
- u64
- Byte Size
- 8 bytes
- Encoding
- fixed
- Raw Hex
- 0x40420f0000000000
Runtime Info
- Pallet
- SubtensorModule
- First Version
- v276
- Latest Version
- v276
- Current Runtime
- v393