When Ethereum upgraded its core gas-fee marketplace with EIP-1559, transactions moved from a first-price auction to a hybrid system involving base fees and tips. As we have previously covered, this introduced new levels of complexity for transacting on-chain.
To help further clarify this, today we will explain the new terms and how to approach the core variables associated with EIP-1559 transaction fees.
First, a refresher: EIP-1559 changed how Ethereum transaction fees are calculated and where those fees go. Instead of a singular Gas Price
, you now have to pay attention to three separate values:
Base Fee
, which is determined by the network itself and is subsequently burned.Max Priority Fee
, which is optional, determined by the user, and is paid directly to miners.Max Fee Per Gas
, which is the absolute maximum you are willing to pay per unit of gas to get your transaction included in a block. For brevity and clarity, we will refer to this as the Max Fee
.Transactions that include these new fields are known as Type 2
, while legacy transactions that carry the original Gas Price
field remain supported and are known as Type 0
. Note: EIP-1559 does not bring changes to the Gas Limit
, the maximum amount of gas the transaction is authorized to consume.
The Base Fee
is determined by the Ethereum network rather than being set by end-users looking to transact or miners seeking to validate transactions. The Base Fee
targets 50% full blocks and is based upon the contents of the most recent confirmed block. Depending on how full that new block is, the Base Fee
is automatically increased or decreased.
For example:
Base Fee
will remain unchanged.Base Fee
will increase by the maximum 12.5% for the next block.Base Fee
will increase by less than 12.5%.Base Fee
will decrease the maximum 12.5% for the next block.Base Fee
will decrease by less than 12.5%.This new mechanism is meant to help smooth transaction fees and prevent sudden spikes. The most important thing to keep in mind when it comes to the Base Fee
: it is 100% automatic and readable directly from the network.
The Max Priority Fee
— also often referred to as the miner tip — is an 'optional' additional fee that is paid directly to miners in order to incentivize them to include your transaction in a block. While the Max Priority Fee
is technically optional, at the moment most network participants estimate that transactions generally require a minimum 2.0 GWEI tip to be candidates for inclusion. With that said, specific mining pools may choose to set alternative minimums for inclusion.
For 'typical' transactions that are submitted under normal, not-congested network conditions, the Max Priority Fee
will need to be close to 2.0 GWEI. But, for transactions where order or inclusion in the next block is important, or when the network is highly congested, a higher Max Priority Fee
may be necessary to prioritize your transaction.
A somewhat subtle nuance to the Max Priority Fee
is that it represents the maximum tip you are willing to pay to a miner. However, if the Base Fee
plus the Max Priority Fee
exceeds the Max Fee
(see below), the Max Priority Fee
will be reduced in order to maintain the upper bound of the Max Fee
. This means the actual tip may need to be smaller than your Max Priority Fee
and, under such circumstances, your transaction may become less attractive to miners.
Now that we have covered the basics of the Base Fee
and the Max Priority Fee
, we can tackle the somewhat counterintuitive notion of the Max Fee
.
The Max Fee
is the absolute maximum amount you are willing to pay per unit of gas to get your transaction confirmed. And here is where things can get a little confusing – given that, under most circumstances, your actual transaction fee will be less than the Max Fee
you specify up front. Here is why:
Base Fee.
Base Fee
increases while your transaction is pending? Your transaction will become underpriced and be at risk of becoming stuck. Or failing. Or getting dropped. This is undesirable for all of the reasons you might expect.Max Fee
that anticipates such an increase in the Base Fee
. But by how much? And why?Max Fee
for any given Base Fee
and Max Priority Fee
combination:Max Fee
= (2 * Base Fee
) + Max Priority Fee
Doubling the Base Fee
when calculating the Max Fee
ensures that your transaction will remain marketable for six consecutive 100% full blocks. The table below illustrates why.
Assume your transaction is submitted during Block 1, when the Base Fee
is 100.0 GWEI. You choose to set a Max Priority Fee
of 2.0 GWEI, so your Max Fee
calculation is (2 * 100.0 + 2.0) or 202.0 GWEI.
But, just as you are submitting your transaction, a high profile NFT drop happens and network demand surges. Suddenly, every block is 100% full – rather than the 50% target discussed above – so the Base Fee
increases by the maximum 12.5% per block.
Thus:
Block | Base Fee | % Full | Increase in Base Fee | Priority Fee specified | Max Fee specified | Gas Price Paid if confirmed | Gas 'Saved' |
1 | 100.0 GWEI | 100% | 12.5% | 2.0 | 202.0 | 102.0 | 100.0 |
2 | 112.5 GWEI | 100% | 12.5% | 2.0 | 202.0 | 114.5 | 87.5 |
3 | 126.6 GWEI | 100% | 12.5% | 2.0 | 202.0 | 128.6 | 73.4 |
4 | 142.4 GWEI | 100% | 12.5% | 2.0 | 202.0 | 144.4 | 57.6 |
5 | 160.2 GWEI | 100% | 12.5% | 2.0 | 202.0 | 162.2 | 39.8 |
6 | 180.2 GWEI | 100% | 12.5% | 2.0 | 202.0 | 182.2 | 19.8 |
7 | 202.7 GWEI | - | - | 2.0 | 202.0 | Ineligible | -0.7 |
As you can see, it takes six consecutive 100% full blocks for the Base Fee
to double – in this case, from 100.0 GWEI to 202.7 GWEI.
Practically speaking, by setting your Max Fee
in this manner, your transaction is 'protected' against becoming underpriced and hence unmarketable in the event of the most rapid escalation of the Base Fee
possible.
But what if the Base Fee does not increase so rapidly? You will be charged less than the Max Fee you specified. To see why, refer to the table above:
Base Fee
was 100.0 GWEI. You chose to set a Max Priority Fee
of 2.0 GWEI, so your Max Fee
calculation was 202.0 GWEI.Confirmed
during Block 4, when the Base Fee
is 142.2 GWEI.Base Fee
when confirmed plus your Max Priority Fee
. So you will pay 144.2 GWEI per gas for the transaction.Max Fee
you specified. That 57.6 GWEI per gas is effectively 'saved' and will remain in your wallet.Max Fee
is not 'withdrawn' from your wallet and then some portion is 'refunded'. Instead, imagine that the Max Fee
is the 'maximum authorized charge' threshold.Max Fee
of 202.0 GWEI falls just below the new Base Fee
of 202.7 GWEI.Finally, in the scenario above, what if you failed to include the 2x safety factor in your Max Fee
calculation and instead set the Max Fee
to the minimum of 102.0 GWEI?
Max Fee
is still above the Base Fee
of 100.0 GWEI.Max Fee
falls below the new Base Fee
of 112.5 GWEI.Pending
until the Base Fee
decreases and falls below its Max Fee
of 102.0 GWEI.And this is why the Max Fee
is counterintuitive:
Max Fee
.Max Fee
.Max Fee
too close to the current Base Fee
, you run the risk of your transaction becoming underpriced and hence no longer eligible for inclusion.For predictable transaction settlement performance, we recommend incorporating a healthy safety factor in your Max Fee
calculations.
By default, version 10.0.0 of MetaMask will automatically set your transaction's Max Priority Fee
. You can override these with the EDIT button, which will allow you to select low (slowest to confirm), medium, or high (fastest to confirm) fees:
To manually specify your transaction's Gas Limit
, Max Priority Fee
, and Max Fee
, select the Advanced Options drop down.
Blocknative is here to help with our world-class mempool monitoring capabilities. Our ETH gas fee estimator and ETH Gas Extension – which is powered by our industry-leading ETH Gas Platform API– fully supports EIP-1559. Gas Platform inspects every pending Ethereum transaction to help you accurately estimate transaction fees to get included in the next block.
Please stay tuned for updates as we expand and refine our support for EIP-1559 across our portfolio, including enhancements to how best to calculate your Max Fee
.
Are there other aspects of EIP-1559 you would like us to cover? Or is this post missing specific ETH gas information? Please join our Discord Community if you have questions, concerns, or recommendations.
Learn more about future upgrades to ETH via our Guide to The Ethereum Merge.