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:

  1. Deposit: Initial transfer of NEAR tokens to the staking pool
  2. Staking: Conversion of deposited NEAR to staking shares
  3. Unstaking: Withdrawal of NEAR from active staking
  4. 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

ColumnTypeDescription
block_timestampTIMESTAMP_NTZ(9)Timestamp of the block containing the event
event_typeVARCHARType of staking event (deposit, staking, unstaking, withdraw)
delegator_idVARCHARIdentifier of the delegator involved in the event
pool_idVARCHARIdentifier of the staking pool involved
amount_strVARCHARAmount of NEAR involved in the event (string format for precision)
amountFLOATAmount of NEAR involved in the event (float format)
usd_amountFLOATUSD equivalent of the NEAR amount
usd_exchange_rateFLOATNEAR to USD exchange rate at event time
unstaked_balance_strVARCHARUnstaked NEAR balance after the event (string format)
unstaked_balanceFLOATUnstaked NEAR balance after the event (float format)
staking_shares_strVARCHARStaking shares involved in the event (string format)
shares_exchange_rateVARCHARShares to NEAR exchange rate at event time (string format)
signer_idVARCHARAccount that signed the transaction
transaction_hashVARCHARUnique hash of the transaction
transaction_indexBIGINTIndex of the transaction in the block
receipt_idVARCHARUnique identifier of the receipt
receipt_indexBIGINTIndex of the receipt in the block
receipt_outcome_indexBIGINTIndex of the receipt outcome
log_indexBIGINTIndex of the log within the receipt
pseudo_global_indexBIGINTGlobal ordering index
unique_idVARCHARUnique identifier for the event