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:
baseFeePerGas=BASE FEEmaxFeePerGas=maxFee=FEE CAPmaxPriorityFeePerGas=priorityFee=tip/miner tip
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.
- If
gasUsedexceeded thegasLimit, the transaction would fail, and the entiregasLimit * gasPricefee was paid to the miner. - If
gasUsedwas less than thegasLimit, the user only paid for thegasUsed, and the remainder was refunded.
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:
- 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. - 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:
- Base Fee (
baseFeePerGas): This is a protocol-determined fee calculated automatically by the network based on how congested the previous block was. It is burned (permanently removed from circulation) and is non-negotiable. - Priority Fee (
maxPriorityFeePerGas): This is a tip set by the user, paid directly to the miner to incentivize them to include the transaction in the block. It is the only part of the fee that miners receive.
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.
- Reduced Inflation: Before EIP-1559, ETH had a daily issuance of approximately 13,000 new coins. The burning mechanism counteracts this issuance. In periods of high network activity, more ETH is burned than is created, making ETH a deflationary asset. This potentially reduces ETH's inflation rate to below that of Bitcoin, strengthening its value proposition.
- Value Alignment: By burning the base fee, the value of using the Ethereum network becomes more directly tied to the value of the ETH token itself. This creates a compelling economic feedback loop where high usage increases the scarcity of ETH.
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:
- The maximum block size (
gasLimit) is set to 30 million gas. - The target block size (
gasTarget) is set to 15 million gas (half of the maximum). - The
baseFeefor the next block is adjusted by comparing thegasUsedin the previous block to this target. - The maximum change rate per block is 12.5%.
Calculation Logic:
- If the previous block used exactly the target gas (15M), the
baseFeeremains unchanged. - If the previous block used more than the target gas, the
baseFeeincreases. The increase is proportional to how full the block was. A completely full block (30M gas) will trigger the maximum 12.5% increase for the next block. - If the previous block used less than the target gas, the
baseFeedecreases proportionally.
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):
- Gas Limit: 30,000,000 (the absolute maximum gas a block can contain).
- Gas Target: 15,000,000 (the ideal size the protocol aims for).
- Gas Used: 13,324,957 (the actual gas used by all transactions in this block). This is about 44.42% of the maximum and about 11% below the target.
- Base Fee Per Gas: 12.140394661 Gwei (the fee calculated by the protocol for this block, which was burned).
- Burnt Fee: 0.1617 ETH. This is the total ETH burned in this block, calculated as
Base Fee Per Gas * Gas Used.
Because this block's gasUsed was below the target, the baseFee for the next block decreased.
Transaction Data (A transaction from the block above):
- Gas Limit (set by user): 25,200 (the maximum gas the user allocated for this transaction).
- Gas Used by Txn: 21,000 (the actual gas the transaction consumed).
Gas Fees:
- Base: 12.140394661 Gwei (the block's
baseFee, burned). - Max Priority: 1.5 Gwei (the tip set by the user, paid to the miner).
- Max: 15 Gwei (the absolute maximum price per gas the user was willing to pay).
- Base: 12.140394661 Gwei (the block's
- Gas Price: 13.640394661 Gwei. This is the actual price paid, calculated as
min(Max Fee, Base Fee + Priority Fee). Here, it's simply12.14 + 1.5 = 13.64 Gwei. - Burnt: 0.000255148287681 ETH. This is
Base Fee * Gas Used. - Txn Savings Fee: 0.000028559513139 ETH. This is the amount saved because the user's
Max Feewas higher than the actual price paid:(Max Fee - Gas Price) * Gas Used = (15 - 13.64) * 21,000.
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.