# subnet-collateral (/docs/query/subnet-collateral)

The list validator code reads to enforce a per-machine collateral
requirement: each record carries the locked amount, the miner's
self-maintained floor, the drain-ratio snapshot, and the hotkey's current
`uid` (None when the hotkey is deregistered but its collateral persists) —
ready to join against the metagraph when scoring.

**Category:** Mining & collateral

## Parameters [#parameters]

| Parameter | Type    | Description      |
| --------- | ------- | ---------------- |
| `netuid`  | integer | Subnet to query. |

## CLI [#cli]

```bash
btcli query subnet-collateral --netuid <integer> --json
```

## Python [#python]

Namespace method (autocomplete, signature help):

```python
import bittensor as bt

sub = bt.Subtensor()
result = sub.collateral.subnet_collateral(netuid=1)
```

Or dispatch by name, as an agent would:

```python
result = sub.read("subnet_collateral", netuid=1)
```

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

## On-chain implementation [#on-chain-implementation]

* Storage [`SubtensorModule.Uids`](/code/pallets/subtensor/src/lib.rs#L2373)

Every file is browsable under [/code](/code) exactly as built into the runtime.
