ChildkeyTake

Storage Map v195 → v490 · 1 shape change

Child-hotkey commission fraction on a subnet , encoded as u16. To get the fraction: value / u16::MAX (i.e. value / 65535). NOT basis points (10000) or percent (100).

Explore chain
Queried by: validatorsdelegatorsanalytics

The Big Picture

When a parent delegates stake to a child, the child earns rewards. ChildkeyTake is the child's commission - the fraction they keep before passing rewards back to the parent. Higher take means more for the child, less for the delegating parent. Encoded as u16/u16::MAX.

Why This Matters

What cut does this child keep? ChildkeyTake determines how much flows back to parents. Lower take = better for parents; higher take = better for child operators.

Example Scenario

Query ChildkeyTake(hotkey=child_Y, netuid=1) returns 9830. That's 15% take (9830/65535). The child keeps 15% of their earnings, passing 85% to parents.

Common Questions

How does the encoding work?
The u16 value is a fraction of u16::MAX: 9830 ≈ 15%, 11796 = 18%, 65535 = 100%.
Are there limits on take?
Yes, check MinChildkeyTake and MaxChildkeyTake for the allowed range.
Who sets the take rate?
The child hotkey sets their own take rate. Parents choose whether to accept it by establishing or maintaining the relationship.

Use Cases

  • Check child commission rate before establishing relationship
  • Compare child hotkeys by take rate
  • Calculate parent returns after child take
  • Build child key comparison tools
  • Analyze child key economics

From Chain Metadata

DMAP ( hot, netuid ) --> take | Returns the hotkey childkey take for a specific subnet

Purpose & Usage

Purpose

Track what fraction a child-hotkey keeps before passing rewards back to the parent. Stored as u16 normalised to u16::MAX = 100%, matching the SubnetOwnerCut convention.

Common Query Patterns

  • Query by (hotkey, netuid)
  • Divide value by 65535 (u16::MAX) to get fraction
  • Compare against MinChildkeyTake / MaxChildkeyTake bounds (same encoding)

Notes

  • Value is u16 normalised to u16::MAX (NOT basis points, NOT percent). 32767 ≈ 50%, 65535 = 100%.
Part of: Child Hotkeys

Migration Notes

v424 v432 Breaking

key type changed from (AccountId, u16) to (AccountId, NetUid); value type 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.

Query Keys

#NameTypeDescription
1
hotkey hotkey
raw: hot
AccountId hot (AccountId, hashed key component) (hex -> SS58)
2
netuid netuid
NetUid netuid (NetUid, hashed key component)

Stored Value

take (PerU16)

Default Value

0 0x0000

Absent keys read as this value — querying a key that has never been written returns this default, not an error or empty result.

Decoding the value

u16 (normalised: value / u16::MAX = fraction)

Same encoding as SubnetOwnerCut: value / u16::MAX.

const fraction = (value as number) / 65535;

Relationships

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);

// Query ChildkeyTake storage
const hot = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";
const netuid = 1;

const result = await api.query.SubtensorModule.ChildkeyTake.getValue(hot, netuid);
console.log("ChildkeyTake:", result);

On-Chain Activity

Write Frequency
●●○○○○ Minimal <10K est. writes

Fewer than 10K writes

#220 most written storage item

Write Source Calls + Hooks

Modified by both user extrinsics and runtime hooks

As of block 9,385,000

Version History

v195 block 3,791,350 Added
v425–v431 · runtime versions skipped on chain (never deployed)
v432 block 8,636,190 Shape changed Current
  • key : (AccountId, u16) → (AccountId, NetUid)
  • value : u16 → PerU16

Runtime Info

View Source
Pallet
SubtensorModule
Storage Kind
Map
First Version
v195
Current Version
v490