set_childkey_take

Call v195 → v277, v290 → current #75

Sets the take rate for a child hotkey .

View calls on chain

Click items to navigate. Pan and zoom to explore.

Used by: validatorsminersdevelopers

The Big Picture

As a child key operator, you use stake power delegated from parents. Childkey take determines how you split earnings - you keep the take percentage, the rest goes to parents. Higher take means more for you, but parents might choose different children. It's a competitive market for stake utilization.

Why This Matters

Take rate is your compensation as a child operator. Set it too high, and parents will allocate stake elsewhere. Set it too low, and you're not fairly compensated for your work. Find the market-clearing rate that attracts sufficient stake while covering your costs.

Example Scenario

You're a child miner using stake from 3 parents. Current take is 20% but you want 25% to cover increased costs. Call set_childkey_take(hotkey=your_hotkey, netuid=1, take=0.25). Your take increases - parents now receive 75% of your earnings instead of 80%.

Common Questions

Do parents approve my take rate?
No - you set it unilaterally. But parents can reallocate stake to other children if they don't like your rate. It's market-driven, not permission-based.
What's the maximum childkey take?
Set by network parameter (MaxChildKeyTake). Typically capped to prevent exploitative rates. Check current network parameters for the exact limit.
How often can I change my take?
Rate-limited to prevent manipulation. You can't change every block. Check TxChildKeyTakeRateLimit for the current cooldown period.

Use Cases

  • Negotiate compensation for using parent's stake power
  • Adjust take rate as mining conditions change
  • Attract or discourage parent-child relationships
  • Balance operator compensation with parent returns

From Chain Metadata

Sets the childkey take for a given hotkey. This function allows a coldkey to set the childkey take for a given hotkey. The childkey take determines the proportion of stake that the hotkey keeps for itself when distributing stake to its children.

Part of: Child Hotkeys

Input Parameters

#NameTypeDescription
0
hotkey
AccountId hotkey: Account address (32 bytes, SS58-encoded) (hex -> SS58)
1
netuid
u16 NetUidnetuid: Subnet ID (u16, 0-65535)
2
take
u16 take (u16)

Permissions

Origin
Signed
Required Role

Permission data inferred from metadata. May be incomplete.

Requirements

  • Caller owns child hotkey
  • Take within allowed range (MinChildKeyTake to MaxChildKeyTake)
  • Rate limit not exceeded

Effects

Events Emitted

Postconditions

  • ChildKeyTake updated
  • New take applies to future emissions

Side Effects

  • Affects child's share of allocated rewards
  • Changes parent's portion of child's earnings

Code Examples

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 set_childkey_take call (typed, named args)
const hotkey = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";
const netuid = 1;
const take = 0;

const tx = api.tx.SubtensorModule.set_childkey_take({
  hotkey,
  netuid,
  take,
});

Version History

v195 block 3,791,350 3 args
v290 block 5,947,548 3 args Current

Runtime Info

View Source
Pallet Index
7
Call Index
75
First Version
v195
Current Version
v411