StakeAdded

Event Re-added v101 → v219, v233 → v252, v257 → current #2

Emitted after stake is successfully transferred from coldkey to hotkey .

View events on chain
Useful for: stakersvalidatorsdelegatorsanalyticswallets

The Big Picture

Staking is how TAO holders participate in the network. By staking to a hotkey, you earn a share of that hotkey's emissions from the subnets it operates on. This event confirms your stake is active and earning.

Why This Matters

When you stake TAO, you want to know it worked. This event is your confirmation that your stake is now active and earning rewards from the hotkey's subnet activity.

Example Scenario

You have 100 TAO and want to earn rewards. You stake 50 TAO to a validator's hotkey on subnet 1. When the transaction confirms, StakeAdded fires with your coldkey, the validator's hotkey, 50 TAO amount, and subnet 1. Now you'll earn a share of that validator's emissions proportional to your stake.

Common Questions

How soon do I start earning after StakeAdded?
Immediately. Your stake is active from the block this event fires.
Can I stake to any hotkey?
Yes, if they're registered on a subnet. But delegates (validators accepting stake) are the most common choice since they share emissions with stakers.

Use Cases

  • Track when your stake transaction confirms
  • Monitor delegation activity on your validator
  • Build staking analytics dashboards
  • Trigger notifications when stake is added

How to Use This Event

  • Subscribe to your own coldkey to track your staking activity
  • Subscribe to a validator's hotkey to monitor their total stake
  • Index all events to build staking leaderboards

From Chain Metadata

stake has been transferred from the a coldkey account onto the hotkey staking account.

Part of: Stake Operations

Triggers

Preconditions

  • Coldkey has sufficient free balance
  • Hotkey is registered on at least one subnet
  • Amount meets minimum stake requirement
  • Coldkey is authorized to stake to this hotkey

Effects

Postconditions

  • Coldkey balance decreased by stake amount
  • Hotkey's total stake increased
  • Network's TotalStake increased

Side Effects

  • May update alpha stake on subnet
  • May affect validator ranking if staking to validator

Event Data

#NameTypeDescription
0
arg0
→ coldkey
AccountId Staker's cold wallet address (hex -> SS58)
1
arg1
→ hotkey
AccountId Validator's hot wallet address (hex -> SS58)
2
arg2
→ amount_staked
u64 Amount of stake added (RAO)
3
arg3
→ total_stake
u64 New total stake on hotkey (RAO)
4
arg4
→ netuid
u16 Subnet ID
5
arg5
→ alpha_stake
u64 Alpha stake component (RAO)

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 StakeAdded events
api.query.system.events((events) => {
  events
    .filter(({ event }) =>
      event.section === stringCamelCase("SubtensorModule") &&
      event.method === "StakeAdded"
    )
    .forEach(({ event }) => {
      console.log("StakeAdded:", event.data.toHuman());
    });
});

On-Chain Activity

Emission Frequency
●●●●●○ Dominant 5M–50M emissions

Core protocol operations, high volume

#8 most emitted event

As of block 7,429,232

Version History

v101 block 1 2 args
v233 block 4,920,350 5 args
v257 block 5,228,683 6 args Current

Runtime Info

View Source
Pallet Index
7
Event Index
2
First Version
v101
Current Version
v393