Discover more from The Daily Gwei
This is EIP-1559 - The Daily Gwei #300
A brief overview of EIP-1559.
Today is a special day as it’s the day of the 300th edition of The Daily Gwei newsletter! To mark this occasion, I’ve teamed up with my good friend Nader to put together an EIP-1559 explainer piece. It’s the first piece that I’ve written with a co-author for the newsletter and I’m excited that it’s about one of the most important upgrades in Ethereum’s history. Nader and I would also like to extend our thanks to both Tim Beiko and Trent Van Epps for their review and feedback of this piece.
There’s been a lot of hype in the Ethereum community around EIP-1559 since it was first proposed in April of 2019. Now, with EIP-1559 scheduled to go live on mainnet next week with the London upgrade, Nader and I have put together this piece to give you an overview of EIP-1559 and how it brings with it many benefits outside of the well-known fee burn.
Core Benefits of EIP-1559
Better transaction fee estimation
Creates a symbiotic relationship between ETH, Ethereum network and its users
Allows for more reliable transaction inclusion
What EIP-1559 Doesn’t Do
Doesn’t lower gas prices in the long run
Doesn’t make ETH deflationary by default
Before fully diving into EIP-1559, it is essential to clear up a few misunderstandings. First, EIP-1559 doesn’t inherently make it cheaper to transact on Ethereum in the long run. Gas prices fluctuate based on the demand to submit a transaction versus the supply of available block space. This EIP only helps smooth out gas prices by allowing the block size to increase slightly during sudden surges in demand. It doesn’t increase the scalability of the chain and therefore isn’t a solution that will lower gas prices in the long run.
Second, even though some amount of ETH is burned for every transaction, it does not necessarily mean that enough ETH will be burned to offset the current issuance rate. For that to happen, a base fee of ~150 gwei would need to be sustained to offset the current eth1 (Proof of Work) issuance and a base fee of ~20 gwei would be required to offset the current eth2 (Proof of Stake) issuance.
Current Gas Price Auction
Currently, Ethereum uses a first-price auction for pricing transactions, meaning users that bid the highest prices are the ones that are most likely going to have their transactions included first. However, the biggest issue with this model is that gas prices can fluctuate wildly due to sudden surges in demand for Ethereum’s limited blockspace. Users often have to gamble when they submit a transaction and frequently overpay to guarantee that their transactions are included. Overall, EIP-1559 seeks to provide a better user experience by changing how transaction fees are estimated and how the network handles surges in usage.
Important Changes Made by EIP-1559
Base Fee, PriorityFee, and Max Fee
Variable Block Size
Base Fee Burning
Base Fee, Priority Fee, and Max Fee
Base Fee - The minimum gas price required for a transaction to be included in a block. This is set by the protocol and is variable, is a part of the block header, and is the portion of the overall fee that is burned.
Priority Fee (tip) - The gas price that the user is willing to tip the miner to process the transaction. This is set by the user, it’s a part of the transaction, and is paid to the miner (it is expected that the default tip will be 2 gwei).
Max Fee (per gas) - The highest total gas price that the user is willing to pay for the transaction. This is set by the user and it’s a part of the transaction.
After EIP-1559 has been implemented, a transaction will only be valid if the Max Fee is greater than the Base Fee plus the Priority Fee. Any excess amount is refunded back to the user.
Refund = Max Fee - (Base Fee + Priority Fee)
As a result, users will have much more certainty when submitting a transaction because they only need to make sure that they include enough to pay the Base Fee and a small Priority Fee to have their transaction included. The user doesn't need to worry about overbidding on gas prices because the remainder is refunded back to them rather than paid to a miner (or staker).
With the creation of the new 1559 transaction type, wallets and other service/infrastructure providers will need to upgrade to support it. However, legacy transactions will still work even after EIP-1559 has been implemented. The network will interpret the Priority Fee as the difference between the Legacy Gas Price and the current Base Fee. The downside of this is that legacy transactions do not provide a refund if the user overpays.
Priority Fee = Legacy Gas Price - Base Fee
An example of two different transactions that were included in the same block with a 15 gwei Base Fee
Variable Block Size
Currently, Ethereum has a gas limit that caps all blocks at 15 million gas. You can think of the gas limit as the block size in Ethereum which limits the amount of transactions that can fit into a single block. Currently, whenever there is a surge in demand, gas prices rise dramatically because the blocks are always full and are capped at a specific size.
EIP-1559 makes it so that the block size can temporarily increase to accommodate a sudden influx in demand. It does this with two different block parameters: the limit and the target. The target is 50% of the limit, meaning if the target is 15 million gas, the limit would be 30 million. Ideally, Ethereum wants the size of each block to be close to the target (50% max capacity). To make sure that blocks stay close to the target, Ethereum will lower the Base Fee if blocks are smaller than the target, and it will increase the Base Fee if they are larger than the target. It’s also worth noting that in this scenario, the Base Fee actually increases really fast as it will increase by 12.5% for each full block. Now, this may not seem like a lot, but it means that the base fee will 10x in ~20 blocks (~260 seconds), 100x in 40 blocks (~520 seconds) and would have burnt all available ether after ~170 blocks (~2210 seconds). You can play around with this spreadsheet from Trent Van Epps to get a better idea of how this all works.
So to summarize: Variable block sizes smooth out gas prices by allowing the protocol to increase the available blockspace temporarily. This results in a smoother increase in gas prices between blocks in the short term.
Base Fee Burning
While the Priority Fee is given to the miner, the Base Fee is burned and removed from circulation. The primary reason for this is if the Base Fee were paid to the miners they would be incentivized to keep it as high as possible to maximize profits (and could also spam the network with high transaction fees which could be later recouped if they mined a block). By burning the Base Fee, it guarantees that miners are indifferent about this.
Burning the Base Fee makes ETH an inherent part of the Ethereum protocol. Right now, technically, any cryptocurrency or even fiat can be used to pay for processing a transaction on Ethereum. A user can submit a transaction with no fee and cut a deal to pay the miner outside of the blockchain (this is what Flashbots enables). With EIP-1559 it is necessary to include a small amount of ETH as the Base Fee for the network to accept the transaction as valid thus creating a more healthy relationship between ETH the asset and the Ethereum network.
As you can see, EIP-1559 is poised to greatly enhance the user experience on Ethereum for processing transactions. Of course, most people like to focus on the fee burn aspect of EIP-1559 (and so do we), but the overall benefits of EIP-1559 go far beyond the fee burn and will have a positive impact on end-users. If you’d like to dive much deeper into EIP-1559, you can check out this collection of resources from Tim Beiko.
Have a great day everyone,
Enjoyed today’s piece? I send out a fresh one every week day - be sure to subscribe to receive it in your inbox!
Join the Daily Gwei Ecosystem
All information presented above is for educational purposes only and should not be taken as investment advice.