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 | key1 | u16 | key1 (u16) |
Stored Value
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 CurrentLiquidity storage
const key1 = 0;
const result = await api.query
[stringCamelCase("Swap")]
[stringCamelCase("CurrentLiquidity")](
key1
);
console.log("CurrentLiquidity:", result.toHuman());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
- v393