AutoStakeDestinationSet

Event Re-added v326 → v326, v334 → v367, v372 → v377, v385 → current #110

Emitted when a coldkey sets its auto-stake destination hotkey .

View events on chain
Useful for: stakersvalidatorsdeveloperswallets

The 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

Effects

Postconditions

  • Future rewards/transfers will auto-stake to this hotkey

Side Effects

  • Changes where automatic staking goes for this coldkey

Event Data

#NameTypeDescription
0
coldkey
AccountId Cold wallet address (offline storage) (hex -> SS58)
1
netuid
u16 Subnet/network identifier (0-65535)
2
hotkey
AccountId Hot wallet address (active operations) (hex -> SS58)

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

v326 block 6,608,228 3 args
v334 block 6,811,690 3 args
v372 block 7,430,358 3 args
v385 block 7,782,670 3 args Current

Runtime Info

View Source
Pallet Index
7
Event Index
110
First Version
v326
Current Version
v393