EMAPriceHalvingBlocks
Storage Map v252 → v490 · 1 shape changeBlocks for EMA price to halve per subnet .
Explore chainThe Big Picture
EMA (Exponential Moving Average) is used for price smoothing. This parameter controls the half-life - how many blocks for the EMA influence to halve. Longer = smoother, shorter = more responsive.
Use Cases
- Understand price smoothing dynamics
- Build price prediction models
- Research subnet economics
From Chain Metadata
MAP ( netuid ) --> Halving time of average moving price.
Purpose & Usage
Purpose
Control how quickly exponential moving average price decays.
Common Query Patterns
- Query by netuid
Migration Notes
key type changed from u16 to 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
| # | Name | Type | Description |
|---|---|---|---|
| 1 | netuid | NetUid u16 | netuid (NetUid, hashed key component) |
Stored Value
Halving (u64)
RAO -> TAO (/ 10^9)
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.
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 EMAPriceHalvingBlocks storage
const netuid = 1;
const result = await api.query.SubtensorModule.EMAPriceHalvingBlocks.getValue(netuid);
console.log("EMAPriceHalvingBlocks:", result);On-Chain Activity
Fewer than 10K writes
#317 most written storage item
Modified by both user extrinsics and runtime hooks
As of block 9,385,000
Version History
- key :
u16→NetUid
Runtime Info
View Source- Pallet
- SubtensorModule
- Storage Kind
- Map
- First Version
- v252
- Current Version
- v490