DecayingLock
Storage Map v411 → current NewMarks an individual (coldkey , subnet ) lock as decaying. DMAP (coldkey , netuid ) → bool. Absence of an entry means the lock decays by default; presence with false means perpetual.
Explore chainQueried by: stakerssubnet ownersanalytics
The Big Picture
The default lock decays. This map is the opt-out flag: when an entry exists with value false, the lock is perpetual and does not decay through UnlockRate.
Use Cases
- Confirm whether a position is decaying or perpetual
- Track adoption of perpetual locks per subnet
From Chain Metadata
DMAP ( coldkey, netuid ) --> false | When present and false, this coldkey's lock is perpetual. Missing entries mean the lock decays by default.
Purpose & Usage
Purpose
Stores the per-coldkey perpetual-lock flag for each subnet.
Common Query Patterns
- Check whether a given (coldkey, netuid) lock is perpetual
- Iterate to find all coldkeys that have opted into perpetual locks on a subnet
Query Keys
Stored Value
false (bool)
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 DecayingLock storage
const coldkey = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";
const netuid = 1;
const result = await api.query.SubtensorModule.DecayingLock.getValue(coldkey, netuid);
console.log("DecayingLock:", result);Runtime Info
View Source- Pallet
- SubtensorModule
- Storage Kind
- Map
- First Version
- v411
- Current Version
- v411