claim_root

Call v334 → current #121

Redeems accrued basket entitlement across every validator the coldkey root-stakes to. The subnets argument is ignored.

View calls on chain

Click items to navigate. Pan and zoom to explore.

Used by: validatorsstakerswallets

The Big Picture

Since Root Reborn (v441) redemption is fund-level rather than per-subnet. This call keeps its original SCALE signature so old clients still encode successfully, but subnets is ignored and the call walks every validator the coldkey root-stakes to. Prefer claim_root_with_hotkey when you want one validator.

Why This Matters

This is the blanket claim. It realizes whatever every fund you are subscribed to currently owes you and compounds it into your root stake in one transaction.

Example Scenario

You root-stake to three validators. Call claim_root. Each fund sells your pro-rata slice, three BasketClaimed events fire, and one RootClaimed reports the total staked back onto root.

Common Questions

Why is the subnets argument ignored?
Baskets have no per-subnet claim selection; entitlement is a fraction of the whole fund. The argument is retained only so pre-basket clients keep decoding.
Does the TAO land in my free balance?
No. It is staked back onto root on the same validator. Follow with remove_stake to move it to free balance.
Is there a minimum to claim?
Yes. Per-validator payouts below RootClaimableThreshold (default 500,000 RAO) are skipped as dust and keep accruing for a later claim.
Should I use this or claim_root_with_hotkey?
Prefer claim_root_with_hotkey to realize a single validator and leave the rest accruing. Use claim_root when you want everything at once.

Use Cases

  • Realize accrued root yield across all validators at once
  • Compound root position without picking a validator
  • Support pre-basket clients whose encoded call data still decodes

From Chain Metadata

Claims the root emissions for a coldkey.

Input Parameters

#NameTypeDescription
0
subnets
BTreeSet subnets (BTreeSet)

Permissions

Origin
Signed
Required Role

Permission data inferred from metadata. May be incomplete.

Requirements

  • Coldkey holds root (netuid 0) stake on at least one validator hotkey
  • At least one per-validator payout clears RootClaimableThreshold
  • Beta basket seed migration is idle (otherwise BetaBasketSeedInProgress)
  • From v488: for each validator, its queued basket dividend credits settle or are snapshotted to the current root stakers at the start of the claim; the claim fails with BasketDepositPending when the queue is longer than one flush chunk or the snapshot fails (pallets/subtensor/src/staking/claim_root.rs L693-L696 and staking/basket_flush.rs L204-L225 at d967d1358, runtime v490)

Effects

Postconditions

  • Owed fraction of each fund holding sold pro-rata to TAO
  • Proceeds staked back onto root on the same validator, not paid to free balance
  • BasketClaimed watermarks advanced; BasketRedeemedTao incremented
  • From v488, before the fund redemption, each validator pays the coldkey its deferred dividends: per DeferredBasketRates row, alpha = rate x root stake - the DeferredBasketDebts amount, capped at PendingBasketDeposits, is sold and the TAO staked on root; deferred cash = DeferredBasketCashRate x root stake - DeferredBasketCashClaimed, capped at DeferredBasketCashReserve, is staked on root. Each is skipped while worth less than RootClaimableThreshold (pallets/subtensor/src/staking/deferred_dividends.rs L392-L557 at d967d1358, runtime v490)

Side Effects

  • Orphaned dust holdings outside the current weight vector folded into the fund root slot
  • Post-dispatch weight refunded by work actually done: redeemed holdings pay full weight, scanned rows a small per-row cost
  • From v488 one validator can emit two BasketClaimed events in a claim, one for deferred dividends and one for the fund redemption; RootClaimed.tao is the sum of both over all validators

Code Examples

// ----------------------------------------------------------------------
// HEADS UP: 1 arg below has a complex type with no usable default.
// Look for `undefined as any` and replace it with real value
// before running — the snippet compiles, but will fail at runtime as-is.
// ----------------------------------------------------------------------
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);

// Build claim_root call (typed, named args)
const subnets = undefined as any /* BTreeSet — replace with real value */;

const tx = api.tx.SubtensorModule.claim_root({
  subnets,
});

On-Chain Activity

Usage Frequency
●●●●○○ Active 100K–1M extrinsics

Significant regular use

#43 most used call

Success Rate Near-certain

Over 95% of submissions succeed

As of block 9,385,000

Runtime Info

View Source
Pallet Index
7
Call Index
121
First Version
v334
Current Version
v490