EMAPriceHalvingBlocks

Storage Map v252 → current

Blocks for EMA price to halve per subnet .

Explore chain
Queried by: developersanalytics

The 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

Query Keys

#NameTypeDescription
1
key1
u16 key1 (u16)

Stored Value

Value in RAO (÷10⁹ for TAO)

RAO -> TAO (/ 10^9)

Code Examples

import { ApiPromise, WsProvider } from "@polkadot/api";
import { stringCamelCase } from "@polkadot/util";

const provider = new WsProvider("wss://entrypoint-finney.opentensor.ai:443");
const api = await ApiPromise.create({ provider });

// Query EMAPriceHalvingBlocks storage
const key1 = 0;

const result = await api.query
  [stringCamelCase("SubtensorModule")]
  [stringCamelCase("EMAPriceHalvingBlocks")](
  key1
);

console.log("EMAPriceHalvingBlocks:", result.toHuman());

Runtime Info

View Source
Pallet
SubtensorModule
Storage Kind
Map
First Version
v252
Current Version
v393