1

Looking at the ethereum.org page on Gas I see that post-London upgrade base fees are calculated according to the size of the previous block relative the target gas limit of 15 million. Then I read:

The amount by which the base fee is adjusted is proportional to how far the current block size is from the target.

Proportional how exactly? What is the explicit formula?

Note: I tried multiplying the baseFee by .98 in the case of a block that was -2% under the target but that did not produce the baseFee given in the next block. Is there a constant here that I am missing?

1

1 Answer 1

0

target = 15 million

gasLimit = 2 * target = 30 million (this is the max gas that can be used per block)

gasUsed = total gas used per block

If gasUsedRatio (gasUsed/gasLimit) is 70%, then baseFee will increase by abs(70%-50%)/4 = 5%. If gasUsedRatio is 42%, then baseFee will decrease by abs(42%-50%)/4 = 2%.

4 is a factor specific to Ethereum. Number will change for each chain.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.