StakeAdded

Event v101 → v219, v233 → v252, v257 → v277, v290 → v292, v297 → v298, v301 → v385, v391 → 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

Migration Notes

v219 v233 Breaking

arg1 changed from u64 to AccountId; added field arg2 (u64); added field arg3 (u64); added field arg4 (u16)

Update decoders: SCALE encoding is positional, so any signature change (added, removed, or type-changed fields, or storage shape changes) shifts byte offsets and existing decoders will misparse this item. Re-derive types from the new metadata.

v252 v257 Breaking

added field arg5 (u64)

Update decoders: SCALE encoding is positional, so any signature change (added, removed, or type-changed fields, or storage shape changes) shifts byte offsets and existing decoders will misparse this item. Re-derive types from the new metadata.

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 Coldkey funding the stake (or destination coldkey on transfer) (hex -> SS58)
1
arg1
→ hotkey
AccountId Hotkey receiving the stake (or destination hotkey on transfer) (hex -> SS58)
2
arg2
→ tao_amount
u64 TaoBalanceTAO leg in RAO. Real stake: gross TAO requested by the user (pre-fee). In-subnet transfer: synthetic TAO equivalent at current AMM price. NOT amount_paid_in (post-fee).
3
arg3
→ alpha_received
u64 AlphaBalanceAlpha delivered to the staker by THIS operation, in alpha-RAO. V2-invariant swap output for real stake; share-pool credit on transfer. Per-operation delta, NOT a cumulative Alpha((coldkey, hotkey, netuid)) total.
4
arg4
→ netuid
u16 NetUidSubnet ID
5
arg5
→ fee_paid_tao
u64 Swap fee in TAO RAO (PaidIn=TAO for swap_tao_for_alpha), truncated from TaoCurrency. Always 0 for in-subnet transfers (no AMM swap occurs).

Code Examples

import { createClient, Binary } from "polkadot-api";
import { getWsProvider } from "polkadot-api/ws";
import { sub } from "@polkadot-api/descriptors"; // generated by: npx papi add sub -w wss://entrypoint-finney.opentensor.ai:443

const client = createClient(getWsProvider("wss://entrypoint-finney.opentensor.ai:443"));
const api = client.getTypedApi(sub);

// Subscribe to StakeAdded events
client.finalizedBlock$.subscribe(async (block) => {
  const events = await api.event.SubtensorModule.StakeAdded.get(block.hash);
  for (const evt of events) {
    console.log("StakeAdded:", evt.payload);
  }
});

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
v290 block 5,947,548 6 args
v297 block 6,067,943 6 args
v301 block 6,205,194 6 args
v391 block 7,782,857 6 args Current

Runtime Info

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