Ethereum: Gas Fees

George Apostolopoulos
Build Your Wealth
Published in
4 min readFeb 2, 2022

--

In this article, we will explain how Ethereum gas fees work. Briefly, we will examine:

  1. What gas fees are and how we measure them.
  2. What drives gas fees price.
  3. How to calculate gas fees, by examples.
  4. How to minimize gas fees.
  5. What will happen to gas fees when Ethereum transitions to proof-of-stake.
Photo by Rock Staar on Unsplash

What are gas fees?

Essentially, gas fees are payments. Users who make transtactions on the Ethereum blockchain, pay gas fees in order to compensate the transaction cost. Each transaction on the blockchain requires energy, in the form of electricity, to be executed. But where do gas fees go, once they get paid. Here is where miners get involved. Actually, a miner’s job is to facilitate transactions execution on the blockchain. Thus, gas fees are not just “lost ETH”. Gas payments are the action of paying the miners that help with transactions execution.

Gas fees are measured in GWEI, or nanoether. As the name suggests, the conversion rate is: 1 GWEI = 10⁻⁹ ETH.

At the time of writing this article, average ethereum gas price is 212 GWEI.

What drives gas price?

When anyone thinks about this question, the obvious answer that comes to mind is that gas fees must have something to do with the value of the transaction. Well, it doesn’t! Not at all! We will later see that regardless the value of the transaction, gas price is equal. So even if we send 0.05 ETH or 500 ETH, we will pay the same amount in gas fees.

So what determines gas price? The answer is, that it depends on two things:

  1. The network’s traffic. The more transactions that need to be executed, the higher the gas price will be. The explanation is simple. It requires more electricity in order to execute a transaction during high volume periods. This could also be translated into “Miners need to use more energy and thus, they need to be paid more”.
  2. The type of transaction. Each transaction type requires different amount of gas to be executed. For example, buying an NFT is more expensive than sending ETH from a wallet to another. The standard transaction fee is 21,000 GWEI.

How to calculate gas fees?

Luckily, there is a simple type that facilitates our life:

Total Fee = Gas units * (Base fee + tip)

Let’s explain every part of this equation.

Gas units

This is the number (2) in the previous section. The gas units (or gas limit) is the minimum amount of gas that a user must pay on a transaction. The standard transaction fee is 21,000 GWEI.

Base fee

This is the number (1) in the previous section. It refers to the minimum amount of gas that is needed in order to include a transaction on the blockchain. This differs depending on the network’s traffic, or else, the congestion level of the network.

Tip

If a user wants to prioritize their transaction to be executed early, the can pay a tip.

Examples

In both examples, let’s assume that the current gas price is 200 GWEI and that current conversion rate between ETH and USD is 1 ETH = $2,732.48.

Tom wants to send 1 ETH to Olive.
In this transaction, the required gas units are 21,000 GWEI. Let’s assume that Tom doesn’t want to pay any tip to the miners. Therefore, the final gas price that Tom will pay is equal to: 21,000 * 200 = 4,200,000 GWEI = 0.0042 ETH. Now we can easily find the amount in FIAT currency. So, final gas fee in USD, will be: 0.0042 * 2,732.48 = $11.48.

Peter wants to send an NFT (ERC-721) to Justin.
The required amount of gas varies in this situation. Typically, an NFT (ERC-721 token) requires more than 100,000 GWEI to be executed. But again, the numbers vary significantly. To make this example more meaningful, I will use the amount of gas needed for my last NFT transaction, which was 324,746 GWEI.
Now, let’s calculate. The final gas price that Peter will pay is equal to 324,746 * 200 = 64,945,200 GWEI = 0.065 ETH. Now we can easily find the amount in FIAT currency. So, final gas fee in USD is 0.065 * 2,732.48 = $177.46.

How to minimize gas fees?

Well, the best way to do it, is to prefer to make transactions when the network is not heavily loaded. This way, we can make sure that the gas price will be lower. At the same time, we can choose the amount of gas we are willing to pay, changing the gas limit, but this may lead to our transaction being forever on the queue. So, in my opinion, we should follow the first approach.

What will happen to gas fees when Ethereum transitions to proof-of-stake?

According to the official ethereum website (ethereum.org): “The new proof-of-stake model, introduced on the Beacon Chain, should reduce high power consumption and reliance on specialized hardware. This chain will allow the decentralized Ethereum network to agree and keep the network secure, while limiting energy consumption by instead requiring a financial commitment”.

This statement clearly explains, that the energy cost will be significantly lower. As such, the gas price will be lower and therefore, the final gas fee will be diminished.

Conclusion

In this article, we have covered everything related to gas fees. The Ethereum blockchain requires gas fees, in order to work. At the moment, gas price is high, because the network’s demand for electricity is also high. As such, it costs much money to execute a transaction. However, we expect that the gas price will be diminished significantly, once the blockchain transitions to proof-of-stake.

--

--

George Apostolopoulos
Build Your Wealth

I am a software engineer, passionate about financial independence and personal growth.