StakeRemoved
Event Re-added v101 → v219, v233 → v252, v257 → current #3Emitted after stake is successfully withdrawn from hotkey to coldkey .
View events on chainThe Big Picture
Unstaking converts your subnet-specific Alpha tokens back to liquid TAO. The amount you receive depends on the current Alpha/TAO exchange rate, which can be higher or lower than when you staked. This is why many prefer move_stake when rebalancing - it avoids this conversion.
Why This Matters
When you unstake, your Alpha tokens are converted back to TAO at the current rate. This event confirms the conversion completed and shows exactly how much TAO you received. Important: the TAO amount may differ from what you originally staked due to price changes.
Example Scenario
You staked 100 TAO six months ago when Alpha was 1:1. Now Alpha is worth 1.2 TAO. You unstake and StakeRemoved fires showing you received 120 TAO - a 20% gain from Alpha appreciation plus any emissions you earned.
Common Questions
- Why did I get less TAO than I staked?
- Alpha price fluctuates. If the subnet's Alpha dropped in value, you'll receive less TAO. Consider using move_stake instead to avoid conversion if you're rebalancing.
- Is there a delay before I can use my unstaked TAO?
- No, the TAO is immediately available in your coldkey balance.
Use Cases
- Confirm your unstake transaction completed
- Track when delegators leave your validator
- Monitor unstaking trends across the network
- Build withdrawal notification systems
How to Use This Event
- → Subscribe to your coldkey for withdrawal confirmations
- → Monitor validator hotkeys to track delegator churn
- → Index network-wide to analyze unstaking patterns
From Chain Metadata
stake has been removed from the hotkey staking account onto the coldkey account.
Triggers
Preconditions
- Hotkey has sufficient staked amount
- Coldkey is associated with the hotkey
- Remaining stake meets minimum requirements (if any)
Effects
Storage Modified
Postconditions
- Coldkey balance increased by unstaked amount
- Hotkey's total stake decreased
- Network's TotalStake decreased
Side Effects
- Alpha converted back to TAO at current rate
- May affect validator ranking
Event Data
| # | Name | Type | Description |
|---|---|---|---|
| 0 | arg0 → coldkey | AccountId | Staker's cold wallet address (hex -> SS58) |
| 1 | arg1 → hotkey | AccountId | Validator's hot wallet address (hex -> SS58) |
| 2 | arg2 → amount_unstaked | u64 | Amount of stake removed (RAO) |
| 3 | arg3 → remaining_stake | u64 | Remaining stake on hotkey (RAO) |
| 4 | arg4 → netuid | u16 | Subnet ID |
| 5 | arg5 | u64 | Event field #5 (u64) |
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 StakeRemoved events
api.query.system.events((events) => {
events
.filter(({ event }) =>
event.section === stringCamelCase("SubtensorModule") &&
event.method === "StakeRemoved"
)
.forEach(({ event }) => {
console.log("StakeRemoved:", event.data.toHuman());
});
});On-Chain Activity
Core protocol operations, high volume
#7 most emitted event
As of block 7,429,232
Version History
Runtime Info
View Source- Pallet Index
- 7
- Event Index
- 3
- First Version
- v101
- Current Version
- v393