> ## 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.

# Block Rewards

> Retrieve block reward info for blocks proposed on Ethereum.

The `ethereum.raw.block_rewards` model provides enriched block-level data of the various types of protocol-level rewards to the miners (block builder) and block proposers (validator), pre and most-merge.

<Info>
  Update: 2024-05-20

  * This table is updated to include pre-merge block-level rewards.
  * All columns with ETH values (rewards) in this table are kept in string format to retain precision.
</Info>

Block-level ETH rewards on Ethereum can be separated into various types:

* **Miner (block builder)**
  * Pre-merge
    * Block rewards from protocol emissions.
      * For each block, the miner is rewarded with a finite amount of Ether on top of the fees paid.
    * Uncle rewards
      * Uncles reward is valid but rejected as it is not on the longest chain which is the working mechanism of the blockchain.
  * Transaction priority fee
  * Direct transfers from transaction senders to block builder
* **Proposer (MEV post-merge)**
  * Amount of MEV reward received by the block proposer, and the corresponding index of the validator that proposed the block
  * MEV rewards are identified using the following logic:
    * If the last transaction of the block is sent from the block builder (miner), this is assumed to be an MEV payout
    * If the last transaction of the block is sent to the withdrawal address of the validator that proposed the block, this is also captured as an MEV payout
  * Example: [https://etherscan.io/block/19900222#mevinfo](https://etherscan.io/block/19900222#mevinfo)

### Sample Query

Examine block-level rewards by reward type on Ethereum over time.

```sql theme={null}
select
    date_trunc('week', block_timestamp) as date,
    sum(block_reward) as block_reward,
    sum(uncles_reward) as uncles_reward,
    sum(builder_priority_fee_reward) as builder_priority_fee_reward,
    sum(builder_direct_reward) as builder_direct_reward,
    sum(proposer_mev_reward) as proposer_mev_reward
from ethereum.raw.block_rewards
group by all
```

### Table Columns

Unique key: `block_number`

| Column Name                    | Description                                                                                                                                           | Example                                                                                                                                                                                                                                                                  |
| ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| block\_number                  | The block number.                                                                                                                                     | 17,828,815                                                                                                                                                                                                                                                               |
| block\_timestamp               | The unix timestamp for when the block was collated.                                                                                                   | 2023-08-02 17:30:47                                                                                                                                                                                                                                                      |
| has\_block\_reward             | Boolean flag indicating that there is a block reward pre-merge.                                                                                       | FALSE                                                                                                                                                                                                                                                                    |
| block\_reward                  | Amount of block rewards to the miner in ETH.                                                                                                          | 0                                                                                                                                                                                                                                                                        |
| has\_uncle\_reward             | Boolean flag indicating that there is a uncle reward pre-merge.                                                                                       | FALSE                                                                                                                                                                                                                                                                    |
| uncles\_reward                 | Amount of block uncle rewards in ETH. Note that it is possible to have more than one uncles rewards recipient.                                        | 0                                                                                                                                                                                                                                                                        |
| uncles\_reward\_transactions   | The trace level transfers to the uncles reward recipient wrapped in JSON.                                                                             | NULL                                                                                                                                                                                                                                                                     |
| base\_fee\_burnt               | ETH burnt from base fee gas amount.                                                                                                                   | 0.4084471863                                                                                                                                                                                                                                                             |
| builder\_priority\_fee\_reward | Priority fee (tips) to the block builder (miner) recipient address.                                                                                   | 0.02960400525                                                                                                                                                                                                                                                            |
| builder\_direct\_reward        | Direct ETH transfers rewarded to the block builder (miner) in the block.                                                                              | 0.0002492600004                                                                                                                                                                                                                                                          |
| builder\_address               | Block builder (miner) address.                                                                                                                        | 0xdafea492d9c6733ae3d56b7ed1adb60692c98bc5                                                                                                                                                                                                                               |
| builder\_direct\_transactions  | Array of direct ETH transactions to the block producer in the block, assumed to be builder's direct rewards.                                          | `[{"amount":"0.000249260000412","eth_from_address":"0x0c3de458b51a11da7d4616f42f66c861e3859d3e","transaction_from_address":"0x26fd09c8b44af53df38a9bad41d5abc55a1786af","transaction_hash":"0xf766b52...","transaction_to_address":"0x0c3d...","usd_amount":"0.45555"}]` |
| has\_mev\_reward               | Boolean flag indicating whether there is an MEV reward, sent from the miner to the block proposer fee recipient in the last transaction of the block. | TRUE                                                                                                                                                                                                                                                                     |
| proposer\_mev\_reward          | Proposer's MEV reward sent from the block builder.                                                                                                    | 0.02926816803                                                                                                                                                                                                                                                            |
| proposer\_fee\_recipient       | Block proposer fee recipient address.                                                                                                                 | 0x388c818ca8b9251b393131c08a736a67ccb19297                                                                                                                                                                                                                               |
| proposer\_payout\_transaction  | Proposer's MEV reward payout transaction.                                                                                                             | 0x4186fa75972f93882acf7c9630eaee05c21132fba8d97a0826dc78b1e1cf1464                                                                                                                                                                                                       |
| l1\_gas\_used                  | L1 gas used.                                                                                                                                          | 15,435,342                                                                                                                                                                                                                                                               |
| l1\_gas\_limit                 | L1 gas limit of the block.                                                                                                                            | 30,000,000                                                                                                                                                                                                                                                               |
| l1\_extra\_data                | L1 extra data.                                                                                                                                        | 0x496c6c756d696e61746520446d6f63726174697a6520447374726962757465                                                                                                                                                                                                         |
| l1\_block\_hash                | L1 block hash.                                                                                                                                        | 0x69b5ed627b2a16c7e13446b6cab4159ef1e850a4f9d64b66a31225d2e24b4d2f                                                                                                                                                                                                       |
| slot\_number                   | Beacon Chain slot number.                                                                                                                             | 7,014,452                                                                                                                                                                                                                                                                |
| epoch                          | Beacon Chain epoch number.                                                                                                                            | 219,201                                                                                                                                                                                                                                                                  |
| proposer\_index                | Validator Index of the block proposer on Beacon Chain.                                                                                                | 277,565                                                                                                                                                                                                                                                                  |
| pubkey                         | Pubkey of the validator proposing this block.                                                                                                         | 0xb7be38a5fcc9400c3c4b7dace7c0ae75ca76d47ce0e8de5177e38786b8bf71c5b03889ab3c4c436b731f4df01f398b78                                                                                                                                                                       |
| graffiti                       | 32-byte field of arbitrary data included by the block proposer.                                                                                       | 0x0000000000000000000000000000000000000000000000000000000000000000                                                                                                                                                                                                       |
