This storage item was removed in v240

This storage item is no longer available in the current runtime. Existed from v101 to v240. Shown here for historical reference.

Stake

Storage Removed Map v101 → v411

REMOVED. Amount of TAO staked from a coldkey to a hotkey on a subnet .

Queried by: stakersvalidatorsdelegatorsanalyticswallets

The Big Picture

Stake is the core data structure for Bittensor economics. Every staking relationship - who staked how much to whom on which subnet - is recorded here. This drives validator power, emission distribution, and the entire incentive mechanism.

Why This Matters

Want to know how much you've staked somewhere? How much stake your validator has? Who's staking to whom? This is the source of truth for all staking data.

Example Scenario

You staked 100 TAO to Validator X on subnet 1. Query Stake(netuid=1, hotkey=X, coldkey=you) returns 100000000000 (in RAO). This is your current stake position.

Common Questions

Why is the value so large?
Stake is stored in RAO (1 TAO = 10^9 RAO). Divide by 1,000,000,000 to get TAO.
Can I iterate all my stakes?
Yes, iterate Stake with your coldkey as prefix to find all hotkeys you're staking to.

Use Cases

  • Check how much you have staked to a validator
  • Build staking leaderboards and analytics
  • Calculate portfolio value across validators
  • Monitor delegation changes over time

From Chain Metadata

(DEPRECATED) DMAP ( hot, cold ) --> stake | Returns the stake under a coldkey prefixed by hotkey.

Purpose & Usage

Purpose

Tracks delegation relationships and stake amounts for validation.

Common Query Patterns

  • Query stake for a specific coldkey-hotkey-netuid combination
  • Iterate all stakes for a coldkey
  • Check if a hotkey has stake from a coldkey

Query Keys

#NameTypeDescription
1
key1
AccountId key1 (AccountId) (hex -> SS58)
2
key2
AccountId key2 (AccountId) (hex -> SS58)

Stored Value

Value in RAO (÷10⁹ for TAO)

RAO -> TAO (/ 10^9)

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);

// Query Stake storage
const key1 = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";
const key2 = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";

const result = await api.query.SubtensorModule.Stake.getValue(key1, key2);
console.log("Stake:", result);

Version History

v101 block 1 Added
v120 block 315,568 Internal re-bind
v123 block 720,235 Internal re-bind
v128–v132 · runtime versions skipped on chain (never deployed)
v133 block 1,404,224 Internal re-bind
v136 block 1,756,781 Internal re-bind
v138 block 1,907,363 Internal re-bind
v140 block 1,929,216 Internal re-bind
v149 block 3,014,339 Internal re-bind
v154 block 3,308,611 Internal re-bind
v166–v194 · runtime versions skipped on chain (never deployed)
v195 block 3,791,350 Internal re-bind
v207–v209 · runtime versions skipped on chain (never deployed)
v210 block 4,345,556 Internal re-bind
v213–v215 · runtime versions skipped on chain (never deployed)
v216 block 4,510,996 Internal re-bind
v220–v232 · runtime versions skipped on chain (never deployed)
v233 block 4,920,350 Internal re-bind
v235–v237 · runtime versions skipped on chain (never deployed)
v238 block 4,936,550 Internal re-bind
v240 Removed

Runtime Info

View Source
Pallet
SubtensorModule
Storage Kind
Map
First Version
v101
Removed In
v240