42. Everything you need to know about gas fees in Ethereum!
To make cryptocurrency transactions on most blockchains, you have to pay a transaction fee. Depending on the blockchain, this fee varies.
In the case of Ethereum, a transaction fee is charged when you use the network and is called a gas fee. We wrote about it here, the native cryptocurrency of the Ethereum protocol is Ether (ETH) and Ether is used to pay the transaction fees.
Interestingly, gas is used to pay for computing resources on the Ethereum blockchain. For example, we use gas when:
- We want to send ETH.
- We want to mint or buy/sell non-convertible tokens (NFTs).
- Using smart contracts based on Ethereum. If you want a reminder of what smart contracts are and how they work, take a look here.
- When we create decentralized applications, dApps.
Of course, the amount of gas used for these processes varies, but at the same time it is important for the users of the network. Normally, the transmission of ETH is cheaper, while the creation of complex smart contracts or dApps requires a higher gas consumption. The price itself is determined by the supply and demand for transaction capacity on the network during the execution of the different processes.
What affects the size of the gas fee?
Gas prices on the Ethereum network vary widely. They can even vary from week to week, from time of day to time of day, or during peak hours on the network.
So, how can you calculate the cost you will incur from the gas fee? You can use gas fee calculators that will determine and estimate the amount of the fee for you. Interestingly, many wallets designed for Ethereum users (like Metamask) have such calculators built in. Then the fee amount is automatically calculated for you.
You can also find gas fee trackers on the Ethereum network that track the price of gas in real time. You can then use the “wait and watch” strategy and invest in the network when the gas price is at its lowest.
When using the Ethereum network, you need to keep in mind that gas fees increase when network demand exceeds protocol capacity. Remember the ICO boom in 2017 or the decentralized finance (DeFi) boom in 2020. This has led to very high gas fees. You can read about decentralized finance here [LINK-WHAT IS DEFI-BASIC LEVEL].
Another example is the Cryptokitties. The launch of this famous NFT project has caused a blockade on the Ethereum network. For users of the network, such actions are certainly frustrating. However, it should be kept in mind that gas upgrades are usually used to restore the balance between supply and demand in a particular blockchain protocol.
To whom do the gas charges go?
The gas fees we pay go to the ecosystem supporters and those who secure the Ethereum network. At the execution level (Ethereum 1.0), these fees go to the miners. On the consensus level (Ethereum 2.0), these fees go to the ETH stakers.
Why are the gas costs not settled via the ether?
Because it is so much easier and quicker. One ETH is equal to one quintillion wei. For this reason, gas charges in the ether are frequently expressed in GWEI – which in turn is equal to a billion wei.
Although there are more than ten different terms for ETH, these two terms are the most commonly used. Most users of the ecosystem rely on GWEI as their base unit. For this reason, we will see trackers and fee calculators in this unit.
Remember, too, that with the increase in Ethereum gas fees, the number of Layer 2 solutions has also increased. Their job is to lower the fees. Examples of Ethereum scaling solutions are Arbitrum, Polygon, Optimism, or Skale Network.
How do you determine the gas fee in Ethereum?
As mentioned in the above paragraphs, the gas fee is not fixed. It depends on two factors – the gas units and the gas price. The gas fee is therefore the product of these two components.
A gas unit is a number that depends mainly on the number of calculations required to complete a particular transaction. Example: If you send someone ETH, you need 21,000 gas units to do so. This is the minimum number required for each transaction. Also remember that the price of gas is affected by the demand for transactions. The more traffic there is in the Ethereum ecosystem, the higher the price will be.
So, how can we calculate how much we will pay for gas without using trackers or a calculator? We count!
We need to send our friend some ETH. At this point, we ‘assume that the price of one unit of gas is 100 GWEI.
- (Minimum number of units) x 100 GWEI = 2,100,000.
GWEI is one billionth of ETH, so we pay 0.0021 ETH for our transaction.
If you want to represent your calculations in USD, then you need to multiply your result by the current Ether price. Volia!
Base fee vs. final fee
The base fee is a minimum price for gas that is determined algorithmically based on the real demand for blockspace on the Ethereum network. The base fee is burned to reduce the amount of ETH in circulation.
The final (priority) fee is taken into account when we want the transaction to be processed faster. This circumvents network congestion and indirect queues. The higher the final fee, the faster the transaction will be processed. Usually, the time is about 30 seconds.
How can you reduce your gas fees?
- Optimize transaction time or “wait and see”.
- Discounts for users of certain apps. One example is Balancer, a dApp that refunds the cost of gas fees in the form of BAL tokens.
- The DeFi Saver app can be used to minimize charges.
- Tier two solutions, such as the aforementioned Polygon and Harmony. They offer solutions that scale Ethereum and reduce its gas fees.
Gas fees on the Ethereum network are sometimes a challenge for users of the network users. However, this is a minor minus in the series of superlatives that this blockchain protocol has.
Also, remember that transaction fees are meant to prevent spamming on the network, because trying to do something can indeed be too expensive.
The second fact is that transaction fees in Ethereum help reduce the inefficiency of smart contracts and dApp codes that can reduce network speed and bandwidth.
- Gas fees are the fees we pay with blockchain Ethereum.
- These fees largely depend on the price of Ethereum and network congestion.
- To reduce gas fees and optimize the Ethereum ecosystem, the network uses Layer 2 solutions for this.
- The Merge had no impact on the gas fee amount.