Gas Fees

What are Gas Fees?

Contrary to their name, gas fees are not related to the use of liquid fuel or the environmental impact of mining. Instead, they are the rewards miners earn for solving complex math puzzles or confirming transactions. Gas fees are like the tips you leave to waiters after serving you.

Since blockchains are decentralized, transactions are confirmed and added to protocols by anonymous individuals, known as miners. Generally, this is the foundation for any transactional blockchain technology.

The Proof-of-Work (PoW) consensus mechanism requires miners to solve complex math puzzles to verify transactions. In doing so, they are rewarded with newly minted Ether tokens. Additionally, miners earn Ether tokens by verifying transactions submitted by Ethereum users.

Over 3500 decentralized applications (dApps) run on the Ethereum blockchain, and their transactions must be validated along with other Ethereum users. Gas fees are denoted in tiny fractions of Ether (ETH), commonly known as gwei or nanoeth. The network assigns Ethereum Virtual Machine (EVM) resources to dApps like smart contracts for purposes of self-execution in a secure and decentralized environment.

The precise amount of gas fees is influenced by supply and demand factors between the miners and the network users. They can choose not to validate a transaction if the gas fee doesn’t meet their target.

Summary

  • Gas fees are rewards miners earn for entering transactions into the Ethereum blockchain or confirming them
  • The PoW consensus mechanism requires miners to solve complex math puzzles to verify transactions
  • Gas fees are affected by supply and demand factors between the miners and the network users
  • Gas fees are priced in small fractions of ETH known as gwei

How to Calculate Gas Fees

In this section, you will learn how gas fees were calculated before and after the London Upgrade.

Before the London Upgrade

The way Ethereum gas fees were calculated changed with the London Upgrade of August 2021. Now, let’s see how things worked out then:

Let’s assume Shir had to pay Josiah 1 ETH. The Etherscan Gas Tracker shows the gas limit is 21,000 units, and the gas price is 200 gwei.

To find the total fee, multiply the gas units by the gas price per unit. In this case, 21,000 * 200 = 4,200,000 gwei or 0.0042 ETH.

When Shir initiates the transaction, 1.0042 will be subtracted from her wallet. Josiah will receive 1 ETH. The validator of this transaction would earn 0.0042 ETH.

After the London Upgrade

The London Upgrade came into effect on August 5th, 2021, making Ethereum transactions more predictable for users by revamping Ethereum’s gas fee method. Generally, the upgrade ensured better transaction gas fee valuation, fast transaction verification, and balancing the ETH minting by burning a certain portion of the gas fees.

After the London Upgrade, each Ethereum block contains a base fee, the minimum price per unit of gas for inclusion established by the network pegged on demand for block space. Since the base fee of the transaction charge is burnt, Ethereum users are expected to include priority tips in their transactions. The tips will be used to reward validators for verifying and incorporating transactions into blocks.

To calculate the total gas fee, multiply the gas units by the base fee and tip.

Gas Fee = Base units (limit) * (Base fee + Tip).

Again, let’s assume Shir wants to send Josiah 1 ETH. The Etherscan Gas Tracker indicates that the gas limit is 21,000 units and the base fee is 100 gwei. Shir adds a tip of 10 gwei.

Using the method above, we can calculate the total gas fee as: 21,000 * (100 + 10) = 2,310,000 gwei or 0.00231 ETH.

When Shir initiates the transaction, 1.00231 ETH will be deducted from her account. Josiah will receive 1 ETH, and the transaction validator will be tipped with 0.00021 ETH. The base fee of 0.0021 ETH is burned.

What Makes Gas Fees so Expensive?

Gas fees denomination in gwei and Ethereum’s variable standard formula are the two main factors that make gas fees so expensive. Let’s have a closer look at each of these factors.

Gas Fee Denomination in Gwei

The first reason gas fees are so expensive is that Ether costs more. Earlier on, we mentioned that gas fees are priced in gwei – a convenient and fractionalized method of representing ETH. The thriving decentralized finance (DeFi) and NFT landscapes have contributed to the high demand for ETH.

Ethereum’s Variable Standard Formula

The second reason why gas fees cost more is the dynamics of Ethereum’s gas fee calculation formula. Earlier, we highlighted that base fees are the least amount of gas needed to add a transaction into the Ethereum network and vary in response to the demand for transaction inclusion. For this reason, base fees have steadily increased due to the rising demand for the Ethereum blockchain.

The extensive use of Ethereum has led to an increase in base fees and made them increasingly volatile. Ethereum’s EIP 1559 Upgrade modified the base fees calculation formula to make gas fees more stable.

Final Thoughts

Ethereum gas fees have risen dramatically in the past five years. Since gas fees are denominated in gwei, when the value of Ether increases, the gas fees also rise. Furthermore, the gas fees will continue to rise as the Ethereum network goes mainstream because of its smart contract features.

The change to Proof-of-Stake (PoS) mechanism promises to minimize Ethereum gas fees by considerably scaling transaction-handling capacities and eliminating miners from the equation.