Staking
Staking Balances
The solana.staking.balances
table contains the historical staking numbers for each stake_account
. The data is reconstructed by indexing instructions to the stake
program, specifically initialize
, delegate
, withdraw
, deactivate
, split
, merge
and deactivateDelinquent
. In addition, rewards disbursed at each epoch are also included in this table as it affects the delegated stake amount.
Stake Actions
Each row in this table reflects an action
taken on a stake_account, and the resultant state of the account after said action. These are the types of stake actions tracked:
Action | Description |
---|---|
initialize | Creates a new stake account. This is the first action required before any staking operations can occur. Sets up the initial parameters including staker and withdrawer authorities. |
delegate | Stakes tokens to a validator’s vote account. |
deactivate | Initiates the deactivation of an active stake account. |
delinquent_vote_account_deactivate | A special deactivation triggered by another account when a validator becomes delinquent. This forces deactivation of stakes delegated to problematic validators. |
withdraw | Removes unstaked tokens from a stake account. |
merge_source | Represents the source stake account in a merge operation. This account will be emptied and closed after merging into the destination. |
merge_destination | Represents the destination stake account in a merge operation. This account receives the delegated stake from the merge source account. |
split_source | The original stake account that is being split. Its delegated amount is reduced by the split amount. |
split_destination | A newly created stake account that receives a portion of the split_source’s stake. Inherits the same validator delegation as the source. |
rewards | Represents staking rewards being distributed to the stake account. Increases the delegated amount by the reward amount. |
Table columns
Column Name | Description | Type | Example |
---|---|---|---|
stake_account | The address of the stake account | varchar | 7xLk17EQQ5KLDLDe44wCmupJKJjTGd8hs3eSVVhCx932 |
action | Type of staking action performed | varchar | delegate |
delegated_stake | Amount of SOL delegated minus rent reserve. Includes both active and deactivating stakes | float | 100.5 |
active_stake | Amount of SOL currently earning rewards | float | 95.5 |
inactive_stake | Difference between delegated and active stake (represents deactivating/activating amounts) | float | 5.0 |
total_rewards | Cumulative rewards earned by the stake account | float | 2.45 |
delegated_vote_account | Validator vote account address that the stake is delegated to | varchar | 26pV97Ce83ZQ6Kz9XT4td8tdoUFPTng8Fb8gPyc53dJx |
last_activation_epoch | The most recent epoch when the stake was activated | bigint | 280 |
last_deactivation_epoch | The most recent epoch when the stake was deactivated (null if currently active) | bigint | 275 |
activation_status | Current status of the stake account | varchar | active |
epoch | The epoch when the action occurred. Epoch is calculated with floor(block_slot/432000) | bigint | 282 |
action_info | Additional details about the staking action in JSON format | variant | {"destination":"6wKJm2xYoNYbAaCZFLaPRthr5iRMxwPuF2dC5kZvBDpX","lamports":"16835237545","withdraw_authority":"6wKJm2xYoNYbAaCZFLaPRthr5iRMxwPuF2dC5kZvBDpX"} |
block_slot | Slot number where the transaction occurred | bigint | 150000000 |
block_timestamp | Timestamp of the block | timestamp | 2024-03-20 10:00:00 |
txn_id | Transaction signature/hash | varchar | 2Rinn7xHXweFbuxuJKyeKdYznatLatNRSq9gF8oteEYPBp6yHpUanBNBmKJoPHZV3EdqvDzeRedTt3NpsqmiLWDn |
pseudo_global_order | Global ordering of instructions for sequencing | bigint | 205156998000296000001000000 |
pre_tx_amount | Normalized stake amount before the transaction | varchar | 100.5 |
post_tx_amount | Normalized stake amount after the transaction | varchar | 105.5 |
unique_id | Unique identifier for the record | varchar | stake_account-8yKiYWWBVWMj5NzEnhAPbtKDZFEMwWzENT3v9oHbnRy4_block_slot-205156998_txn_id-2Rinn7xHXweFbuxuJKyeKdYznatLatNRSq9gF8oteEYPBp6yHpUanBNBmKJoPHZV3EdqvDzeRedTt3NpsqmiLWDn_i_index-0_ii_index-null |