unstake_all_alpha
Call v233 â current #84Removes all alpha stake from a hotkey back to the coldkey .
View calls on chainCall Workflow
Click items to navigate. Pan and zoom to explore.
The Big Picture
Alpha is subnet-specific stake. Unlike TAO, Alpha only has value within its subnet. unstake_all_alpha exits your Alpha position entirely, converting it to TAO at the current exchange rate. This is a clean exit - no dust, no partial positions, all Alpha becomes liquid TAO.
Why This Matters
When a subnet underperforms or you want to consolidate, Alpha positions become liabilities. This call lets you exit completely without calculating exact amounts. The TAO you receive depends on current Alpha price - you may get more or less than originally staked.
Example Scenario
You have Alpha staked to a validator on subnet 18, but the subnet is declining. Call unstake_all_alpha(hotkey=validator, netuid=18). All your Alpha converts to TAO at the current rate (say 0.85:1). Your Alpha position closes, TAO appears in your free balance.
Common Questions
- How is this different from unstake_all?
- unstake_all removes all stake across all subnets. unstake_all_alpha removes only Alpha on a specific subnet. Use this for targeted exits.
- What if Alpha price has dropped significantly?
- You'll receive less TAO than you originally staked. This is the cost of exiting a declining subnet. Alternatively, hold and hope the subnet recovers.
Use Cases
- Exit all subnet-specific positions in one call
- Convert all Alpha holdings to liquid TAO
- Clean exit from a subnet before it's dissolved
- Simplify portfolio by exiting Alpha positions entirely
From Chain Metadata
- The implementation for the extrinsic unstake_all: Removes all stake from a hotkey account across all subnets and adds it onto a coldkey.
Input Parameters
| # | Name | Type | Description |
|---|---|---|---|
| 0 | hotkey | AccountId | Hot wallet address (active operations) (hex -> SS58) |
Permissions
Permission data inferred from metadata. May be incomplete.
Requirements
- Hotkey has alpha stake from this coldkey
- Coldkey is associated with the hotkey
Effects
Storage Modified
Postconditions
- Coldkey receives alpha converted to TAO
- Hotkey's alpha stake from this coldkey is zero
Side Effects
- May affect subnet alpha pools
Possible Errors
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 });
// Build unstake_all_alpha call
const hotkey = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";
const call = api.tx[stringCamelCase("SubtensorModule")][stringCamelCase("unstake_all_alpha")](
hotkey
);On-Chain Activity
Significant regular use
#35 most used call
50â80% of submissions succeed
As of block 7,429,232
Runtime Info
View Source- Pallet Index
- 7
- Call Index
- 84
- First Version
- v233
- Current Version
- v393