# set-root-claim-threshold (/docs/tx/set-root-claim-threshold)

`claim_root` and `claim_root_with_hotkey` silently skip any
per-validator basket redemption whose estimated payout falls below this
threshold — the shares keep accruing and pay out once they clear it. The
threshold exists so dust claims cannot grind the chain with tiny swaps;
the default is 500,000 rao (0.0005 TAO) and the chain caps it at
10,000,000 rao (0.01 TAO).

Requires the chain sudo key: `Executor` wraps the built call in
`Sudo.sudo` because `origin` is `root`, and when root is a multisig
that `Sudo.sudo` call is what the multisig must dispatch. Verify the
effect afterwards with the `root_claim_threshold` read.

| Signer    | Origin            | Pallet          | Wraps                                                                                                                        |
| --------- | ----------------- | --------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| `coldkey` | root (chain sudo) | SubtensorModule | [`SubtensorModule.sudo_set_root_claim_threshold`](/code/pallets/subtensor/src/macros/dispatches.rs#L2023-L2044), `Sudo.sudo` |

## Verify [#verify]

After inclusion, confirm the effect with the
[`root-claim-threshold`](/docs/query/root-claim-threshold) read:

```bash
btcli query root-claim-threshold --json
```

## Parameters [#parameters]

| Parameter   | Type              | Required | Description                                                                                                                |
| ----------- | ----------------- | -------- | -------------------------------------------------------------------------------------------------------------------------- |
| `threshold` | number \| `"all"` | yes      | Minimum claim payout in TAO; per-validator redemptions estimated below it are skipped and keep accruing. At most 0.01 TAO. |

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

## CLI [#cli]

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

```bash
btcli tx set-root-claim-threshold \
  --threshold <amount|all> --dry-run
btcli tx set-root-claim-threshold \
  --threshold <amount|all> -w my_coldkey
```

## Python [#python]

```python
import bittensor as bt
from bittensor.wallet import Wallet

wallet = Wallet(name="my_coldkey", hotkey="my_hotkey")
intent = bt.SetRootClaimThreshold(threshold=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](/docs/concepts/client).) Or build the intent by op name, as
an agent would:

```python
result = sub.execute_tool("set_root_claim_threshold", {...}, wallet)
```

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

`SubtensorModule.sudo_set_root_claim_threshold` — [`pallets/subtensor/src/macros/dispatches.rs#L2025`](/code/pallets/subtensor/src/macros/dispatches.rs#L2023-L2044):

```rust
#[pallet::call_index(124)]
#[pallet::weight(<T as crate::pallet::Config>::WeightInfo::sudo_set_root_claim_threshold())]
pub fn sudo_set_root_claim_threshold(
    origin: OriginFor<T>,
    netuid: NetUid,
    new_value: u64,
) -> DispatchResult {
    Self::ensure_subnet_owner_or_root(origin, netuid)?;

    // Claims only ever consult the ROOT entry; accepting other netuids would silently
    // store an inert value.
    ensure!(netuid.is_root(), Error::<T>::InvalidRootClaimThreshold);

    ensure!(
        new_value <= I96F32::from(MAX_ROOT_CLAIM_THRESHOLD),
        Error::<T>::InvalidRootClaimThreshold
    );

    RootClaimableThreshold::<T>::set(netuid, new_value.into());

    Ok(())
}
```

Delegates to [`ensure_subnet_owner_or_root`](/code/pallets/subtensor/src/utils/misc.rs#L12).

`Sudo.sudo` is implemented by Substrate's `pallet_sudo`, outside this repository's pallets.

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