EIP-698 Block reward lookup opcode (OPCODE 0x46 BLOCKREWARD)

No call decision · EVM & execution · EIP status Stagnant · created 2017-08-28

Adds a new opcode 0x46 BLOCKREWARD to the EVM, allowing smart contracts to directly look up the reward (including base reward, uncle rewards, and gas) received by a finalized block.

Why it is needed

Structures where multiple participants share rewards, such as mining pools or staking pools, or contracts that issue tokens based on block rewards, need to know the actual reward received by a specific block. However, the current EVM has no way to look up this value directly, forcing reliance on external oracles or off-chain computation results. This is an obstacle to distributing pool rewards in a trust-minimized way or to creating tokens tied to block rewards (merge-mined tokens). Additionally, since EIP-649 plans for block rewards to be periodically reduced going forward, the need for a way to check this value directly on-chain has grown.

What changes

Today

After EIP-698

Who is affected

In depth

Opcode specification

The new opcode has value 0x46 and mnemonic BLOCKREWARD. It removes no values from the stack (δ=0) and adds one block reward value to the stack (α=1). The gas cost is G_base, and the operation is defined as μ'_s[0] ≡ I_HR. In other words, executing it simply places the current block's reward value on top of the stack.

Composition of the return value

The value returned by BLOCKREWARD is the reward of a finalized block, which includes the base block reward, uncle block payouts, and gas fees all together.

Added to the existing block information opcode family

The EVM's 0x40-range opcodes are reserved for returning block information, and already include BLOCKHASH (0x40), COINBASE (0x41), TIMESTAMP (0x42), NUMBER (0x43), DIFFICULTY (0x44), and GASLIMIT (0x45). This EIP assigns the next number, 0x46, to BLOCKREWARD.

Motivation for mining pool reward distribution

Mining pools and staking pools divide rewards according to participant contributions. B is the block reward after pool fees, and p is the probability of finding a block with a single share submission (p=1/D, where D is difficulty). Representative distribution methods are pay-per-share (R=B*p), proportional distribution (R=B*(n/N), where n is the participant's share count and N is the total shares in the round), and pay-per-last-N-shares (same formula but N is calculated over the most recent N shares rather than the whole round). All of these methods require knowing the exact block reward B, which BLOCKREWARD allows looking up in a trust-minimized way.

Motivation for merge-mined tokens

A contract could call BLOCKREWARD to design a merge-mined token that variably mints an amount of tokens proportional to the block reward.

Relationship with EIP-649

EIP-649 plans a roadmap under which block rewards periodically decrease or change. This EIP is consensus system agnostic and is useful for any contract that needs to know the block reward value, such as decentralized pool operation or merge-mined tokens.

Backward compatibility and introduction method

Existing deployed contracts are not affected. However, since existing clients that cannot process 0x46 would treat transactions and blocks containing this opcode as invalid, it must be introduced via a coordinated hard fork. This proposal's current status is Stagnant, and the source shows no further progress or concrete implementation since it was written on 2017-08-28.

Original EIP · ← EIPs