AutoStakeDestinationColdkeys

Storage Map v326 → current

Coldkeys using auto-stake on a subnet .

Explore chain
Queried by: analyticsdevelopersvalidators

The Big Picture

This is the reverse index for auto-stake - given a subnet, who has auto-stake enabled? Useful for analytics and understanding how many users are using automatic compounding. Higher adoption suggests sophisticated, long-term oriented stakers.

Why This Matters

Want to know how many people use auto-stake on a subnet? This storage lets you enumerate them. Useful for measuring feature adoption and understanding staking behavior.

Example Scenario

Query AutoStakeDestinationColdkeys(netuid=1) returns [coldkey_A, coldkey_B, ...]. These coldkeys have auto-stake configured on subnet 1. Iterate to count or analyze auto-stake users.

Common Questions

Does this include all auto-stake users?
Yes, any coldkey with an auto-stake destination set for this subnet appears in this list.
Can I see where each one stakes?
This gives you the list. Query AutoStakeDestination(coldkey, netuid) for each to see their destination hotkey.

Use Cases

  • Measure auto-stake adoption rates
  • Build analytics on compound staking behavior
  • Index all auto-stake configurations for a subnet
  • Research staker behavior patterns
  • Understand validator flows from auto-stake

Purpose & Usage

Purpose

Track which coldkeys have auto-stake enabled - useful for analytics and indexing.

Common Query Patterns

  • Iterate auto-stake users by netuid
  • Count auto-stake adoption on a subnet
  • Build auto-stake analytics

Query Keys

#NameTypeDescription
1
key1
AccountId key1 (AccountId) (hex -> SS58)
2
key2
u16 key2 (u16)

Stored Value

value (Vec<AccountId>)

Relationships

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

// Query AutoStakeDestinationColdkeys storage
const key1 = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";
const key2 = 0;

const result = await api.query
  [stringCamelCase("SubtensorModule")]
  [stringCamelCase("AutoStakeDestinationColdkeys")](
  key1,
  key2
);

console.log("AutoStakeDestinationColdkeys:", result.toHuman());

Runtime Info

View Source
Pallet
SubtensorModule
Storage Kind
Map
First Version
v326
Current Version
v393