Current Value
0.10 TAO (100000000 raw)
Conversion: ÷ 10^9 (RAO → TAO)
Relevant for: validatorsminersdevelopers
The Big Picture
Hotkey swapping lets you change your operational key without losing your neuron registration or stake. This is crucial for stakers - if a hotkey is compromised, swap it rather than re-registering. The cost prevents frivolous swaps while making legitimate key rotation affordable.
Why This Matters
Key rotation is a stakers best practice. Know this cost so you can budget for periodic hotkey changes without losing your position in the network.
Example
If KeySwapCost is 1 TAO and you suspect your hotkey was exposed, you pay 1 TAO to swap to a new hotkey. Your UID, stake, and registration remain intact. Without this feature, you'd have to deregister and re-register, potentially losing your slot.
Common Questions
- How often should I rotate hotkeys?
- Depends on your stakers posture. Enterprise operators might rotate quarterly; hobbyists might never rotate unless compromised. The cost makes frequent rotation expensive.
- Can I swap to any hotkey?
- The new hotkey must not already be registered. You can't swap to a hotkey that's already in use on the subnet.
From Chain Metadata
Cost of swapping a hotkey.
Use Cases
- Hotkey swap
- Fee calculations
Value History
| Version | Block | Change | Value |
|---|---|---|---|
| v162 | #3,372,565 | Added | 1.00 TAO |
| v205 | #4,209,446 | Changed | 1.00 TAO → 0.10 TAO |
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 KeySwapCost constant
const value = api.consts[stringCamelCase("SubtensorModule")][stringCamelCase("KeySwapCost")];
console.log("KeySwapCost:", 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
- 0x00e1f50500000000
Version History
v162 block 3,372,565 Added
v205 block 4,209,446 Re-added Current
Runtime Info
- Pallet
- SubtensorModule
- First Version
- v162
- Latest Version
- v162
- Current Runtime
- v393