Queries

miner-collateral

A `(hotkey, coldkey)` stake position's standing collateral, or None.

View as Markdown

Collateral is keyed by hotkey + coldkey so nominators on the same hotkey are never charged for the owner's bond. When coldkey_ss58 is omitted, the hotkey owner is used.

locked_alpha is non-withdrawable stake released through earned incentive at drain_ratio alpha per alpha earned; min_locked_alpha is the miner-set floor the lock self-maintains around (the drain stops at it and incentive fills any shortfall); earned_alpha is lifetime incentive since the collateral entry existed. Derived: headroom_alpha (draining portion above the floor), shortfall_alpha (capture in progress below the floor), and releasable_work_alpha (incentive still needed to release the headroom). The lock survives deregistration and is credited on re-registration.

Category: Mining & collateral

Parameters

ParameterTypeDescription
netuidintegerSubnet to query.
hotkey_ss58stringMiner hotkey of the bonded stake position.
coldkey_ss58stringColdkey of the bonded stake position. Defaults to the hotkey owner.

CLI

btcli query miner-collateral --netuid <integer> --hotkey <ss58|name> --coldkey <ss58|name> --json

Python

Namespace method (autocomplete, signature help):

import bittensor as bt

sub = bt.Subtensor()
result = sub.collateral.miner_collateral(netuid=1, hotkey_ss58="5F...", coldkey_ss58="5F...")

Or dispatch by name, as an agent would:

result = sub.read("miner_collateral", netuid=1, hotkey_ss58="5F...", coldkey_ss58="5F...")

Async is the same surface awaited: async with bt.Subtensor() as client:.

On-chain implementation

Every file is browsable under /code exactly as built into the runtime.