remove_stake

Call Re-added v101 → v219, v233 → current #3

Withdraws staked TAO from a hotkey back to the coldkey .

View calls on chain

Click items to navigate. Pan and zoom to explore.

Used by: stakersdelegatorswalletsexchanges

The Big Picture

Unstaking converts your Alpha back to TAO at the current exchange rate. Unlike move_stake, this involves an actual price conversion - you may get more or less TAO than you originally staked depending on how the subnet's Alpha has performed.

Why This Matters

When you need liquid TAO or want to exit a position, unstaking is how you do it. Be aware that the TAO amount depends on the current Alpha price - it's not 1:1.

Example Scenario

You staked 100 TAO when Alpha was 1:1. Now Alpha is 0.9:1 (subnet performed poorly). You call remove_stake for your full position. You receive 90 TAO back. The 10 TAO difference reflects Alpha depreciation.

Common Questions

Why did I get less/more than I staked?
Alpha price fluctuates based on subnet performance and market dynamics. You receive the current value of your Alpha, not the original TAO amount.
Can I avoid the conversion rate?
Use move_stake instead - it moves stake directly without converting to TAO, preserving your position size.

Use Cases

  • Convert stake back to liquid TAO
  • Exit a position in a validator or subnet
  • Rebalance your portfolio

From Chain Metadata

Remove stake from the staking account. The call must be made from the coldkey account attached to the neuron metadata. Only this key has permission to make staking and unstaking requests.

Part of: Stake Operations

Input Parameters

#NameTypeDescription
0
hotkey
AccountId Validator's hot wallet to unstake from (hex -> SS58)
1
netuid
u16 Subnet/network identifier (0-65535)
2
amount_unstaked
u64 amount_unstaked (u64) (RAO -> TAO (/ 10^9))

Permissions

Origin
Signed
Required Role
Authorization Checks
  • Coldkey must be associated with the target hotkey

Requirements

  • Hotkey has sufficient staked amount
  • Coldkey is associated with the hotkey
  • Remaining stake meets minimum requirements (if any)

Effects

Postconditions

  • Coldkey balance increased by unstaked amount
  • Hotkey's total stake decreased
  • Network's TotalStake decreased

Side Effects

  • May remove hotkey from validator set if stake too low
  • May update alpha stake on subnet

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 remove_stake call
const hotkey = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";
const netuid = 1;
const amount_unstaked = 1_000_000_000n;

const call = api.tx[stringCamelCase("SubtensorModule")][stringCamelCase("remove_stake")](
  hotkey,
  netuid,
  amount_unstaked
);

On-Chain Activity

Usage Frequency
●●●●●○ Core 1M–10M extrinsics

Primary protocol calls

#5 most used call

Success Rate Moderate

50–80% of submissions succeed

As of block 7,429,232

Version History

v101 block 1 2 args
v233 block 4,920,350 3 args Current

Runtime Info

View Source
Pallet Index
7
Call Index
3
First Version
v101
Current Version
v393