TotalStake

Storage Plain v101 → v490 · 1 shape change

Total TAO staked across all hotkeys.

Explore chain
Queried by: analyticsvalidatorswallets

The Big Picture

Total stake represents the aggregate economic commitment to Bittensor's security. Higher total stake means more TAO is actively participating in consensus rather than sitting idle. This single number reflects network-wide confidence in validation.

Why This Matters

Want to know how much TAO is actively working in the network? This is the headline number for staking participation - the total value backing all validators combined.

Example Scenario

Query TotalStake() returns 150000000000000000000 (150M TAO in RAO). Divide by 10^9 to get 150 million TAO staked network-wide. Compare to TotalIssuance to get staking ratio.

Common Questions

Does this include all subnets?
Yes, this is the aggregate across all subnets and all hotkeys on the entire network.
How often does this update?
Updates with every stake/unstake operation, so it reflects real-time network state.

Use Cases

  • Calculate staking ratio (total staked vs total supply)
  • Track network-wide staking trends over time
  • Monitor economic health of the network
  • Build dashboard metrics for ecosystem health

From Chain Metadata

ITEM ( total_stake )

Purpose & Usage

Purpose

Global network stake tracking for consensus and economics.

Common Query Patterns

  • Single value query for network-wide stake
Part of: Stake Operations

Migration Notes

v424 v432 Breaking

value type 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.

Stored Value

Total TAO staked network-wide in RAO (÷10⁹ for TAO). Source-level type is `TaoCurrency` newtype, surfaced as `u64` in chain metadata.

Default Value

0 0x0000000000000000

Absent keys read as this value — querying a key that has never been written returns this default, not an error or empty result.

Relationships

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 TotalStake storage (no keys - plain value)
const result = await api.query.SubtensorModule.TotalStake.getValue();
console.log("TotalStake:", result);

On-Chain Activity

Write Frequency
●●●●●● Ultra-High >10M est. writes

More than 10M writes

#2 most written storage item

Write Source Calls + Hooks

Modified by both user extrinsics and runtime hooks

As of block 9,385,000

Version History

v101 block 1 Added
v425–v431 · runtime versions skipped on chain (never deployed)
v432 block 8,636,190 Shape changed Current
  • value : u64 → TaoBalance

Runtime Info

View Source
Pallet
SubtensorModule
Storage Kind
Plain
First Version
v101
Current Version
v490