Staking
Events
Detailed tracking of staking-related events on NEAR Protocol
Overview
The near.staking.events
model captures all staking-related events from validator pools, tracking deposits, staking, unstaking, and withdrawals.
Events are extracted from receipt event logs.
This model is updated hourly.
Event Types
A typical staking event flows in the following order:
- Deposit: Initial transfer of NEAR tokens to the staking pool
- Staking: Conversion of deposited NEAR to staking shares
- Unstaking: Withdrawal of NEAR from active staking
- Withdrawal: Final transfer of unstaked NEAR back to delegator
When a delegator stakes NEAR with a validator, they receive staking shares in return.
These staking shares can be redeemed for NEAR at any time. The exchange rate between NEAR and staking shares is tracked in the near.staking.shares_exchange_rate
model.
Column Description
Unique Key: unique_id
Column | Type | Description |
---|---|---|
block_timestamp | TIMESTAMP_NTZ(9) | Timestamp of the block containing the event |
event_type | VARCHAR | Type of staking event (deposit, staking, unstaking, withdraw) |
delegator_id | VARCHAR | Identifier of the delegator involved in the event |
pool_id | VARCHAR | Identifier of the staking pool involved |
amount_str | VARCHAR | Amount of NEAR involved in the event (string format for precision) |
amount | FLOAT | Amount of NEAR involved in the event (float format) |
usd_amount | FLOAT | USD equivalent of the NEAR amount |
usd_exchange_rate | FLOAT | NEAR to USD exchange rate at event time |
unstaked_balance_str | VARCHAR | Unstaked NEAR balance after the event (string format) |
unstaked_balance | FLOAT | Unstaked NEAR balance after the event (float format) |
staking_shares_str | VARCHAR | Staking shares involved in the event (string format) |
shares_exchange_rate | VARCHAR | Shares to NEAR exchange rate at event time (string format) |
signer_id | VARCHAR | Account that signed the transaction |
transaction_hash | VARCHAR | Unique hash of the transaction |
transaction_index | BIGINT | Index of the transaction in the block |
receipt_id | VARCHAR | Unique identifier of the receipt |
receipt_index | BIGINT | Index of the receipt in the block |
receipt_outcome_index | BIGINT | Index of the receipt outcome |
log_index | BIGINT | Index of the log within the receipt |
pseudo_global_index | BIGINT | Global ordering index |
unique_id | VARCHAR | Unique identifier for the event |