Quick Links

If you've been looking into Ethereum or Ethereum-related things such as NFTs (non-fungible tokens) or smart contracts, you've probably heard of the Ethereum "Gas" fees required. These fees must be paid to make Ethereum work, and here's why.

Transactions Cost Money

Ethereum is a cryptocurrency, which means that people can buy and sell things with it. It's also possible to run complex code on the Ethereum "blockchain," which is how NFTs and smart contracts are possible.

However, all of these transactions and operations need computer hardware to process them. That computer hardware costs money. Unlike a centralized bank, there is no data center full of computers dedicated to crunching the numbers. All of the processing power used to make and verify transactions using Ethereum is donated by miners.

Gas Makes the Ethereum Blockchain Go

When you pay the "gas" fee on top of the transaction itself, that's the amount of currency with which the miner will be rewarded for providing the computing power needed to complete the job. The more effort it takes to complete a transaction, the more you'll have to pay.

Gas fees aren't just there to pay for the computational power needed to power the Ethereum blockchain, it's also a way to protect the network from being flooded with malicious transactions aimed at congesting things.

Since each transaction costs money, it makes it unlikely that the network will be spammed because it's too expensive to do so.

Gas Fees Fluctuate

That being said, computational power is a limited resource, which means that the law of supply and demand affects how much gas you need to pay to complete a given transaction. When the network is busy with lots of requests for transactions, users are essentially competing with one another to get their transactions verified first. This "bids up" gas fees on the network, making the cost of doing business higher.

This is why some Ethereum users reserve their transactions for weekends or certain times of day when activity is low, to push their transactions through at a lower price.

The more complicated an operation, such as executing a transaction or "minting" and NFT, the more gas it costs. During peak times these types of transactions can become truly expensive. Some platforms let you set a gas fee level you are comfortable with and will only execute when prices drop low enough. The tradeoff is that you'll have to wait an indefinite amount of time before your request is fulfilled.

Gas Is Measured in "gwei"

While gas fees are paid to miners an Ethereum, that's not the unit used to measure gas fees. Instead, gas is measured in "gwei". Gwei is short for "giga-wei". A gwei is equal to 0000000001 ether (ETH) which is also worth 1,000,000,000 wei. A single Wei is the smallest possible unit of ether.

So when you see gas prices, don't have a heart attack! That's gwei, not pure ether.

Understanding the Ether Gas Limit

The ether gas limit is the maximum amount of ether that a transaction can consume.  Users can set a gas limit which ensures that no more than that amount will be used for the transaction. There is a risk involved in setting your limit too low, since your transaction could be rejected if its limit is below the minimum the miner is willing to do the transaction for.

The gas limit for a standard transaction (just buying or selling something with ETH) is 21,000 units. (This was the case as of January 2022, although the Ethereum protocol could theoretically be changed to increase the gas limit in the future.) Smart contracts and NFTs can go much, much higher. If you set your gas limit higher than the transaction actually used, you'll simply be refunded the difference. If, on the other hand, if you've set it too low, you run the risk of losing that amount of ether and having your transaction fail.

Estimating how much gas your non-standard transaction will need isn't an exact science. This is why users often look at what such transactions usually cost (or are being charged at the time) and then tack 50,000 or 100,000 units on to that just in case. Remember that there's no risk to setting your limit too high.

In late 2021, the Ethereum blockchain underwent a "hard fork" referred to as the London Upgrade. Changes made to how fees are calculated in this upgrade are meant to smooth out gas volatility and make predicting costs easier. Only time will tell if that's actually the effect it will have. Either way, if you want to use Ethereum, you have to play the gas game.