What is EIP-1559 and how does it work?

EIP-1559 has been one of the most awaited Ethereum upgrades of all time. In this article, we explain in detail what changes have been implemented and how those changed both the user experience and economic model of Ethereum.

This article has been written for XDEFI Wallet by Korpi

For a few months, EIP-1559 has been on everyone’s lips but, as with all the big changes, there have been both supporters and critics. XDEFI Team considers EIP-1559 as a prerequisite to dramatically improve user experience on Ethereum. This improvement is not a given though. It is heavily dependent on the way EIP-1559 is integrated into dApps and wallets users interact with. This is why the XDEFI Team has been focused on building a wallet that empowers its users by giving them comprehensive solutions leveraging benefits of EIP-1559 and much more. 

This blog post aims to clarify why EIP-1559 was introduced, what changes it implemented and how it impacts both user experience and the economic model of Ethereum. In a follow-up article, we will share how XDEFI Wallet can bring the user experience of EIP-1559 to the next level.

EIP-1559 – the most hyped Ethereum upgrade

It rarely happens that EIPs (Ethereum Improvement Proposals) reach mainstream level attention. These upgrades to the Ethereum network are usually only understood by Ethereum developers and, even when they are important, users rarely notice the difference after their implementation. EIP-1559 has been very different, however.

Mainstream media like CNBC covered EIP-1559 and the phrase was also trending on Twitter for a while. The main reason for this incredible hype was introduction of fee burning (meaning part of the transaction fee paid by Ethereum users is now burned) which led to expectations of deflationary ETH supply. But EIP-1559 is not only about burning ETH. It’s so much more.

Legacy gas price auction model made users overpay for transactions

To fully appreciate changes introduced by EIP-1559, one must understand the legacy gas price auction model and its flaws. Before the upgrade, Ethereum users essentially participated in an open auction every block where they placed a bid on how much ETH (in GWEI = 0.000000001 ETH) they were willing to pay for each unit of gas. Because blockspace is limited, miners usually prioritized transactions with the highest gas prices. The biggest issue with this model was that gas prices could fluctuate severely from block to block. Users didn’t know what gas price would guarantee inclusion in the block. Therefore, they had to stab in the dark when submitting a transaction and often ended up paying more than necessary. 

Consider the below example:

John has just spotted a great opportunity on the Ethereum blockchain and wants his transaction to be executed as soon as possible (he wants to ape). He checks current gas prices to see that a rapid transaction requires 50 GWEI. He expects gas prices to rise as more users may want to seize the same opportunity, therefore, he uses 100 GWEI when submitting his transaction. The transaction is included in the first block and John pays 100 GWEI for each unit of gas it consumed. However, it turns out that such a high gas price wasn’t necessary. Even with 50 GWEI the transaction would be included in the first block – the gas spike John anticipated didn’t happen. As a result, John overpaid 50 GWEI for each unit of gas.

In legacy transactions, users had to gamble with gas prices because they were highly unpredictable. Moreover, they were always forced to pay exactly how much they agreed to pay when submitting their transaction, regardless of a fair price that would guarantee inclusion in the same block. Consequently, users often overpaid for transactions.

EIP-1559 changes how gas prices are estimated and how the network handles sudden increases in usage. And it burns ETH!

To address the issues of gas prices volatility and frequent overpayments in the legacy model, EIP-1559 introduced the following changes to the Ethereum network:

  • The Ethereum protocol algorithmically determines the gas price based on the current demand on the network.
  • Block space is variable and can be doubled during sudden spikes in demand to level out gas prices.

The above modifications to the fee market on Ethereum, although focused fully on improving user experience, were not the main reason why EIP-1559 became probably the most known EIP ever. The hype was caused by this change:

  • Part of the fee paid by users gets burned which creates a self-reinforcing relationship between ETH the asset and the Ethereum network.

All these enhancements are explained in more detail below.

Base Fee, Priority Fee and Max Fee – new fee market on Ethereum reduces fee overpayment to miners

Base Fee – The minimum gas price (GWEI per gas unit) required for a transaction to be included in a block. This is set algorithmically by the protocol depending on the current level of congestion on Ethereum. If the chain is more than 50% utilized, Base Fee increases. If it is less than 50% utilized, Base Fee decreases. Base Fee is also a portion of the total fee paid by users that gets burned.

Priority Fee – The gas price (GWEI per gas unit) that a user is willing to pay directly to miners (validators in PoS) as an incentive to prioritize inclusion of the transaction in a block. This is set by users themselves as a tip to miners (validators) who (most likely) order transactions in the block based on the tip size (those who tip higher, get included first).

Max Fee – The maximum gas price (GWEI per gas unit) that a user is willing to pay for the transaction in total. This is set by users themselves when they submit a transaction.

Base Fee is set by the protocol whereas Priority Fee and Max Fee have to be set by users. Instead of one gas price in the legacy model, users are forced to set two. Why the extra effort? To avoid overpaying for transactions.

Transactions can be processed by miners (validators) when the sum of Base Fee and Priority Fee is not greater than the user-defined Max Fee. Otherwise, the transaction will be pending:

Base Fee + Priority Fee <= Max Fee – the transaction can be processed by miners

Base Fee + Priority Fee > Max Fee – the transaction will be pending

If a transaction is included in a block, a user will always pay only Base Fee plus Priority Fee, regardless of the chosen value of Max Fee. Let’s go back to the aforementioned example with John to understand it better.

In the legacy model, John submitted a transaction with 100 GWEI and paid 100 GWEI although his transaction would have been executed even with 50 GWEI. The fee market introduced by EIP-1559 allows John to set 100 GWEI as Max Fee – the highest gas price John is willing to pay for the transaction. However, if the total gas price (Base Fee + Priority Fee) is 50 GWEI, he will only pay 50 GWEI. He will not substantially overpay for the transaction thanks to the EIP-1559 fee model.

EIP-1559 fee model allows users to specify the highest fee they are ok to pay for a transaction (Max Fee) but doesn’t charge them that amount if the transaction can be processed at the lower price. This is an enormous improvement of user-experience compared to the legacy model where users were forced to overpay even if not necessary (see John’s case with the legacy transaction). EIP-1559 saves users ETH.

Separation of Base Fee and Priority Fee simplifies fee estimation process and improves user experience

Having a setting for the highest acceptable fee (Max Fee) is useful and easy to understand. But why separate the actual gas price for the transaction into two parts: Base Fee and Priority Fee? Why the extra complexity? To simplify the fee estimation process and further improve user experience.

In the legacy model, users were required to set a gas price they were willing to pay for the transaction. They could either accept a price suggested by the wallet or use 3rd party gas-market estimations like Gas Price Tracker. Gas prices recommended by different services were based on individual gas estimation strategies – there wasn’t one source of truth. EIP-1559 fixed that.

Base Fee is set algorithmically by the protocol. It can be compared to Bitcoin’s difficulty adjustment – it works without any human intervention based on the predefined rules and is adjusted in response to the specified on-chain metrics. Base Fee responds to the level of congestion on Ethereum. This is the most volatile and highly unpredictable part of the gas price and users, wallets and apps don’t have to worry about its estimation process because the protocol takes care of that. We can call Base Fee the native “market price” for a gas unit that is required for a transaction included in a block.

Base Fee alone wouldn’t be sufficient. Demand for block space on Ethereum has consistently surpassed its supply. Therefore, there must be another mechanism that will allow users to signal the urgency of their transactions. This is the purpose of Priority Fee. By setting Priority Fee users are able to “jump the line” and have their transaction included before the others. If an average Ethereum user wants to do some basic DeFi activities, low Priority Fee (1-3 GWEI) is usually high enough to guarantee a reasonably fast execution. But degens fighting in gas wars for the hyped NFT drop want to set high Priority Fee to get included in a block before it sells out.

EIP-1559 sceptics are quick to point out that Priority Fee serves the same purpose as gas-auction in the legacy gas market model. They are not wrong. But the separation of Base Fee and Priority Fee makes the whole process much easier. Before EIP-1559 estimated gas price could fluctuate quickly from 10 to 100 (and more) and each time a user-submitted a transaction, a different number had to be input. After EIP-1559 the Base Fee takes care of congestion volatility and a user only needs to signal the urgency of the transaction by setting the Priority Fee. It’s usually just 1-3 GWEI if you are not fighting in the gas war. Users no longer have to monitor gas prices estimations in order to submit a transaction. It’s a much better user experience than before.

Variable block size guarantees more reliable transaction inclusion

EIP-1559 hasn’t only impacted the fee market on Ethereum. It has also doubled the gas limit for each block. Double block size suggests twice the number of transactions should fit into a single block, therefore, Ethereum throughput should increase (though at the expense of decentralization). It doesn’t work this way. The upgrade has been designed so that the protocol ideally wants the blocks to be half full. 50% of the new increased limit is the preferred target for the block size. If blocks are smaller than the target (utilized less than 50%), Ethereum will lower the Base Fee. If blocks are larger than the target (utilized more than 50%), the Base Fee will be increased. 

Ethereum Network Utilization Chart

Figure 1: 50% network utilization doesn’t mean demand for Ethereum blockspace has gone down. Block size has been doubled and 50% is a new target set by EIP-1559. Source: https://etherscan.io/chart/networkutilization

The variability of the block size is an elegant solution to the fluctuation in usage. In the legacy model with fixed blockspace, sudden surges in demand always led to a dramatic rise in gas prices as blocks were full and gas war was the only solution to have transactions processed by miners. With variable block space EIP-1559 can accommodate a sudden influx in demand by temporarily expanding blockspace to its increased limit. 

Consider the below example of John submitting a transaction before and after EIP-1559:

Before EIP-1559

In block 1 (see upper left block on Figure 2) John submits a transaction at 20 GWEI. This is the current gas price that guarantees inclusion in a block. However, there is a sudden increase in blockspace demand (e.g. during a hyped NFT drop) in block 2 and gas spikes to 100 GWEI. John’s transaction is pending during block 2 and 3. It finally gets included in block 4 when gas price goes down.

After EIP-1559

In block 1 (see lower left block on Figure 2) John submits a transaction at 20 GWEI (the Base Fee, ignoring the Priority Fee for simplicity). This is the current Base Fee that guarantees inclusion in a block. There is a sudden increase in blockspace demand (NFT drop?) in block 2 but it doesn’t immediately increase the Base Fee. Instead, block size expands to accommodate the influx in demand. In block 3, the Base Fee increases to 22.5 GWEI as the response to the increased usage in the previous block. Block 3 is still full, therefore, the Base Fee increases further. In block 4, the Base Fee is already 25 GWEI but the demand on blockspace has gone down and block size can shrink to the target size. In this scenario John’s transaction has been included in block 2, not in block 4 as in the legacy model.

Variable Block Size in EIP-1559

Figure 2: Variable block size introduced by EIP-1559 smooths out gas prices by allowing the protocol to temporarily increase the available blockspace. Source: https://thedailygwei.substack.com/p/this-is-eip-1559-the-daily-gwei-300

To summarise, EIP-1559 helps smooth out Base Fee in the short term as the burden of the usage spike is put on the block size. This also enables a more reliable transaction inclusion – a transaction is included faster than it would be in the legacy model because gas prices are less volatile in the short term.

Base Fee Burning creates a strong positive relationship between ETH the asset and the Ethereum network

Base Fee Burning is what has made EIP-1559 such a well known Ethereum upgrade. The idea is pretty straightforward. Users pay Base Fee + Priority Fee for their transactions. Priority Fee goes to miners (validators) and Base Fee is burned, i.e. removed from the supply forever. This simple change has dramatic consequences on Ethereum’s economic model.

Before EIP-1559, all the fees paid by users went to miners. Miners would usually sell collected fees into the market. Users who wanted to transact on Ethereum needed to buy ETH on the market to pay for gas and this way the cycle started again. The fees were effectively washed back and forth between the participants of the network and increased usage of the network didn’t directly translate into price appreciation of ETH.

After EIP-1559, there is a self-reinforcing mechanism between ETH the asset and the Ethereum network. Increased demand on Ethereum blockspace leads to the higher Base Fee which gets burned. The more ETH is removed from the total supply, the higher the value of each ETH that is still in circulation. Burning the Base Fee pays every ETH holder equally. EIP-1559 transferred a part of the transaction fee from miners to ETH holders.

The above process is the main reason why ETH holders have been so excited about EIP-1559. High gas prices on Ethereum can finally be associated with a positive feeling of increasing ETH scarcity. But it hasn’t been introduced only to “make numbers go up”. Paying all the fees to miners is simply not the best design. Miners could be incentivized to manipulate the fees and keep them as high as possible to maximize profits (e.g. by spamming the network with transactions and recouping the paid fees after mining a block). Burning the Base Fee is the most fair way to distribute it.

EIP-1559 is a prerequisite for deflationary ETH

ETH burn creates an important building block in Ethereum’s security model. Ethereum has chosen to fund security with block rewards which remunerate block producers (miners or validators) for their work. The community consensus is to keep block rewards forever. This is fundamentally different from Bitcoin’s model with rewards halvings every 4 years and future security fully reliant on transaction fees only. Nevertheless, Ethereum’s approach has been criticized for an infinite inflation of ETH supply. EIP-1559 has caught the critics off guard.

While block rewards can forever pay for Ethereum’s economic security, burned ETH can offset the issuance when network usage is high enough. It can even surpass the issuance which means more ETH will be burned than issued and ETH will become a deflationary asset. Checkmate inflation critics.

EIP-1559 can dramatically improve user experience… if implemented correctly

Time to summarise all the benefits of EIP-1559:

    • Reduced overpayment for transactions – users always pay the actual cost of the transaction (Base Fee + Priority Fee) regardless of how much they agreed to pay at most.
    • Improved transaction fee estimation – users don’t need to guess ever-changing gas prices because the protocol determines that algorithmically.
  • More reliable transaction inclusion – sudden spikes in demand are first accommodated with the expansion of the blockspace before gas prices start being adjusted.
  • Positive relationship between ETH the asset and Ethereum the network – ETH holders benefit from the high activity on the network by Base Fee burn.

Even though the advantages of EIP-1559 are clear, there have been some voices of dissatisfaction. Most likely, nobody is complaining about ETH burn but many users haven’t been happy with two fields for gas prices (Priority Fee and Max Fee) instead of one in the legacy model. Hopefully, this explanatory writing helps them appreciate the benefits which come from the updated fee market. However, some dissatisfaction can be also caused by the current implementations of EIP-1559 in wallets’ interfaces which are still far from perfect.

XDEFI is responding to EIP-1559 by focusing on user experience 

The XDEFI Team is really excited about the positive changes that EIP-1559 has introduced to Ethereum. XDEFI  wants its users to share in this excitement too. We understand that the user’s experience is heavily dependent on the UX/UI of the dApps and wallets they use. That’s why we are heavily focused on delivering solutions that will make Ethereum transactions more accessible and truly empowering for XDEFI users. Therefore, we implemented the proprietary model from Blocknative and created the “Ape Mode”, which ensures that users’ transactions are included in the very next block 99% of the time.

This article has been written for XDEFI Wallet by Korpi

References: