EIP-1559 is well-known as a standard related to Ethereum's gas fees. This fee system is also often applied to other EVM chains.
Optimism, an EVM-equivalent chain that aims to eventually be equivalent to Ethereum, has implemented a gas fee system based on EIP-1559 with its recent Bedrock upgrade.
Additionally, this blog article announces that Optimism will execute the Canyon hard fork. This hard fork plans to apply EIPs included in Ethereum's Shanghai hard fork, and also make changes to parameters related to EIP-1559.
The goal of this article is to briefly review the specifications of EIP-1559 and understand how these parameter changes will specifically impact the system.
A transaction pricing mechanism that includes fixed-per-block network fee that is burned and dynamically expands/contracts block sizes to deal with transient congestion.
Quote from “EIP-1559: Fee market change for ETH 1.0 chain”
Before implementing EIP-1559, users submitted transactions by setting a gas price for the transaction they were submitting. The actual transaction fee paid is the product of the consumed gas and the gas price.
Miners could maximize their profits by executing transactions in the order of those with higher gas prices (Note). Of course, it wasn't prohibited by the protocol to execute transactions with obviously low gas prices.
However, this specification had mainly two problems regarding the user experience:
The variation in gas fees paid by users could be significant.
Transactions could take a long time to be approved.
Since Ethereum has the same block size and these blocks get filled up due to demand, such problems occur. To address this, the introduced idea was to absorb temporary demand fluctuations by varying block capacity.
Note: This description is not precisely correct, but this blog article does not address the algorithm, so it will not be discussed.
A characteristic parameter in EIP-1559 is the base fee. Ethereum sets a target capacity for its blocks, and if a block exceeds this target capacity, the base fee for the next block increases, and if it is below, it decreases. Transactions that specify a gas price below the base fee of a certain block will not be executed in that block. The base fee is burned and cannot be received by anyone.
Additionally, transactions must specify a 'priority fee' parameter. This is the gas price that miners (before The Merge) receive.
From these specifications, users can process transactions quickly if they set a sufficiently high gas price and a small priority fee (about 0.1 Gwei after The Merge), while the network adjusts to an appropriate level. The gas price at this time is the sum of the base fee and the priority fee.
As mentioned at the beginning, the OP mainnet also adopts a fee system based on EIP-1559. However, some parameters are different. The differences are documented here.
Block gas limit is the maximum capacity of a block, and block gas target is the target capacity of a block. The ratio of these two is expressed by a parameter called EIP-1559 elasticity multiplier. While Ethereum has this value set to 2, OP mainnet has it set to 6. This situation can be illustrated with a schematic diagram.
Then, EIP-1559 denominator is a parameter that relates to the magnitude of changes in the base fee for the next block. From this and the EIP-1559 elasticity multiplier, you can calculate the Maximum base fee increase (per block) and Maximum base fee decrease (per block). An example of this calculation is shown below.
First, let's look at an example calculation for Ethereum. The value of Ethereum's EIP-1559 denominator is 8, so its reciprocal is 1/8 = 0.125. If the block capacity is below the target, the base fee for the next block decreases, so the Maximum base fee decrease (per block) is simply 0.125·1 = 12.5%. And since the EIP-1559 elasticity multiplier is 2, considering an increase in the base fee for the next block when the block capacity exceeds the target, the Maximum base fee increase (per block) is 0.125·(2-1) = 12.5%.
Next, let's look at an example calculation for the OP mainnet. The value of the OP mainnet's EIP-1559 denominator is 50, so its reciprocal is 1/50 = 0.02. If the block capacity is below the target, the base fee for the next block decreases, so the Maximum base fee decrease (per block) is simply 0.02·1 = 2%. And since the EIP-1559 elasticity multiplier is 6, considering an increase in the base fee for the next block when the block capacity exceeds the target, the Maximum base fee increase (per block) is 0.02·(6-1) = 10%.
Thus, a larger value of the EIP-1559 denominator seems to make the variation in the base fee more moderate. However, since the block generation interval on the OP Mainnet is 2 seconds, which is 1/6 of that of Ethereum, the rate of increase in the base fee per unit time can be very fast when the demand for block space is high.
If the block capacity is fully used for 1 minute, the base fee in Ethereum only increases by 1.8 times, but on the OP Mainnet, it increases by more than 17 times. This has made it more likely for submitted transactions to get stuck, especially during times when there is a temporary, sharp increase in demand.
Therefore, in the Canyon hard fork, the EIP-1559 denominator is increased from 50 to 250, and the reciprocal of 250 is 0.004. At this time, the Maximum base fee decrease (per block) becomes 0.004·1 = 0.4%, and the Maximum base fee increase (per block) becomes 0.004·(6-1) = 2%. If the block capacity is fully used for 1 minute, the base fee increases by 1.8 times. This is almost the same value as Ethereum. Although the parameters are different, this change brings the user experience closer to that of Ethereum.
In this blog article, we have looked at how Optimism has adopted a fee system based on EIP-1559 and how it has incorporated a system similar to Ethereum's. The EIP-1559 parameter changes by the Canyon hard fork aim to increase the stability of gas fees on the OP Mainnet. This could lead to a better user experience during network congestion, as the increase in base fee is expected to be moderated.
Introducing the Canyon Hardfork, https://blog.oplabs.co/canyon-hardfork/ .
Vitalik Buterin, Eric Conner, Rick Dudley, et al.,”EIP-1559: Fee market change for ETH 1.0 chain”, 2019, https://eips.ethereum.org/EIPS/eip-1559 .
Bedrock Differences, https://community.optimism.io/docs/developers/bedrock/differences/# .
For official resources on Optimism, author attribution has been omitted.