A Comprehensive Guide to Understanding EIP-1559 on Ethereum

·

EIP-1559 was a foundational upgrade introduced during Ethereum's London hard fork in 2021. It fundamentally reformed the network's transaction fee mechanism to create a more predictable and efficient economic system.

This guide explains the core problems EIP-1559 was designed to solve, breaks down its innovative solutions, and provides a clear explanation of how the new baseFee is calculated. We'll use real data from Etherscan to illustrate these concepts in practice.

Key Terminology and Concepts

Throughout EIP-1559's development and documentation, several terms emerged to describe its core fee components. The following pairs are functionally equivalent and can be used interchangeably:

The Problem EIP-1559 Solved

Before the London upgrade, users sending a transaction had to specify two parameters: gasLimit and gasPrice.

Understanding the GasLimit Parameter

The gasLimit represented the maximum amount of Gas a user was willing to pay for a transaction's execution. The actual amount of computational resources consumed was calculated during execution and called gasUsed.

For any successfully mined transaction, the final cost was gasUsed * gasPrice.

Understanding the GasPrice Parameter

Miners had the power to choose which transactions to include in a block. Since gasLimit was user-set and gasUsed was system-calculated, miners based their selection primarily on the gasPrice.

A higher gasPrice meant more revenue for the same amount of computational work (gasUsed * gasPrice), incentivizing miners to prioritize the highest-paying transactions.

The Critical Flaws

This system created a problematic first-price auction model. During times of network congestion, users were forced into a vicious bidding war. To get their transaction processed quickly, they had to outbid others by setting a higher gasPrice.

This led to two major issues:

  1. Poor User Experience: Users could not determine an optimal gasPrice. Setting it too high resulted in overpaying, while setting it too low meant a transaction might be stuck for hours or even days.
  2. Network Inefficiency: This unpredictable, auction-based system could worsen congestion as users blindly guess prices or resubmit transactions with higher fees, creating a negative feedback loop.

How EIP-1559 Provides a Solution

The core idea behind EIP-1559 is to dynamically adjust the transaction fee based on real-time network demand, providing users with a predictable base rate.

1. Splitting the Gas Fee: Base Fee and Priority Fee

EIP-1559 split the monolithic gasPrice into two distinct parts:

The total effective gas price a user pays is now baseFee + priorityFee. Because the baseFee is known before a transaction is sent, users can make more informed decisions about their costs.

2. Introducing the Max Fee Cap

To prevent users from overpaying in a volatile market, EIP-1559 introduced the maxFeePerGas parameter. This acts as a safety cap, representing the absolute maximum a user is willing to pay per unit of gas.

Here’s how it works in practice:
A user sets a maxFee of 100 Gwei. The network's current baseFee is 60 Gwei, and the user sets a priorityFee of 10 Gwei. The actual price paid is 60 + 10 = 70 Gwei. The difference (100 - 70 = 30 Gwei) is refunded to the user. This mechanism ensures users will never pay more than their set maxFee.

3. Burning the Base Fee

Perhaps the most significant economic change was the decision to burn the baseFee. This means the ETH used to pay this portion of the fee is permanently removed from the overall supply.

How the Base Fee is Calculated

The baseFee algorithm is designed to keep block sizes close to a specific target, adjusting prices to balance supply and demand.

The basic rules are:

  1. The maximum block size (gasLimit) is set to 30 million gas.
  2. The target block size (gasTarget) is set to 15 million gas (half of the maximum).
  3. The baseFee for the next block is adjusted by comparing the gasUsed in the previous block to this target.
  4. The maximum change rate per block is 12.5%.

Calculation Logic:

This algorithm creates strong economic pressure. If blocks remain full for just 5 minutes, the baseFee can increase tenfold. After 10 minutes, it could be 100 times higher, quickly discouraging new transactions and alleviating congestion. 👉 Explore more strategies for calculating network fees

A Real-World Example from Etherscan

Let's examine a real Ethereum block to see EIP-1559 in action.

Block Data (Block #20039078):

Because this block's gasUsed was below the target, the baseFee for the next block decreased.

Transaction Data (A transaction from the block above):

Frequently Asked Questions (FAQ)

What is the primary goal of EIP-1559?
EIP-1559 was designed to improve the user experience by making Ethereum transaction fees more predictable. It replaces a blind auction system with a dynamic base fee that users can see before submitting a transaction, reducing guesswork and inefficiency.

How does the base fee burning mechanism benefit ETH holders?
By burning the base fee, EIP-1559 introduces a deflationary pressure on ETH. During times of high network usage, more ETH is burned than is issued to miners, effectively reducing the net supply of ETH. This can potentially increase the scarcity and value of the token over the long term.

As a user, do I need to calculate the base fee manually?
No, you do not. Modern Ethereum wallets (like MetaMask, WalletConnect, etc.) automatically fetch the current base fee from the network. They typically suggest a total max fee based on this value, allowing you to approve transactions without needing to understand the underlying calculation.

What happens if the base fee rises above my max fee after I submit a transaction?
If the network becomes so congested that the base fee for a block exceeds the maxFeePerGas you set, your transaction will become "stuck." It will remain in the mempool but will not be included in a block until congestion subsides and the base fee falls back below your max fee. You may need to replace the transaction with a higher max fee.

Does EIP-1559 eliminate the need for miners to prioritize transactions?
No, it changes how they prioritize. Miners still have an incentive to include transactions that offer the highest priorityFee (tip), as this is their direct reward. However, the base fee is now a fixed, burned cost, so miners are essentially competing for tips rather than the entire fee.

Will EIP-1559 make transaction fees cheaper?
Not necessarily. EIP-1559's goal is fee predictability, not necessarily fee reduction. Fees are ultimately determined by network demand. The protocol makes fees less volatile and easier to estimate, but during periods of extreme demand, the base fee will still be high. The key benefit is that users are less likely to drastically overpay.