set_childkey_take
Call v195 → v277, v290 → v424, v432 → current #75Sets the take rate for a child hotkey .
View calls on chainCall Workflow
Click items to navigate. Pan and zoom to explore.
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.
Migration Notes
netuid changed from u16 to NetUid; take changed from u16 to PerU16
Update decoders: SCALE encoding is positional, so any signature change (added, removed, or type-changed fields, or storage shape changes) shifts byte offsets and existing decoders will misparse this item. Re-derive types from the new metadata.
Input Parameters
Permissions
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
Storage Modified
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
// ----------------------------------------------------------------------
// 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 set_childkey_take call (typed, named args)
const hotkey = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";
const netuid = 1;
const take = undefined as any /* PerU16 — replace with real value */;
const tx = api.tx.SubtensorModule.set_childkey_take({
hotkey,
netuid,
take,
});Version History
Runtime Info
View Source- Pallet Index
- 7
- Call Index
- 75
- First Version
- v195
- Current Version
- v472