This is a proposal to implement a greatly simplified transaction fee reform mechanic that is intended to have similar (though slightly less optimal) effects to EIP 1559 but at ~1/5 the implementation complexity.
Parameters
-
ADJUSTMENT_COEFFICIENT
: 8
Protocol changes
- We interpret a particular storage slot in the state (eg. as storage key 0 of address 0x0100) as the
BASEFEE
. "SetBASEFEE
" means to SSTORE to that storage slot, and when usingBASEFEE
in equations we mean toSLOAD
from that storage slot to read the value. - At the start of processing block
FORK_BLKNUM
, setBASEFEE
to 1 - Let
diff = block.gas_used - block.gas_limit // 2
. At the end of processing a block:- After applying block rewards and fees, reduce the minerâs balance by
BASEFEE * block.gas_used
. If the resulting balance would be below zero, the block is invalid. - If
diff > 0
, setBASEFEE += max(1, BASEFEE * diff // block.gas_limit // ADJUSTMENT_COEFFICIENT)
- If
diff < 0
andBASEFEE > 1
, setBASEFEE -= max(1, BASEFEE * abs(diff) // block.gas_limit // ADJUSTMENT_COEFFICIENT)
- After applying block rewards and fees, reduce the minerâs balance by
Rationale
Currently, miners generally have some internal mingasprice
, and accept any transactions with tx.gasprice >= mingasprice
, accepting the highest-fee transactions if there are more than enough transactions available to fill the block. The mingasprice
reflects the minerâs cost in processing the transaction and the marginal increment that the transaction adds to the risk that the block will not propagate quickly enough to join the main chain.
The ârationalâ mingasprice
has been calculated to be about 0.8 gwei (uncle blocks lose ~0.33 ETH = 330m gwei, 10 million gas blocks add ~0.025 to the uncle rate over empty blocks, so expected cost of 1 gas = 330m / 10m * 0.025 = 0.825 gwei) and miners do actually set about this value (see table at the bottom of the ethgasstation page).
This mechanism adds a fee that miners are required to pay (that gets burned), which adjusts their interests so that they will want to set their mingasprice
dynamically, to equal the BASEFEE
plus 1 gwei (client devs can just set miner settings so they do this automatically without needing to change anything). Users can now send transactions setting a gasprice of the current headâs BASEFEE (which will be correct for the next block) + 1-2 gwei, and get a high likelihood that their transactions will be included in the next block, without needing to do complex calculations based on recent fees and mempool stats to compute fees and even then only getting included a few blocks later. Hence, most of the simplicity gains of full-on EIP 1559 carry over, though during spikes users may need to set higher fees as they do now to ensure their transactions get included quickly.