Transactions
stake-into-basket
Buy shares in a root-registered validator's basket with free TAO.
Deploys TAO from the signing coldkey across the validator's basket and
credits beta immediately. The hotkey must already hold a root seat
(HotKeyNotRegisteredInSubNet). A curated fund follows its root
weight vector; an uncurated fund mirrors current holdings by
realizable value; an empty uncurated fund holds the deposit as the
fund's root (TAO cash) slot. The share mint is priced on the
realizable NAV the deposit added, so the depositor bears their own
entry slippage and swap fees. The shares do not require or change
root stake, and they do not change anyone's dividend accrual.
Redeem them later with claim_root_with_hotkey. Pass all to
deploy the whole free balance minus the existential deposit and a
small fee headroom.
| Signer | Origin | Pallet | Wraps |
|---|---|---|---|
coldkey | signed account (pallet role may apply) | SubtensorModule | SubtensorModule.stake_into_basket |
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
hotkey_ss58 | string | yes | Root-registered validator whose basket receives the deposit. |
amount_tao | number | "all" | yes | How much of the coldkey's free balance to deploy into the basket, or all (everything minus the existential deposit and fee headroom). |
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 stake-into-basket \
--hotkey <ss58|name> \
--amount-tao <amount|all> --dry-run
btcli tx stake-into-basket \
--hotkey <ss58|name> \
--amount-tao <amount|all> -w my_coldkeyPython
import bittensor as bt
from bittensor.wallet import Wallet
wallet = Wallet(name="my_coldkey", hotkey="my_hotkey")
intent = bt.StakeIntoBasket(hotkey_ss58="5F...", amount_tao=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("stake_into_basket", {...}, wallet)On-chain implementation
SubtensorModule.stake_into_basket — pallets/subtensor/src/macros/dispatches.rs#L2062:
#[pallet::call_index(147)]
// Declared weight is a cap sized for a 128-slot weight vector over 256 holdings
// (each slot costs a balance transfer + swap + escrow write; each holding two NAV
// sim-swap valuations); the actual weight is computed in `do_stake_into_basket`
// from the real slot and holding counts and refunded post-dispatch, mirroring
// `claim_root`.
#[pallet::weight((Pallet::<T>::stake_into_basket_weight(128, 256), DispatchClass::Normal, Pays::Yes))]
pub fn stake_into_basket(
origin: OriginFor<T>,
hotkey: T::AccountId,
amount_staked: TaoBalance,
) -> DispatchResultWithPostInfo {
let coldkey: T::AccountId = ensure_signed(origin)?;
let weight = Self::do_stake_into_basket(coldkey, hotkey, amount_staked)?;
Ok((Some(weight), Pays::Yes).into())
}Delegates to do_stake_into_basket.
Every file is browsable under /code exactly as built into the runtime, or as plain text under /code/raw/<path> (index: /code/index.json).