Overview
Thenear.staking.pool_balances model provides real-time tracking of staking pool balances and shares based on event logging.
It captures the state of validator pools at each balance-changing event.
This model is updated hourly.
Use Cases
This model is particularly useful for:- Tracking historical stake changes across validators
- Accounting shares to NEAR exchange rates across time
Relationship with Daily Balances
This model serves as the source for thenear.staking.pool_balances_daily model, which provides daily snapshots of staking validator pool balances.
While this model captures real-time events and balance changes, the daily model aggregates this data to provide end-of-day state for each validator pool.
Key differences:
- This model tracks every balance-changing event (delegation events)
- The daily model provides a single snapshot of the last balance entry per day per pool
- This model includes complete transaction tracing
Column Description
Unique Key:unique_id
| Column | Type | Description |
|---|---|---|
| block_timestamp | TIMESTAMP | Timestamp of the block containing the balance update |
| pool_id | VARCHAR | Identifier of the staking pool |
| balance_str | VARCHAR | Pool’s NEAR balance (string format for precision) |
| balance | FLOAT | Pool’s NEAR balance (float format) |
| usd_balance | FLAOT | USD equivalent of the pool’s NEAR balance |
| usd_exchange_rate | FLAOT | NEAR to USD exchange rate at time of update |
| shares_str | VARCHAR | Total shares in the pool (string format) |
| shares | FLAOT | Total number of shares in the pool |
| shares_exchange_rate | FLAOT | Exchange rate between shares and NEAR |
| last_activity_block_timestamp | TIMESTAMP | Timestamp of the pool’s last activity |
| transaction_hash | VARCHAR | Hash of the transaction causing the balance update |
| transaction_index | BIGINT | Index of the transaction within the block |
| receipt_id | VARCHAR | Unique identifier of the receipt |
| receipt_index | BIGINT | Index of the receipt within 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 balance update event |