Transactions

set-min-collateral

Set the self-maintaining collateral floor for your hotkey on a subnet.

View as Markdown

The collateral drain never releases the lock below the floor, and while the lock is under it, earned miner incentive is captured into the lock until the floor is met — so a miner tracking a validator-published collateral requirement does not need to keep re-locking drained funds. Raising the floor above the current lock does not require fresh capital: the shortfall fills from future incentive (use add_collateral to fund it immediately). Zero clears the floor and restores pure drain behavior.

SignerOriginPalletWraps
coldkeysigned account (pallet role may apply)SubtensorModuleSubtensorModule.set_min_collateral

Parameters

ParameterTypeRequiredDescription
netuidintegeryesSubnet the floor applies to.
min_alphanumber | "all"yesThe floor, in the subnet's alpha. Zero clears it.
hotkey_ss58stringnoMiner hotkey the floor applies to. Defaults to the wallet hotkey.

Address parameters (--hotkey, --coldkey, --dest, ...) accept a raw ss58 address, an address-book or proxy-book name, or a local wallet/hotkey name.

CLI

Preview with --dry-run (shows fee, effects, and policy result without submitting), then submit:

btcli tx set-min-collateral \
  --netuid <int> \
  --min-alpha <amount|all> --dry-run
btcli tx set-min-collateral \
  --netuid <int> \
  --min-alpha <amount|all> -w my_coldkey

Python

import bittensor as bt
from bittensor.wallet import Wallet

wallet = Wallet(name="my_coldkey", hotkey="my_hotkey")
intent = bt.SetMinCollateral(netuid=1, min_alpha=1.0)

sub = bt.Subtensor()
plan = sub.plan(intent, wallet)   # fee, effects, policy — no submission
result = sub.execute(intent, wallet)
if not result.success:
    print(result.error.code, result.error.remediation)

(bt.Subtensor is also the async client — async with bt.Subtensor() as client: — see The client.) Or build the intent by op name, as an agent would:

result = sub.execute_tool("set_min_collateral", {...}, wallet)

On-chain implementation

SubtensorModule.set_min_collateralpallets/subtensor/src/macros/dispatches.rs#L2479:

#[pallet::call_index(145)]
#[pallet::weight(<T as crate::pallet::Config>::WeightInfo::set_min_collateral())]
pub fn set_min_collateral(
    origin: OriginFor<T>,
    netuid: NetUid,
    hotkey: T::AccountId,
    min_locked: AlphaBalance,
) -> DispatchResult {
    Self::do_set_min_collateral(origin, netuid, hotkey, min_locked)
}

Delegates to do_set_min_collateral.

Every file is browsable under /code exactly as built into the runtime, or as plain text under /code/raw/<path> (index: /code/index.json).