AutoStakeDestination
Storage Re-added Map v315 → v323, v326 → currentAuto-stake destination hotkey for a coldkey on a subnet .
Explore chainThe Big Picture
Auto-stake enables automatic compounding. Instead of emissions going to your free balance (where you'd manually re-stake them), they automatically stake to a designated hotkey. Set it once and your stake compounds without any further action. This storage shows where each coldkey's rewards go.
Why This Matters
Earning rewards but want them automatically restaked? Auto-stake does that. This tells you which hotkey will receive your rewards. If not set, rewards go to free balance and you must manually stake.
Example Scenario
Query AutoStakeDestination(coldkey=you, netuid=1) returns hotkey_X. Your emissions from subnet 1 will automatically stake to hotkey_X. If it returns None/default, auto-stake isn't enabled.
Common Questions
- How do I enable auto-stake?
- Use the set_auto_stake_destination call to configure where rewards should go. You can set different destinations for different subnets.
- Can I auto-stake to a different validator?
- Yes, you can set any hotkey as your auto-stake destination - doesn't have to be one you own.
- Does auto-stake work cross-subnet?
- Each subnet has its own auto-stake destination. You configure per-subnet where rewards go.
- What if the destination hotkey deregisters?
- Auto-stake to a non-existent destination may fail. Monitor your destinations and update if validators deregister.
Use Cases
- Check where your rewards will auto-stake
- Verify auto-stake configuration is correct
- Build wallet UIs showing auto-stake status
- Calculate compound yield projections
- Debug why rewards aren't appearing in expected location
Purpose & Usage
Purpose
Where rewards automatically stake - enables compound staking without manual intervention.
Common Query Patterns
- Query destination by coldkey-netuid
- Check if auto-stake is configured
- Verify auto-stake setup before relying on it
Query Keys
Stored Value
Relationships
Modified By
Related Events
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 AutoStakeDestination storage
const key1 = "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY";
const key2 = 0;
const result = await api.query
[stringCamelCase("SubtensorModule")]
[stringCamelCase("AutoStakeDestination")](
key1,
key2
);
console.log("AutoStakeDestination:", result.toHuman());Version History
Runtime Info
View Source- Pallet
- SubtensorModule
- Storage Kind
- Map
- First Version
- v315
- Current Version
- v393