AutoStakeAdded
Event Re-added v315 → v315, v320 → v326, v334 → v367, v372 → v377, v385 → current #107Emitted when stake is automatically added to a designated hotkey .
View events on chainThe Big Picture
Auto-stake is compound interest for Bittensor. When you configure auto-stake, incoming rewards don't sit as liquid TAO - they immediately stake to your designated hotkey. This event fires every time auto-stake kicks in, confirming your rewards are automatically reinvesting. It's the execution of the automation you set up with AutoStakeDestinationSet.
Why This Matters
If you've configured auto-stake, this event confirms it's actually working. Each AutoStakeAdded is a compounding event - your earnings are now earning. Compare AutoStakeAdded events with expected emission rates to verify nothing's going wrong with your setup.
Example Scenario
You're validating and earning ~2 TAO/day with auto-stake configured to your own hotkey. At each epoch end, AutoStakeAdded fires showing ~0.01 TAO auto-staked (assuming 200 epochs/day). These small automatic stakes compound throughout the day, reinvesting immediately instead of waiting for manual action.
Common Questions
- Why is each AutoStakeAdded amount so small?
- Auto-stake happens at each epoch, so your daily earnings are split across many small stakes. It's working correctly - check the daily total by summing all AutoStakeAdded events.
- What if I don't see AutoStakeAdded events?
- Either you haven't configured auto-stake (set it with AutoStakeDestinationSet) or you're not earning rewards. Check both your auto-stake configuration and your emission activity.
- Can I change where auto-stake goes mid-stream?
- Yes, set a new AutoStakeDestination. Future auto-stakes go to the new hotkey. Existing stakes stay where they are.
Use Cases
- Verify automatic compounding is working as configured
- Track compounding activity on your accounts
- Monitor validators' auto-stake inflows
- Build automatic reward tracking dashboards
How to Use This Event
- → Subscribe to your coldkey to see auto-staking in action
- → Track auto-stake frequency and amounts over time
- → Build compounding analytics showing APY impact
From Chain Metadata
Auto-staking hotkey received stake
Triggers
Emitted by
Preconditions
- Auto-stake destination is set for coldkey
- Incoming funds are eligible for auto-staking
May fail with
Effects
Storage Modified
Postconditions
- Stake added to designated hotkey
- Coldkey's auto-stake destination received funds
Side Effects
- Automatically increases hotkey's staked amount
Event Data
| # | Name | Type | Description |
|---|---|---|---|
| 0 | netuid | u16 | Subnet/network identifier (0-65535) |
| 1 | destination | AccountId | Destination account address (hex -> SS58) |
| 2 | hotkey | AccountId | Hot wallet address (active operations) (hex -> SS58) |
| 3 | owner | AccountId | Owner account address (hex -> SS58) |
| 4 | incentive | u64 | incentive (u64) (RAO -> TAO (/ 10^9)) |
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 AutoStakeAdded events
api.query.system.events((events) => {
events
.filter(({ event }) =>
event.section === stringCamelCase("SubtensorModule") &&
event.method === "AutoStakeAdded"
)
.forEach(({ event }) => {
console.log("AutoStakeAdded:", event.data.toHuman());
});
});On-Chain Activity
Major features with millions of emissions
#21 most emitted event
As of block 7,429,232
Version History
Runtime Info
View Source- Pallet Index
- 7
- Event Index
- 107
- First Version
- v315
- Current Version
- v393