EIP-160 Gas cost increase for the EXP operation (EXP cost increase)

Final · Fees & gas · EIP status Final · created 2016-10-20

Raises the gas cost charged for the EVM's exponentiation operation (EXP) from 10 to 50 per byte of the exponent. This is a finalized change that took effect with the Spurious Dragon hard fork at block 2,675,000.

Why it is needed

In Ethereum, every operation carries a fee unit called gas. The gas price should be set to match the computing cost a node actually incurs when processing that operation. If an operation is priced far below its real burden, a large computational load can be imposed on every node in the network for only a small fee. According to the original text's Rationale, benchmarks showed that the exponentiation operation EXP was priced about 4 to 8 times too cheaply relative to its actual cost at the time. This EIP raises the portion of EXP's gas cost that scales with exponent size from 10 gas per byte to 50 gas per byte to close that gap. It is an adjustment that brings the operation's price closer to its real cost, so the network is properly compensated for its work.

What changes

Today

After EIP-160

Who is affected

In depth

Cost change specification

Once block.number >= FORK_BLKNUM holds, EXP's gas cost changes from '10 plus 10 per byte of the exponent' to '10 plus 50 per byte of the exponent.' The fixed cost of 10 stays the same, and only the portion proportional to exponent size rises from 10 to 50 per byte. So the larger the exponent, the larger the increase, and the total cost can rise by nearly 5x.

Activation timing and scope

This change was included as part of the Spurious Dragon hard fork. The parameters are FORK_BLKNUM 2,675,000 and CHAIN_ID 1. That is, the new gas rule takes effect on Ethereum mainnet (chain ID 1) starting at block number 2,675,000.

Rationale for the increase

The original Rationale is a single sentence: benchmarks showed EXP was underpriced by roughly 4 to 8 times at the time. When the gas price is lower than the actual cost of an operation, the burden the network bears grows disproportionately to the fee paid by whoever repeatedly calls that operation, so the per-byte cost was raised from 10 to 50 to bring the price closer to the measured cost. The original text gives only the 4 to 8 times range without the benchmark's detailed methodology, and points to the EIP-160 issue linked in References for further discussion.

Document status

The status is Final, and it was written on October 20, 2016. The proposer is Vitalik Buterin. Since this change is already finalized and has been deployed to mainnet, there is no further room for the content to change.

Original EIP · ← EIPs