sudo_set_max_childkey_take

Call v195 → current #77

Sets maximum child key take rate (admin).

View calls on chain

Click items to navigate. Pan and zoom to explore.

Used by: developerssubnet owners

The Big Picture

Childkey take determines how child operators split earnings with parents. Without a cap, children could set 100% take, leaving parents nothing. MaxChildKeyTake sets the ceiling, ensuring parents always receive a minimum share. This is a governance parameter balancing child operator compensation with parent returns.

Why This Matters

Parents delegate stake trusting children will share rewards fairly. The max take prevents children from taking everything. It's consumer protection for stake delegators in the parent-child relationship.

Example Scenario

Childkey exploitation is reported - children setting 95% take. Governance decides to cap it at 50%. Admin calls sudo_set_max_childkey_take(max_take=0.50). Now no child can take more than 50%, ensuring parents receive at least 50% of allocated emissions.

Common Questions

What happens to existing high takes?
Implementation-dependent. They might be grandfathered until next change, or forced down to the new max. Check network behavior.
What's a reasonable max take?
Debatable - depends on operator costs and market dynamics. 50-80% is typical, giving parents meaningful returns while compensating children for their work.

Use Cases

  • Network governance limiting childkey extraction
  • Protect parents from excessive child takes
  • Adjust economic parameters during network tuning
  • Respond to exploitation of childkey system

From Chain Metadata

Sets the maximum allowed childkey take. This function can only be called by the root origin.

Input Parameters

#NameTypeDescription
0
take
u16 take (u16)

Permissions

Origin
Unknown
Required Role

Permission data inferred from metadata. May be incomplete.

Requirements

  • Caller has sudo privileges
  • Valid take rate specified (0-100%)

Effects

Events Emitted

Storage Modified

Postconditions

  • MaxChildKeyTake updated
  • Affects all future childkey take changes

Side Effects

  • Child keys cannot set take above this
  • Existing higher takes may be grandfathered or forced down

Code Examples

import { ApiPromise, WsProvider } from "@polkadot/api";
import { stringCamelCase } from "@polkadot/util";

const provider = new WsProvider("wss://entrypoint-finney.opentensor.ai:443");
const api = await ApiPromise.create({ provider });

// Build sudo_set_max_childkey_take call
const take = 0;

const call = api.tx[stringCamelCase("SubtensorModule")][stringCamelCase("sudo_set_max_childkey_take")](
  take
);

Runtime Info

View Source
Pallet Index
7
Call Index
77
First Version
v195
Current Version
v393