EIP-8037 gas reservoir

Glamsterdam · EIP-8037

Repricing of state gas vs execution gas

Step through the three assumptions this breaks, with a small transaction and a big one.

Assumption
tx.gas
Intrinsicgas_left, capped at 16,777,216State-gas reservoir

The rules behind it

  1. At the start, up to 16,777,216 of tx.gas (after intrinsic gas) becomes gas_left. The rest goes into the reservoir.
  2. Execution gas is paid from gas_left only.
  3. State gas is paid from the reservoir first, then from gas_left.
  4. When a state creation is undone, its gas is refilled last in, first out: back into gas_left first, up to what was taken from it.
  5. gasleft() returns gas_left only. The 63/64 rule applies to gas_left only; a callee borrows the whole reservoir.

What pays from which pool

OperationExecution gasState gas
Reading state (SLOAD, BALANCE, EXTCODE*, cold access)All of it0
Changing or clearing an existing slotAll of it0
New storage slot (zero to non-zero)The access part64 B × 1,530 = 97,920
ETH to an address that doesn't exist yetThe normal call part120 B × 1,530 = 183,600
Deploy (CREATE, CREATE2)Constructor, code hashing, access183,600 + 1,530 per code byte
EIP-7702 authorisationCalldata, ecrecover, access35,190 (+183,600 if the account is empty)
Logs, memory, compute, precompiles, calldataAll of it0

Based on EIP-8037 as of October 2026. The EIP is in last call and paused after a security finding, so details can change before mainnet. Scenario 2 is an illustration built from the spec text, not a description of a specific exploit.