CollateralDrainRatio
Storage Map v437 → currentMAP ( netuid ) --> CollateralDrainRatio (k)
Explore chainFrom Chain Metadata
MAP ( netuid ) --> CollateralDrainRatio (k) Alpha of locked collateral released per alpha of hotkey emission earned (miner incentive and validator dividends). Snapshot into `MinerCollateral` at each registration.
Purpose & Usage
Common Query Patterns
- Query by key
- Iterate all entries
Query Keys
| # | Name | Type | Description |
|---|---|---|---|
| 1 | netuid | NetUid u16 | netuid (NetUid, hashed key component) |
Stored Value
CollateralDrainRatio (FixedU128)
Default Value
18446744073709551616 0x00000000000000000100000000000000
Absent keys read as this value — querying a key that has never been written returns this default, not an error or empty result.
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 CollateralDrainRatio storage
const netuid = 1;
const result = await api.query.SubtensorModule.CollateralDrainRatio.getValue(netuid);
console.log("CollateralDrainRatio:", result);On-Chain Activity
Write Frequency
●●○○○○ Minimal <10K est. writes
Fewer than 10K writes
#341 most written storage item
Write Source Calls + Hooks
Modified by both user extrinsics and runtime hooks
As of block 9,385,000
Runtime Info
View Source- Pallet
- SubtensorModule
- Storage Kind
- Map
- First Version
- v437
- Current Version
- v490