CurrentLiquidity
Storage Map v290 → currentActive liquidity at current price per subnet .
Explore chainQueried by: developersanalyticsstakers
The Big Picture
Higher liquidity = better prices, more LP competition.
Use Cases
- Calculate swap slippage
- Monitor pool depth
From Chain Metadata
Storage for the current liquidity amount for each subnet.
Purpose & Usage
Purpose
Total liquidity currently earning fees.
Common Query Patterns
- Query by netuid
Query Keys
| # | Name | Type | Description |
|---|---|---|---|
| 1 | netuid netuid raw: key1 | u16 | key1 (u16) |
Stored Value
Relationships
Modified By
Related Events
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 CurrentLiquidity storage
const key1 = 0;
const result = await api.query.Swap.CurrentLiquidity.getValue(key1);
console.log("CurrentLiquidity:", result);On-Chain Activity
Write Frequency
●●●○○○ Low 10K–100K est. writes
10K–100K estimated writes
#50 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
- v411