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.
This table is in beta - As the staking state has to be cumulatively calculated from stake-related actions, we are still working through all the edge cases that affect delegated, active, inactive balances. Our sampling indicates that some balances could be a few percent off at times.
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 | 3jAwbKWs18jRHJ7tnNjz2tw2iU5K2ukQXhCwjzbNg76C |
| action | The staking action performed (e.g. delegate, deactivate, split, merge, etc) | varchar | delegate |
| delegated_stake | Amount of SOL delegated minus rent reserve | float | 499999.99771712 |
| active_stake | Amount of SOL currently earning rewards | float | 0 |
| inactive_stake | Difference between delegated and active stake | float | 499999.99771712 |
| total_rewards | Cumulative rewards earned by the stake account | float | 0 |
| delegated_vote_account | Validator vote account address that the stake is delegated to | varchar | 7UKUPLwLrV7iLqL5ndTzYDav73mpoMxKjyM7EjMExTaw |
| last_activation_epoch | The most recent epoch when the stake was activated | number | 90 |
| last_deactivation_epoch | The most recent epoch when the stake was deactivated | number | |
| activation_status | Current status of the stake account | varchar | activating |
| epoch | The epoch when this record was created | number | 90 |
| action_info | Additional info about the action (JSON/variant) | variant | {"vote_account": "7UKUPLwLrV7iLqL5ndTzYDav73mpoMxKjyM7EjMExTaw"} |
| block_slot | Block slot of the action | number | 38883476 |
| block_height | Block height of the action | number | |
| block_timestamp | Block timestamp of the action | timestamp_ntz | 2020-10-03 16:02:39.000 |
| block_hash | Block hash of the action | varchar | 6MNp2RRKbbqsFBAVE3RmCPJXYPmH4xrzKAEBv8juZJS |
| txn_id | Transaction ID of the action | varchar | 3BkjfR1YNNTzRwEXAsNhtAUMECVGoRKTeQVqFk1GsmgiVRVyrDaSUtAyxqkRjqYLPWa76XVUjZEaKpkX3TBbmiaD |
| txn_index | Transaction index within the block | number | 147 |
| instruction_index | Instruction index within the transaction | number | 0 |
| inner_instruction_index | Inner instruction index within the instruction | number | |
| pseudo_global_order | Global ordering number for the record | number | 38883476000147000001000000 |
| pre_tx_amount | Stake account balance before the transaction (string) | varchar | 500000 |
| post_tx_amount | Stake account balance after the transaction (string) | varchar | 500000 |
| unique_id | Unique identifier for the record | varchar | stake_account-3jAwbKWs18jRHJ7tnNjz2tw2iU5K2ukQXhCwjzbNg76C_block_slot-38883476_txn_id-3BkjfR1YNNTzRwEXAsNhtAUMECVGoRKTeQVqFk1GsmgiVRVyrDaSUtAyxqkRjqYLPWa76XVUjZEaKpkX3TBbmiaD_i_index-0_ii_index-null |