Today, EIP-1559 is being rolled out as part of Ethereum’s latest hard fork in an attempt to make transaction fees more predictable.
Up to now, transaction fees have shown a large volatility (even higher than the Ether token itself) as they were solely based on bids of the transaction senders. Whenever Ethereum was under a high transaction load (like during recent NFT launches) or in heavy market crashes like on May 12, 2020, the fees would spike uncontrollably.
With EIP-1559, Ethereum is moving from a purely bidding-based system to a hybrid approach where the network determines a base fee given the current network load, while allowing users to pay a tip to the miners for faster transaction processing. While simple at first sight, the new method has its intricacies that are worth exploring in more detail.
In this post, I’ll try to shed some light on how users’ parameter choices impact the actual costs of the transaction and its chances of getting mined (quickly).
Transaction fees before EIP-1559
Before EIP-1559 there was a single transaction fee received entirely by the miner who produced the block including the transaction. This fee was a product of the gas consumed by your transaction (an approximation of the computational effort required to execute the transaction) and the amount of ETH you were willing to pay for each unit of gas (“gas price”).
Transaction fees after EIP-1559
EIP-1559 doesn’t change how the gas usage of your transaction is determined, however it changes how the amount of ETH you pay for each unit of gas is calculated and where that ETH goes. Instead of a single transaction fee that goes to the miner, you will now pay the fee in two components:
- A base fee that’s algorithmically determined based on network utilization. This fee is burned.
- A priority fee (commonly referred to as “tip”) chosen by you. This fee goes to the miner of your transaction.
Why include a tip?
It’s easy to see the usefulness of a tip during periods of surging network load: during these times there will be significantly more transactions for miners to choose from than can be included in a single block, so miners will naturally prefer to pick those with higher tips.
What about normal load though?
A lesser known fact about mining is that the more computation (gas) a miner fits into their block, the higher its chances are of becoming an uncle block and thus leading to a significantly lower reward for its miner. (This was once measured to be about a 2.5% increase in risk for 10 million gas).
It remains to be seen what will be an appropriate minimum amount for the tip to offset miners’ “uncle risk”, and it will likely depend on the current block reward and expected MEV revenue per block. The current wisdom is that somewhere around 2–3 Gwei should get your transaction mined in a timely manner under normal load.
New transaction parameters
EIP-1559 replaces the old “gas price” parameter with two new parameters:
- Max fee: the maximum amount of ETH you’re willing to pay for the transaction per unit of gas, including both the base fee and the tip.
- Max priority fee: the maximum amount of ETH you’re willing to pay the miner as tip per unit of gas.
So how do these parameters relate to the base fee and the priority fee? Well, as we’ve mentioned before, the base fee is algorithmically determined at every new block: roughly speaking it goes up during periods of higher network load, and goes down under lesser load. You can’t choose the exact amount you pay as base fee, but you can set a cap on it through the max fee parameter. If a transaction’s max fee is less than the current base fee then it can’t be included in a block until the base fee decreases sufficiently.
For transactions that do end up included in a block, determining the fees can be thought of as a three step process:
- The base fee is deducted from the max fee, and is burned.
- If there’s ETH left after the deduction, it is used to pay a tip to the miner, up to a maximum of the max priority fee.
- If there’s still ETH left after paying the tip, it is refunded to the transaction’s sender.
The sum of the base fee and tip paid per unit of gas is referred to as “effective gas price”. It is the amount of ETH you would have used as “gas price” before EIP-1559 to end up paying an equivalent transaction fee.
Here’s a visualization of a transaction’s fees depending on where the base fee ends up when the transaction is mined:
Legacy transactions
What happens if you send a transaction using a wallet that hasn’t been updated to support EIP-1559? The short answer: it will “just work”, but you’ll likely end up overpaying for transaction processing.
Transactions including the old gas price parameter instead of the new parameters introduced by EIP-1559 will still be accepted by the Ethereum network. They will be processed as if both max fee and max priority fee were set to the original gas price value. This means any ETH leftover after paying the base fee will go to the miner.
Here is a comparison of the tip between a legacy transaction and an EIP-1559 transaction:
As we can see, EIP-1559’s max priority fee can be used to cap the tip to an amount that’s reasonable under the given network load (with the remaining portion of the max fee being refunded), whereas a legacy transaction will send all its remaining fee allotment to the miner.
How to choose parameters?
As wallets come out with EIP-1559-compatible updates in the near future (if they haven’t already), more and more users will be able to take advantage of the UX improvements brought about by EIP-1559. Most users will be able to just accept the defaults suggested by their wallets, which should result in much more predictable transaction processing times than before, thanks to the improvements of the latest hardfork.
However, if you’re one that likes to manually tweak the parameters of your transactions, you might find the following advice useful:
- At each new block, base fee may be increased by 12.5% when network load is surging. You may want prepare your transaction to pay some multiple of the current base fee, e.g. 2X.
- Even during decreased network load (i.e. not enough pending transactions to fill a block) miners take on added risk whenever they decide to include an extra transaction in their block. You should choose a tip that offsets miner’s “uncle risk”, which is currently estimated to be about 2 Gwei.
- During increased load, you will still have to participate in a bidding war against other senders. You should increase your tip accordingly. It remains to be seen how high tips will go in practice.
The commonly suggested baseline for picking parameters is:
“max priority fee” = 2 Gwei or higher (depending on network load)
“max fee” = 2 × “current base fee” + “max priority fee”
This should help you pick parameters that let your transaction be mined quickly.
Learn More
Hopefully this has helped your understanding of the nuances of the new UX introduced by EIP-1559. To learn more, check out some of these resources:
- https://eips.ethereum.org/EIPS/eip-1559
- https://insights.deribit.com/market-research/analysis-of-eip-1559/
- https://ultrasound.money/
Resources: Website | Twitter | Discord | Telegram | Github | Reddit | LiquityCN