SubnetVolume

Storage Map v233 → v411

Total trading volume on a subnet .

Explore chain
Queried by: analyticsdevelopersstakersvalidators

The Big Picture

Volume measures cumulative trading activity through the subnet's AMM. High volume indicates active staking and unstaking - people are moving capital in and out. Low volume suggests a more static stake distribution. This is a key health metric for subnet liquidity and engagement.

Why This Matters

Is this subnet economically active? Volume tells you. High volume means lots of staking activity - people are actively participating. Low volume might mean stagnation or very long-term holders.

Example Scenario

Query SubnetVolume(netuid=1) returns 5000000000000000 (5M TAO equivalent volume). This subnet has seen 5M TAO worth of trading activity through its AMM pool.

Common Questions

Is volume cumulative or per-period?
This is typically cumulative total volume. For period-based analytics, you'd track changes over time using an indexer.
Does high volume mean a good subnet?
Not necessarily. High volume indicates activity, but could be churn (people leaving) as much as growth (people joining). Combine with other metrics.
What counts as volume?
Both stake and unstake operations contribute to volume. It measures total capital flow through the AMM in both directions.

Use Cases

  • Measure subnet economic activity and interest
  • Compare subnets by trading activity
  • Build volume-based subnet rankings
  • Identify trending or declining subnets
  • Research staking behavior patterns

From Chain Metadata

MAP ( netuid ) --> total_volume | The total amount of TAO bought and sold since the start of the network.

Purpose & Usage

Purpose

Track historical buy/sell activity through the AMM pool.

Common Query Patterns

  • Query by netuid for volume metrics
  • Compare volume across subnets
  • Track volume trends over time

Query Keys

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

Stored Value

total_volume (u128)

RAO -> TAO (/ 10^9)

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

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

Version History

v233 block 4,920,350 Added
v278–v289 · runtime versions skipped on chain (never deployed)
v290 block 5,947,548 Internal re-bind
v353–v360 · runtime versions skipped on chain (never deployed)
v361 block 7,063,679 Internal re-bind Current

Runtime Info

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