AllBalanceUnstakedAndTransferredToNewColdkey
Event Re-added v156 → v157, v158 → v161, v162 → v165, v195 → v219, v233 → v247, v252 → v265, v273 → v277, v290 → v315, v320 → v326, v334 → v367, v372 → v377, v385 → current #71Emitted when all stake is unstaked and transferred during coldkey swap .
View events on chainThe Big Picture
During a coldkey swap, you might want everything moved - not just stake ownership, but complete liquidation to the new coldkey. This event fires when all staked positions are unstaked (converted to TAO) and transferred to the new coldkey. It's a complete migration: no assets left with the old coldkey, everything liquid and available at the new address.
Why This Matters
This is the nuclear option for coldkey migration - everything unstaked and moved. Unlike normal ColdkeySwapped which transfers stake ownership, this liquidates all positions. You receive TAO at your new coldkey, but you've exited all your staking positions (with any Alpha→TAO conversion implications).
Example Scenario
You want to completely migrate to a new wallet with no ties to the old one. During coldkey swap, AllBalanceUnstakedAndTransferredToNewColdkey fires showing 500 TAO total. All your stake positions were converted to TAO and sent to your new coldkey. You'll need to restake from scratch if you want to continue earning.
Common Questions
- Does this lose my Alpha positions?
- Yes - Alpha is converted to TAO during unstaking. You receive TAO at current exchange rates, which may be better or worse than when you originally staked.
- Do my hotkeys lose their registrations?
- This event is about stake/balance transfer. Hotkey registrations may be handled separately in the swap process. Check HotkeySwapped events for hotkey migration details.
- Why would I choose this over normal swap?
- If you want completely clean migration with liquid TAO, no legacy positions. Normal swap keeps your positions intact with new ownership. This liquidates everything.
Use Cases
- Track complete asset migration during coldkey swap
- Monitor when stake positions are liquidated for migration
- Verify all assets transferred to new coldkey
- Build migration audit tools
How to Use This Event
- → Monitor for complete migration events
- → Track when large stakers liquidate positions
- → Build migration verification dashboards
From Chain Metadata
All balance of a hotkey has been unstaked and transferred to a new coldkey
Triggers
Emitted by
Preconditions
- Coldkey swap is being executed
- Balance unstaking is part of the swap
May fail with
Effects
Storage Modified
Postconditions
- All stake converted to free balance
- Free balance transferred to new coldkey
Side Effects
- Hotkeys may lose validator status if stake removed
Event Data
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 });
// Subscribe to AllBalanceUnstakedAndTransferredToNewColdkey events
api.query.system.events((events) => {
events
.filter(({ event }) =>
event.section === stringCamelCase("SubtensorModule") &&
event.method === "AllBalanceUnstakedAndTransferredToNewColdkey"
)
.forEach(({ event }) => {
console.log("AllBalanceUnstakedAndTransferredToNewColdkey:", event.data.toHuman());
});
});Version History
Runtime Info
View Source- Pallet Index
- 7
- Event Index
- 71
- First Version
- v156
- Current Version
- v393