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)
Query Keys
Stored Value
value (Tick)
Relationships
Modified By
Related Events
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