One of the more complicated and — to be frank — annoying elements of Ethereum for new users is the gas fees. But while the developers behind Ethereum work on ways to alleviate the problem and keep gas fees manageable, it’s worth understanding why they exist and how they work. In this guide, I’ll give an easy-to-follow overview of how gas fees work on Ethereum, how they’re calculated and what you can do to minimise the amount of money you spend on them.
What are Ethereum gas fees?
Ethereum gas fees are payments made in Ethereum’s native currency, Ether (ETH), to compensate for the computing power required to execute and validate operations on its blockchain. Every operation on Ethereum — from sending ETH from one wallet to another, to minting an NFT, to running a more sophisticated smart contract — requires computational resources from miners on the network, and ‘gas’ is how they get paid for offering those resources.
Put simply, you can think of gas fees as fuel for the Ethereum network. (That’s why it’s called gas, after all.) As well as incentivising miners to lend their computing power, gas fees help keep Ethereum secure and functional. Applying a cost to every operation on the network helps prevent it from being attacked by hostile actors or being paralysed by runaway processes and infinite loops.
The most important thing to remember is that virtually everything you do and every interaction you perform on the Ethereum network is going to cost you in the form of gas fees. The more sophisticated the operation, the more you’ll end up paying.
How do Ethereum gas fees work?
Here’s how Ethereum gas fees work. Whenever you make a transaction via the Ethereum blockchain, you will be charged a gas fee to complete it.
Ethereum miners provide the computing power to process and validate transactions, and the gas fees provide them with a financial incentive to do so. Later in this article, I’ll explain exactly how that is calculated. But in short: the gas fee incentivises miners to execute your functions and include your transaction in the next block.
In August 2021, Ethereum activated a major change named the ‘London upgrade’, which reformed the way gas fees worked in an attempt to make them more predictable and less confusing. The upgrade also introduced a ‘burn mechanism’, which destroys Ether to offset all the new tokens constantly being generated.
What makes gas fees go up?
There are a few different factors that can influence the gas fee on any given transaction:
- The complexity of the transaction. Sending ETH from one wallet to another is basically as simple as an Ethereum transaction gets and is therefore just about the cheapest thing you can do gas-wise. (That fee would be the same if you were sending 1 or 1,000,000 ETH.) Complex smart contracts, like those used to drive staking protocols and play-to-earn games, will cost more to execute.
- How congested the network is. The busier the network, the higher the fee. If the gas fee is looking particularly high, it will generally be because the whole Ethereum network is under heavy strain.
- How fast you want it completed. You can elect to pay a higher priority fee — or tip — if you want to incentivise miners to process your transaction quicker. Sometimes you’ll be happy to wait a little longer in exchange for a lower fee, or vice versa.
It’s important to remember that a gas fee applies regardless of whether your operation or transaction succeeds or not. You’re paying for the computation, not the result. So if you attempt a transaction and it fails, you’ll still pay gas.
How to find Ethereum gas fees?
To find Ethereum gas fees, you have a few options available. Wallets like Metamask will automatically calculate the gas fee range on any given transaction, and you’ll have the option to either accept or decline it. Similarly, platforms that allow you to interact with the Ethereum blockchain (to mint an NFT, for example) will also generally inform you of the current gas fee before you complete a transaction, so you’re aware of how much it could cost you.
If you want a general sense of what gas fees are looking like right now, there are tools available. For example, Etherscan runs a gas tracker which gives you up-to-date estimates on current gas prices, including easy comparisons for common Ethereum transactions, like selling an NFT on OpenSea.
Don’t forget: gas fees can fluctuate significantly throughout the day, and complex transactions and operations will push the price higher.
How are ETH gas fees calculated?
ETH gas fees are calculated according to a relatively simple formula, which has changed somewhat since its introduction.
Gas fees are denominated in a unit named gwei, which is equivalent to one billionth of a single Ether (0.000000001 ETH).
Before the London upgrade, this was the formula:
Gas fee = Gas units (limit) x Gas price per unit
The gas limit is more or less a guess at the total amount of work that will be required to complete your transaction. It sets a maximum you are willing to spend.
Generally speaking, 21,000 units will be enough to satisfy most transactions and is widely considered the ‘standard’ gas limit. But it’s important to get it right. If your estimate is too high, you’ll get the excess refunded. But if it is set too low, the transaction will fail and you will lose your ETH. Thankfully — because it’s not easy to calculate — wallets and apps will usually do it for you.
So, if a transaction’s gas limit was the usual 21,000 units and the gas price was 300 gwei, the fee would be 6,300,000 gwei — or 0.0063 ETH. Under the old system, gas fees were intensely volatile and driven entirely by supply and demand. Gas fees could rocket upwards in the space of minutes if the network was under heavy stress, making for a pretty poor (and often expensive) user experience.
Gas fees since the London upgrade
Since the London upgrade, the formula has changed. Here’s how it works now:
Gas fee = Gas units (limit) x (base fee + priority fee)
The base fee refers to the minimum price per unit of gas a user has to pay if they would like to include their transaction in a block. It’s the lowest price they can pay if they want their transaction to be processed in a reasonable amount of time and is set by the Ethereum network based on demand. Since the London upgrade, the base fee is burned in an effort to manage the growth in the amount of ETH in circulation.
The priority fee — also known as a tip — helps determine how quickly the transaction will be processed. Want your transaction to go through more promptly? Push up the priority fee. To keep things simple, most Ethereum wallets tend to set this for you automatically, so most users won’t need to worry about it very much. Since the London upgrade, this is the only part of the gas fee that is distributed to miners.
Under the current system, if the gas limit was again the usual 21,000 units, the base fee was 100 gwei and the priority fee was 10 gwei, the sum would be 2,310,000 gwei, or 0.00231 ETH.
Do you pay gas fees when buying ETH?
You generally do not pay gas fees when buying ETH — at least not directly.
If you are purchasing ETH from an exchange like CoinSpot, which is how most users enter the world of cryptocurrency, then you are simply buying the tokens from that exchange, which then holds them for you. You will likely have to pay a transaction fee on that purchase, but it is usually not likened to Ethereum gas fees.
On the other hand, if you then transfer that ETH from the exchange into your own personal wallet, you will most likely pay a gas fee on that transaction. (The policies of individual exchanges will vary, so make sure you do your research.)
Why gas fees cost so much
Gas fees cost so much for a very simple reason: Ethereum is very popular. There is more demand for use of the network than there are miners to supply the necessary computational power, which leads to congestion. The gas price system tries to manage that discrepancy and keep the system running by making it cost more Ether to run operations on the Ethereum network.
It’s also worth remembering that because gas fees are denominated in gwei, they will naturally go up as Ether itself increases in value. So if the cost of Ether is high, you can expect to pay more in gas fees when making new transactions.
Methods for reducing Ethereum gas fees
There are a few methods to reduce Ethereum gas fees. Individual users can’t do much about the overall gas fee, but you can certainly do a few things to minimise how much you’re spending.
Use slower transaction time
With the priority fee system, it’s possible to opt for a slower transaction in exchange for a lower gas fee. If it’s not necessary for your operation to happen instantaneously, consider going slow.
Time your transactions
Gas fees are always going to be higher during peak times. It’s not always possible to stick to off-peak times, but you can minimise unnecessary spending. You’ll often find that gas fees will be lowest on weekends and overnight. (A particularly slow period is between midnight and 4am, EST (Eastern Standard Time, North America.) Similarly, you can keep an eye on the overall ETH price to find better timings.
Use a Layer 2 (L2) solution
Layer 2 refers to a secondary framework or protocol that is built on top of a core blockchain like Ethereum. L2 scaling solutions include protocols like Polygon and Optimism. They are usually intended to solve speed and scaling difficulties with the core network, and can help to take your transactions off the main Ethereum blockchain and minimise the number of times you directly interact with it — lowering your gas fees.
In summary
Gas fees are how the Ethereum network manages supply and demand and keeps the whole system rolling. Whether you’re sending ETH to another wallet or minting your latest NFT, a gas fee needs to be paid to ensure it is processed and a miner is compensated for doing so. That’s how gas fees work on Ethereum.
They’re undoubtedly a huge pain — and one of the biggest barriers to entry for new users and developers — but by being smart about when you interact with the Ethereum network, you can keep your costs as low as possible.