> ## Documentation Index
> Fetch the complete documentation index at: https://docs.allium.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Balances Daily

> Daily snapshot of validator balances on the Beacon Chain (UTC end-of-day).

The `beacon.raw.balances_daily` table provides daily snapshots of validator balances on the Beacon Chain. Each row is one validator’s state for a given day: the snapshot is taken at the **last slot of the calendar day in UTC** (for example `2026-03-28 23:59:59.000` on `slot_timestamp`).

### Use Cases

**Daily accounting and reconciliation**: Build per-validator daily balances and roll up to network-level metrics.

**Performance tracking**: Compare `balance` or `raw_balance` across consecutive days for income, slashing, and withdrawal-related changes.

**Network health analysis**: Aggregate by day to study total staked ETH, validator counts by `status`, and participation over time.

### Table Columns

Clustering Key: `slot_timestamp` (daily snapshot boundary)

Search Optimization: `validator_index`

Unique Key: `unique_id`

| Column Name                    | Description                                                                                                                                        |
| ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| slot\_number                   | Beacon Chain slot number for the end-of-day snapshot.                                                                                              |
| slot\_timestamp                | Timestamp of that slot (UTC), typically **23:59:59** on the snapshot calendar day.                                                                 |
| validator\_index               | Index of the validator in the Beacon validator registry.                                                                                           |
| raw\_balance                   | Validator balance as an integer in **gwei** (1e9 gwei = 1 ETH).                                                                                    |
| balance                        | Validator balance in **ETH** (float).                                                                                                              |
| effective\_balance             | Effective balance at stake in **ETH** (used for reward and penalty calculations).                                                                  |
| raw\_effective\_balance        | Effective balance at stake in **gwei**.                                                                                                            |
| status                         | Validator status (for example `active_ongoing`, `withdrawal_done`, `exited_unslashed`, `exited_slashed`, `pending_queued`, `pending_initialized`). |
| pubkey                         | Validator BLS public key (48 bytes, hex with `0x` prefix).                                                                                         |
| withdrawal\_credentials        | 32-byte withdrawal credentials from the deposit (hex).                                                                                             |
| withdrawal\_prefix             | Credential type prefix (for example `0x01` for execution / address withdrawals).                                                                   |
| withdrawal\_address            | Execution-layer withdrawal address when applicable (hex).                                                                                          |
| slashed                        | Whether the validator has been slashed.                                                                                                            |
| activation\_eligibility\_epoch | Epoch when the validator became eligible for activation.                                                                                           |
| activation\_epoch              | Epoch when the validator was activated.                                                                                                            |
| exit\_epoch                    | Epoch when the validator exited or will exit (`18446744073709551615` means “not set” / far future in consensus encoding).                          |
| withdrawable\_epoch            | Epoch when balance becomes withdrawable (same sentinel applies when not applicable).                                                               |
| execution\_optimistic          | Execution optimistic flag when present; may be empty depending on upstream payload metadata.                                                       |
| finalized                      | Whether the beacon data for this row is finalized.                                                                                                 |
| unique\_id                     | Stable row id, for example `date-2026-03-28-validator_index-2067035`.                                                                              |
| \_created\_at                  | When this row was written in Allium.                                                                                                               |
| \_updated\_at                  | When this row was last updated in Allium.                                                                                                          |

### Sample Queries

#### Query 1: Daily network-wide staking metrics (UTC days)

```sql theme={null}
select
    date(slot_timestamp) as snapshot_day,
    count(*) as total_validators,
    sum(balance) as total_balance_eth,
    sum(effective_balance) as total_effective_balance_eth,
    avg(balance) as avg_balance_per_validator,
    countif(status = 'active_ongoing') as active_validators
from beacon.raw.balances_daily
group by snapshot_day
order by snapshot_day desc
limit 30
```

#### Query 2: Individual validator balance history

```sql theme={null}
select
    date(slot_timestamp) as snapshot_day,
    balance,
    effective_balance,
    status,
    balance - lag(balance) over (partition by validator_index order by slot_timestamp) as daily_balance_change_eth
from beacon.raw.balances_daily
where validator_index = 12345
order by snapshot_day desc
limit 90
```

#### Query 3: Rows where validators are slashed

```sql theme={null}
select
    date(slot_timestamp) as snapshot_day,
    validator_index,
    pubkey,
    balance,
    effective_balance,
    status
from beacon.raw.balances_daily
where slashed = true
order by snapshot_day desc
```
