StakeMoved
Event v233 → v265, v273 → v277, v290 → v298, v301 → v385, v391 → v424, v432 → current #4Emitted when stake is moved between hotkeys or subnets without unstaking to TAO .
View events on chainThe Big Picture
Moving stake is a key portfolio management tool. Instead of unstaking (which converts your Alpha back to TAO at the current rate, potentially at a loss), you can move stake directly. This preserves your position size and avoids two conversion fees. It's like transferring between investment accounts instead of cashing out and re-investing.
Why This Matters
When you want to change where your stake is working, you have two choices: unstake (convert to TAO) then restake, or move directly. Moving avoids the price conversion both ways, saving you from slippage. This event confirms your stake successfully moved to its new home.
Example Scenario
You have 100 TAO staked on Validator A in subnet 1, but Validator B in subnet 3 has better emissions. Instead of unstaking (losing ~2% to slippage), you move the stake directly. StakeMoved fires showing: from Validator A/subnet 1, to Validator B/subnet 3, amount 100 TAO. Your stake is now earning on subnet 3.
Common Questions
- Is moving stake free?
- There's a small transaction fee, but no conversion slippage like unstaking would have.
- Can I move stake between any hotkeys?
- Yes, as long as both hotkeys are registered. You can even move to your own hotkey on a different subnet.
- How is this different from StakeSwapped?
- StakeMoved moves stake from one hotkey to another (possibly different hotkeys). StakeSwapped exchanges stake between two subnets for the same coldkey-hotkey pair.
Use Cases
- Rebalance stake across subnets without price slippage
- Move stake to a better-performing validator
- Track portfolio rebalancing activity
- Build stake flow analytics between subnets
How to Use This Event
- → Subscribe to track your own stake rebalancing
- → Monitor stake flows between competing validators
- → Index to analyze which subnets are gaining/losing stake
- → Alert when large stake moves happen (whale watching)
From Chain Metadata
stake has been moved from origin (hotkey, subnet ID) to destination (hotkey, subnet ID) of this amount (in TAO).
Migration Notes
arg2 changed from u16 to NetUid; arg4 changed from u16 to NetUid; arg5 changed from u64 to TaoBalance
Update decoders: SCALE encoding is positional, so any signature change (added, removed, or type-changed fields, or storage shape changes) shifts byte offsets and existing decoders will misparse this item. Re-derive types from the new metadata.
Triggers
Emitted by
Preconditions
- Coldkey has sufficient stake on origin hotkey/subnet
- Origin and destination hotkeys are registered
- Move operation is not rate limited
May fail with
Effects
Storage Modified
Postconditions
- Stake decreased on origin hotkey/subnet
- Stake increased on destination hotkey/subnet
- Total stake remains unchanged
Side Effects
- May affect validator rankings on both subnets
- Alpha stake redistributed between subnets
Event Data
| # | Name | Type | Description |
|---|---|---|---|
| 0 | arg0 → coldkey | AccountId | Coldkey owning both origin and destination stake (move keeps same coldkey) (hex -> SS58) |
| 1 | arg1 → origin_hotkey | AccountId | Hotkey the stake is moved FROM (hex -> SS58) |
| 2 | arg2 → origin_netuid | NetUid | Subnet the stake is moved FROM |
| 3 | arg3 → destination_hotkey | AccountId | Hotkey the stake is moved TO (hex -> SS58) |
| 4 | arg4 → destination_netuid | NetUid | Subnet the stake is moved TO |
| 5 | arg5 → amount | TaoBalance | Amount moved in TAO (RAO), matching the TaoBalance typeName, and NOT an alpha amount in either branch. Cross-subnet: net TAO realised from the unstake leg, post-fee. Same-subnet: transfer_stake_within_subnet multiplies the moved stake by current_alpha_price and returns that TAO equivalent (path exists from v290; v233 through v277 every move, same-subnet included, unstaked to TAO and restaked, and the value is tao_unstaked minus the flat TAO staking fee). Note the call argument is an alpha amount, so the input and the emitted value use different units. |
Code Examples
import { createClient, Binary } from "polkadot-api";
import { getWsProvider } from "polkadot-api/ws";
import { sub } from "@polkadot-api/descriptors"; // generated by: npx papi add sub -w wss://entrypoint-finney.opentensor.ai:443
const client = createClient(getWsProvider("wss://entrypoint-finney.opentensor.ai:443"));
const api = client.getTypedApi(sub);
// Subscribe to StakeMoved events
client.finalizedBlock$.subscribe(async (block) => {
const events = await api.event.SubtensorModule.StakeMoved.get(block.hash);
for (const evt of events) {
console.log("StakeMoved:", evt.payload);
}
});On-Chain Activity
Major features with millions of emissions
#25 most emitted event
As of block 9,385,000
Version History
Runtime Info
View Source- Pallet Index
- 7
- Event Index
- 4
- First Version
- v233
- Current Version
- v490