SubnetProtocolFlow

Storage Map v411 → current New

Per-block accumulator for protocol cost per subnet (emission + chain buys - root sells). MAP (netuid ) → i64.

Explore chain
Queried by: analyticsdevelopers

The Big Picture

The raw signed accumulator that gets EMA-smoothed into SubnetEmaProtocolFlow and then deducted from emission shares when NetTaoFlowEnabled is on.

Use Cases

  • Reconstruct protocol cost adjustments to emission shares
  • Track protocol cost trends per subnet

From Chain Metadata

MAP ( netuid ) --> subnet_protocol_flow | Per-block accumulator for protocol cost (emission + chain buys - root sells).

Purpose & Usage

Purpose

Signed-integer running flow used by net-TAO-flow accounting.

Common Query Patterns

  • Query SubnetProtocolFlow[netuid]
Part of: Net TAO Flow Accounting

Query Keys

#NameTypeDescription
1
netuid
u16 netuid (u16, hashed key component)

Stored Value

subnet_protocol_flow (i64)

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

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

Runtime Info

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