SubnetEmaTaoFlow

Storage Map v334 → v411 Changed in v411

EMA of TAO inflow-outflow balance per subnet .

Explore chain
Queried by: analyticsdevelopers

The Big Picture

Raw TAO flow is volatile. This EMA provides a smoothed view of flow dynamics, used in economic calculations for subnet weight.

Use Cases

  • Monitor smoothed flow trends
  • Research subnet economics
  • Build flow dashboards

From Chain Metadata

MAP ( netuid ) --> subnet_ema_tao_flow | Returns the EMA of TAO inflow-outflow balance.

Purpose & Usage

Purpose

Smoothed tracking of TAO flow for subnet economics.

Common Query Patterns

  • Query by netuid
Part of: TAO Flow

Query Keys

#NameTypeDescription
1
netuid
u16 Subnet ID

Stored Value

  • .0
    last_update_block — Block number at which the EMA was last updated. Used to age and re-smooth the EMA on the next update. NOT a magnitude.
  • .1
    ema_value — Exponential moving average of TAO inflow-outflow balance for the subnet, stored as substrate-fixed I64F64 (chain typeName FixedI128 with Frac=64). Real value = bits / 2^64. Can be negative (outflow > inflow); decode the i128 bits with two's-complement adjustment before dividing — JS BigInt("0x...") does NOT sign-extend.

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

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

Version History

v334 block 6,811,690 Added
v353–v360 · runtime versions skipped on chain (never deployed)
v361 block 7,063,679 Internal re-bind
v363–v364 · runtime versions skipped on chain (never deployed)
v365 block 7,135,419 Internal re-bind
v386–v390 · runtime versions skipped on chain (never deployed)
v391 block 7,782,857 Internal re-bind
v394–v400 · runtime versions skipped on chain (never deployed)
v401 block 8,036,576 Internal re-bind
v403–v410 · runtime versions skipped on chain (never deployed)
v411 block 8,283,784 Internal re-bind Current

Runtime Info

View Source
Pallet
SubtensorModule
Storage Kind
Map
First Version
v334
Current Version
v411