SubnetAlphaOut

Storage Map v233 → v490 · 1 shape change

Alpha tokens distributed to stakers.

Explore chain
Queried by: stakersvalidatorsanalyticsdevelopers

The Big Picture

Alpha issued outside the pool reserve. Two things raise it: the per-block alpha emission minted for participants (resolve_to_alpha_out in coinbase/alpha.rs, fed by emit_to_subnets every block) and alpha leaving the pool through TAO→alpha swaps (staking/stake_utils.rs). Alpha→TAO swaps and recycling lower it. At v486 and later a burn leaves it unchanged: burn_subnet_alpha only raises AlphaAssets.AlphaBurned (coinbase/alpha.rs L51-L58 at d967d1358, runtime v490). From v488 mint_gamma therefore raises it with no stake position behind the increase: the call swaps TAO for alpha and burns the alpha (subnets/gamma.rs L163-L179). From v488 the recycle slot of SubnetEmissionWeights lowers it every block, and the burn slot does not (coinbase/run_coinbase.rs L311-L318). Together with SubnetAlphaIn and the protocol reservoir it is the alpha issuance that drives the alpha halving schedule and root_proportion.

Why This Matters

How much alpha has left the pool? SubnetAlphaOut tells you the total alpha now in stakers' hands. This helps you understand the subnet's staking activity level.

Example Scenario

Query SubnetAlphaOut(netuid=1) returns 8000000000000 (8T alpha). This much alpha has been distributed to stakers on subnet 1. Compare to SubnetAlphaIn to see how much remains in the pool.

Common Questions

How does this relate to TotalAlpha?
get_alpha_issuance (stake_utils.rs L20-L24 at da06f033, v452) = SubnetAlphaIn + SubnetAlphaOut + the swap pallet protocol alpha reservoir. SubnetAlphaIn is pool reserve, SubnetAlphaOut is everything issued outside it, whether held as stake, emitted this block, or bought by the protocol.
Does this decrease when people unstake?
Yes, when stakers unstake and convert alpha back to TAO, SubnetAlphaOut decreases as alpha returns to the pool.

Use Cases

  • Understand how much alpha has been claimed by stakers
  • Calculate the ratio of pooled vs distributed alpha
  • Build alpha distribution analytics
  • Track subnet economic activity
  • Monitor staking adoption on a subnet

From Chain Metadata

MAP ( netuid ) --> alpha_supply_in_subnet | Returns the amount of alpha in the subnet.

Purpose & Usage

Purpose

Track alpha that has left the pool and is now held by stakers.

Common Query Patterns

  • Query by netuid for total distributed alpha
  • Calculate pool vs staked alpha ratio
  • Monitor stake distribution over time
Part of: Alpha Conversion

Migration Notes

v424 v432 Breaking

key type changed from u16 to NetUid; value type changed from u64 to AlphaBalance

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.

Query Keys

#NameTypeDescription
1
netuid
NetUid u16netuid (NetUid, hashed key component)

Stored Value

alpha_supply_in_subnet (AlphaBalance)

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 SubnetAlphaOut storage
const netuid = 1;

const result = await api.query.SubtensorModule.SubnetAlphaOut.getValue(netuid);
console.log("SubnetAlphaOut:", result);

On-Chain Activity

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

More than 10M writes

#9 most written storage item

Write Source Calls + Hooks

Modified by both user extrinsics and runtime hooks

As of block 9,385,000

Version History

v233 block 4,920,350 Added
v425–v431 · runtime versions skipped on chain (never deployed)
v432 block 8,636,190 Shape changed Current
  • key : u16 → NetUid
  • value : u64 → AlphaBalance

Runtime Info

View Source
Pallet
SubtensorModule
Storage Kind
Map
First Version
v233
Current Version
v490