EIP-8059 · Draft · Core · 2025-10-22
EIP-8059: Gas Units Rebase for High-precision Metering
Multiplies every gas cost, limit and price-related variable by 1000 so cheap opcodes can be priced precisely without fractional gas.
What problem does it solve?
Gas is an integer, and the cheapest opcodes already cost 1–3 gas. Benchmarks show compute opcodes like ADD or MUL are now overpriced relative to state access (SSTORE, SLOAD, CREATE), which keeps getting slower as state grows.
Repricing hits a wall:
- Make compute cheaper (EIP-7904), and many opcodes would "want" to cost a fraction of 1 gas but get rounded up, wasting block capacity. The spec's analysis puts the average rounding error near 59 % at a 50 Mgas/s anchor.
- Raise everything else so the cheapest op is 1 gas, and state operations become so expensive that throughput collapses at current limits.
Fractional gas would fix it but complicates every gas calculation.
How it works
Introduce REBASE_FACTOR = 1000 and, at the fork, multiply all gas-related parameters and variables by it: opcode costs, intrinsic costs, the block gas limit and target, transaction gas limits, and so on. Nothing changes in relative terms, but there are three extra decimal digits of precision for future repricings.
At the fork boundary, the base-fee calculation is updated so the parent block's gas_used and base_fee_per_gas are also scaled by the factor, letting the fee market carry on across the switch.
Why 1000: it is large enough to remove rounding error even at much higher throughput targets, and easy to reason about: block limits move from millions to billions and opcode costs from units to thousands.
Sample code
Illustrative before/after (numbers are today's values × 1000, not a final schedule):
before after rebase
ADD 3 3_000
SLOAD (warm) 100 100_000
tx intrinsic 21_000 21_000_000
block gas limit 60_000_000 60_000_000_000
# a later compute repricing could then set
ADD -> 250 # i.e. 0.25 "old" gas, impossible before
Fork-boundary base fee step (pseudocode):
if block.number == FORK_BLOCK:
parent_gas_used *= REBASE_FACTOR
parent_base_fee_per_gas *= REBASE_FACTOR # as stated in the spec
base_fee = calculate_base_fee_per_gas(parent_gas_used, parent_base_fee_per_gas, ...)
Things to know
- Status is Draft; the spec is short and leaves the full list of affected parameters implicit ("all gas-related"). It also does not spell out how wei-per-gas prices (base fee, priority fees) relate to the new unit, so wallets and fee estimators should wait for that detail.
- Every tool that hardcodes gas numbers (
21000, gas estimates,gasleft()thresholds in contracts) would need review. Contracts that forward a fixed gas amount are a particular concern. - The spec notes block headers grow by about 2 bytes because
gasLimitandgasUsedget larger. - It is an enabler for repricing efforts such as EIP-7904, EIP-8032, EIP-8037 and EIP-8038, not a repricing by itself.