What is Gas Fee?

Recently, many questions have popped up from users – Why does it cost tens to hundreds, or even thousands of dollars to do an operation on ETH? Why do I often encounter transaction failure when I buy NFT? Is there any way to reduce the transaction cost? On these issues, let’s start with the concept of Gas Fee.

What is Gas Fee

What is Gas Fee

Simply understood, it essentially holds the same meaning as “gasoline”. Just like how every car on the road consumes gasoline, on smart contract platforms such as ETH, every operation consumes Gas. The amount of Gas represents the cost of performing a particular operation in the blockchain network and is ultimately paid to the miner as a fee. Therefore, it is also known as the miners’ fee.

Gas fee = Gasoline

The Gas mechanism can incentivize the network ecosystem through payment, while effectively preventing the network from being clogged by too many meaningless transactions. Although, unlike Bitcoin, on the smart contract platform, a certain amount of Gas needs to be paid regardless of whether the transaction is successful or not. This is because even if it fails, the miner still consumes some resources for the validation calculation of this transaction.

How the Gas Fees are calculated

In ETH, Gas is paid with ETH and its price unit is gwei, and 1gwei is equal to 0.000000001ETH. Before the ETH London upgrade, the Gas cost calculation formula was:

  • GAS = gas limit * gas price

You can think of gas limit as the maximum amount of fuel a car needs to get to a certain place and gas price as the current unit price of fuel at the gas station.

We assume that User A needs to transfer 1 ETH to User B, and the current gas limit is 21000 units, the gas price is 200gwei, and its gas cost is: 21000 * 200 = 4200000gwei, which is converted to 0.0042ETH, i.e. User A transfers a total of 1.0042ETH from his account, of which 1ETH goes to User B, 0.0042ETH is the miner fee.

The Ethereum’s London upgrade in August 2020, to make gas price fluctuations smoother and more predictable, introduced EIP1559, with the Gas calculation formula adjusted to:

  • GAS = gas limit * (basegasprice base fee + priority fee miner tip)

Base fees are calculated based on current block space usage requirements and are burned directly after spending, and users can also set a miner’s tip (usually set automatically by the wallet’s third party) for transactions to be processed as quickly as possible when the network is congested.

EVM

Then, User A transfers 1 ETH to User B, assuming a gas limit of 21000 units, and the price of the basic fee is 100 gwei, another 10 gwei as a tip, its gas cost: 21000 * (100 + 10) = 2310000gwei, that is, 0.00231eth, of which User A’s account deducted 1.00231eth. User B received 1eth, 0.00021eth for the miner’s fee, and the basic fee of 0.0021 as a tip.

Why Gas fees are so high

On ETH, when the number of pending transactions exceeds the carrying capacity of each block, the sorting is determined by a bidding model. Paying a higher fee for gas means that it is easier to be selected by miners to be included in the nearest blocks and complete transaction confirmations faster.

With the rise of DeFi and NFT markets in recent years, decentralized trading, on-chain arbitrage, and liquidity mining have made more transactions migrate to the chain from the centralized exchanges, further pushing the price of Gas to keep climbing.

Besides, the rush activity of some items can cause gas to change drastically for a short period of time, so it is possible that the fee you pay for the current transaction is not enough to complete all the execution fees and may further cause the transaction to fail. So, for instant transactions, you can set higher gas fees, or speed up the transaction immediately after the transaction is submitted.

How to reduce the cost of gas

The transaction cost for a single transaction on ETH can sometimes be unaffordable for ordinary users. Developers are also always looking for solutions. As of current solutions that can be seen, one is to enhance the network scalability through ETH 2.0 which is also expected to alleviate the problem of high gas costs. Another solution is to migrate the application to the lower transaction costs of a Layer 2 network (L2).

However, ETH 2.0 is still far away, and L2 is yet to be perfected. Bridging to and withdrawing coins still requires users to pay high fees, and some layer 2 networks need a long withdrawal period, which cannot meet the needs of most users yet.

There may not be a single definitive solution for individuals to reduce the cost of on-chain transactions in the short term. For non-urgent transactions, you can monitor gas fluctuations through ETHGasStation and choose to operate when the network is relatively smooth.

Closing thoughts

The high Gas fee reflects the chain activity to some extent, and more active chain data also plays a positive role in network development and market valuation. However, the current high gas fee still has a great impact on user experience that needs to be solved urgently.

Start your travel on MEXC

MEXC Academy

Share your love to MEXC
Default image
MEXC Academy