AutoStakeDestinationSet
Event Re-added v326 → v326, v334 → v367, v372 → v377, v385 → current #110Emitted when a coldkey sets its auto-stake destination hotkey .
View events on chainThe Big Picture
Auto-stake lets you compound earnings automatically. Instead of rewards sitting as liquid TAO (not earning), they get staked immediately to your chosen hotkey. This is the 'set it and forget it' approach to maximizing returns - your rewards start earning rewards.
Why This Matters
Compounding is powerful. If you earn 1 TAO/day and manually stake once a week, you miss 6 days of potential earnings on each batch. Auto-stake compounds immediately, so every reward starts earning from the next block.
Example Scenario
You validate and earn ~10 TAO/day. You set auto-stake destination to your own validator hotkey on subnet 1. AutoStakeDestinationSet fires. Now every emission automatically restakes, compounding your position without any manual transactions.
Common Questions
- Can I change my auto-stake destination?
- Yes, just set a new one. The old destination is replaced. Or set to none/null to disable and receive rewards as liquid TAO.
- Does auto-stake cost fees?
- The individual auto-stakes are done by the chain as part of emission distribution, so there's no separate transaction fee for each stake.
- Can I auto-stake to someone else's hotkey?
- Yes! You can auto-stake to any registered hotkey. Great for automatic delegation to your favorite validator.
Use Cases
- Set up automatic compounding of rewards
- Automate delegation management
- Configure hands-off earning strategy
- Track auto-stake configurations across accounts
How to Use This Event
- → Confirm your auto-stake configuration is active
- → Monitor when accounts change their auto-stake targets
- → Build portfolio management tools
From Chain Metadata
The auto stake destination has been set. **coldkey**: The account ID of the coldkey. **netuid**: The network identifier. **hotkey**: The account ID of the hotkey.
Triggers
Emitted by
Preconditions
- Coldkey is valid account
- Hotkey is registered on the specified subnet
May fail with
Effects
Storage Modified
Postconditions
- Future rewards/transfers will auto-stake to this hotkey
Side Effects
- Changes where automatic staking goes for this coldkey
Event Data
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 });
// Subscribe to AutoStakeDestinationSet events
api.query.system.events((events) => {
events
.filter(({ event }) =>
event.section === stringCamelCase("SubtensorModule") &&
event.method === "AutoStakeDestinationSet"
)
.forEach(({ event }) => {
console.log("AutoStakeDestinationSet:", event.data.toHuman());
});
});Version History
Runtime Info
View Source- Pallet Index
- 7
- Event Index
- 110
- First Version
- v326
- Current Version
- v393