Ticks

Storage Map v290 → current

Tick data for concentrated liquidity price points.

Explore chain
Queried by: developersanalytics

The Big Picture

Ticks define price boundaries where liquidity changes.

Use Cases

  • Analyze liquidity distribution
  • Calculate position fees

From Chain Metadata

Storage for all ticks, using subnet ID as the primary key and tick index as the secondary key

Purpose & Usage

Purpose

Stores liquidity delta and fee growth at tick boundaries.

Common Query Patterns

  • Query by (netuid, tick_index)
Part of: Concentrated Liquidity

Query Keys

#NameTypeDescription
1
key1
u16 key1 (u16)
2
key2
TickIndex key2 (TickIndex) (price = 1.0001^tick)

Stored Value

value (Tick)

Relationships

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 Ticks storage
const key1 = 0;
const key2 = 0 as any /* TickIndex */;

const result = await api.query
  [stringCamelCase("Swap")]
  [stringCamelCase("Ticks")](
  key1,
  key2
);

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

On-Chain Activity

Write Frequency
●●●○○○ Low 10K–100K est. writes

10K–100K estimated writes

#49 most written storage item

Write Source User Extrinsics

Modified via user-submitted extrinsics

As of block 7,429,232

Runtime Info

View Source
Pallet
Swap
Storage Kind
Map
First Version
v290
Current Version
v393