Alpha
Storage Map Poll per tempo v233 → v472 · 1 shape changeLegacy alpha stake per (hotkey , coldkey , netuid ), stored as FixedU128 { bits }. Superseded by AlphaV2 at v401.
Explore chainThe Big Picture
Each subnet has its own 'alpha' token representing stake on that specific subnet. When you stake TAO to a subnet, you receive alpha proportional to the current exchange rate. Alpha stake determines your share of that subnet's emissions. It's like having a stake position denominated in subnet-specific units.
Why This Matters
Your stake on subnet X isn't just TAO - it's converted to alpha at the current rate. Alpha tracks your proportional ownership of stake on that subnet. Check Alpha to see your actual position.
Example Scenario
Query Alpha(hotkey=validator_X, coldkey=you, netuid=1) returns 1500000000000. You hold 1.5T alpha (1.5 trillion units) on subnet 1. Your share of emissions depends on this vs TotalAlpha(netuid=1).
Note: source-verified key order is (hotkey, coldkey, netuid), NOT (coldkey, hotkey, netuid).
Common Questions
- How does alpha relate to TAO?
- When you stake TAO, it's converted to alpha at the current pool rate (SubnetTAO/SubnetAlphaIn). When you unstake, alpha converts back to TAO at the current rate - which may differ.
- Why alpha instead of just tracking TAO?
- Alpha enables dynamic pricing. As more TAO enters a subnet, alpha becomes relatively more valuable. This creates economic incentives around subnet performance and demand.
- Can I lose alpha?
- Alpha is your stake. It doesn't decrease unless you unstake. But its TAO value fluctuates based on the subnet's liquidity pool dynamics.
- Is alpha transferable?
- Alpha is stake, not a transferable token. You can unstake (converting to TAO) and restake elsewhere, but can't directly send alpha to another account.
Use Cases
- Check your alpha stake on a specific subnet
- Calculate portfolio value in subnet-specific terms
- Track alpha accumulation from staking
- Build subnet-specific staking dashboards
- Analyze alpha distribution across coldkeys
From Chain Metadata
NMAP ( hot, cold, netuid ) --> alpha | Returns the alpha shares for a hotkey, coldkey, netuid triplet.
Purpose & Usage
Purpose
Track subnet-specific stake in alpha tokens - the subnet's native staking currency. Both this storage and AlphaV2 are populated with disjoint key sets at v411; consumers must check both.
Common Query Patterns
- Query alpha by (hotkey, coldkey, netuid)
- Calculate subnet-specific stake position
- Compare alpha holdings across validators
- Read AlphaV2 as well: the key sets are disjoint, so a live position is in exactly one of them or in neither
Notes
- The legacy map is remove-only in the current runtime: no code path inserts into it, so its population can only shrink and a row here is always an untouched pre-v401 position, never a tombstone. There was no one-shot migration; the move to V2 happens lazily on the next write.
- A zero value is REMOVED, not stored. set_share writes AlphaV2 only when the share is nonzero and set_denominator writes TotalHotkeySharesV2 only when the denominator is nonzero, each removing the legacy row first, so a drained position or a closed pool is absent from BOTH generations. Absent from both is a normal state, not a gap (staking/stake_utils.rs set_share and set_denominator at v468).
- All four share maps are ValueQuery, so a point read of a key that does not exist returns the zero fallback rather than an absence. Absence and a stored zero are indistinguishable to a point read; use an existence check or key enumeration to tell them apart.
Migration Notes
key type changed from (AccountId, AccountId, u16) to (AccountId, AccountId, NetUid)
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
Stored Value
alpha (FixedU128)
Default Value
Absent keys read as this value — querying a key that has never been written returns this default, not an error or empty result.
Decoding the value
FixedU128Q64.64 fixed-point. Magnitude check: bits > 0.
value as bigintRelationships
Related Storages
- AlphaV2 Superseded by Coexists with check both decodes differently V2 introduced at runtime v401 with SafeFloat (mantissa+exponent) value type. V2 holds active staking positions (100% non-zero in 50K sample); legacy holds the historical population (~12% non-zero in 50K sample). Key sets verified DISJOINT across the 50K cap. Legacy uses FixedU128 with { bits: u128 }; V2 uses SafeFloat with { mantissa: bigint, exponent: i64 }. An indexer that reads .bits uniformly silently gets zero from V2 entries.
Modified By
Related Events
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 Alpha storage
const hot = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";
const cold = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";
const netuid = 1;
const result = await api.query.SubtensorModule.Alpha.getValue(hot, cold, netuid);
console.log("Alpha:", result);On-Chain Activity
>10M estimated writes
#3 most written storage item
Modified via user-submitted extrinsics
As of block 7,429,232
Version History
- key :
(AccountId, AccountId, u16)→(AccountId, AccountId, NetUid)
Runtime Info
View Source- Pallet
- SubtensorModule
- Storage Kind
- Map
- First Version
- v233
- Current Version
- v472