What is Gas Fee?

What is Gas Fee?

We mentioned Gas Fee in the previous chapter, and in this chapter, we will briefly introduce what Gas Fee is. What is the working principle behind it? Why does it matter to blockchain users?

What is Gas Fee?

In layman's terms, Gas Fee is the handling fee. When we ask third-party agencies to help us handle business, we are often charged a small handling fee, such as inter-bank transfers, payments at supermarkets, etc. When we conduct transactions on various blockchains, the blockchain is like a large-scale public cloud ledger, and the transaction records are distributed in each blockchain node in a decentralized, multi-copy manner. So what's the rationale behind it?

Miner

I believe that many people know Bitcoin for the first time, not because of the currently prevalent terms such as blockchain economy, NFT, etc. Still, because of "mining," a group of people keeps computers running day and night and causes all graphics cards on the market to be acquired. People who perform such tasks are collectively referred to as "miners." So what exactly is a miner? The blockchain relies on a large amount of recorded information and real-time updates. These behaviors require a lot of computer calculations to achieve, and these computers cannot appear out of thin air, so what should we do?

In the original blockchain, Bitcoin's way is to outsource these calculations to the ordinary user. As long as the user can help with data calculation after the accumulation reaches a certain level, the official will airdrop a certain amount of bitcoin to the user's account, that is, in bitcoin as a reward. Asking a large number of users to help with the record operation of the blockchain is called "mining," and the users who help with the calculations are called "miners."

How Gas Fee is Calculated?

After understanding the recording method of the blockchain, we can further explain the Gas Fee. Every transaction on the blockchain (whether a sale, a transfer, or a currency exchange) will consume a lot of computation. Gas is the unit of calculation on the blockchain. So when we buy NFT and exchange cryptocurrencies, the extra Gas Fee charged for this transaction will jump out from where the total amount is confirmed in the final transaction stage.

Generally speaking, each unit of Gas has a fixed price (Gas Price), which is how much Gas (Gas Limit) is required for the transaction performed by the user under normal circumstances. Use the formula Gas Price X Gas Limit = Final Gas Fee to be paid. However, users do not need to calculate by themselves. Metamask wallet will automatically calculate your total on the settlement screen when trading. Users only need to confirm whether the current Gas Fee meets the budget.

But another situation arises when the number of people doing transactions on the chain surges, causing computational congestion. If the records are made according to the order of application, it may take 1 hour to 1 day to confirm that the transaction is successful in the case of congestion. But it is almost impossible for users who want to make fast transactions on the blockchain to be willing to wait for such a long time. For example, imagine rushing to grab a limited amount of NFT and waiting an hour to exchange ETH.

To confirm their transactions by miners as soon as possible, the user will start to increase the gas fee paid and let the miners record the transactions with a high gas fee first so that the higher price will be awarded. On Ethereum, the default Gas Fee for transactions is fast, medium, and slow. The estimated time to complete the transaction is attached so that users can choose according to their conditions. The Gas Fee is often more expensive than NFT when grabbing popular NFTs.

As more and more people flock to the blockchain, the problem of rising gas fees has become more apparent. For this reason, many companies have tried to solve the problem. The most common way is to conduct transactions through side chains (Layer 2) to relieve the crowded calculation volume.

What is Layer 2? 

Layer 2 means the second layer, which is an auxiliary built on top of Layer 1, so Layer 2 cannot operate independently and is more like an auxiliary device of Layer 1, helping Layer 1 move more smoothly and smoothly. For example, the ether chain is Layer 1, and layer 2 is the side chain built on the ether chain, such as Polygon, which cannot operate without the ether chain. Therefore, Layer 2 is a protocol built on the Ethereum chain. The goal is to solve the problems of transaction speed and expansion on the Ethereum chain.

Why is Layer 2 critical?

Why does the Ethereum chain need to expand? Imagine that the ether chain is a one-story house, assuming it can accommodate 30 people. In the beginning, the ether chain was not popular, and the number of users was not high, so there were often only 15-20 people in the activity, and the overall user experience was very smooth. But later, because of the popularity, 100 people poured into the same house, so the overall activity space was crowded. The speed of recording transaction information changed from seconds to hours. Later, to record transaction information first, some people increase the Gas Fee given to miners, which makes the Gas Fee more expensive when multiple people conduct transactions.

To solve such a situation, the easiest way is to increase the transaction processing speed of the Ethereum chain or expand the capacity (increase the size of the house) so that 100 people can move smoothly. But this is not a simple job. The ether chain relies on complex programs to run and calculate. So you must be careful if you want to change the calculation method or expand the capacity. If you are not careful, it may lead to bugs in the entire ether chain. That would be worth the loss. Therefore, the overall upgrade of the Ethereum chain will be a long process.

Before the Ethereum chain was updated, many companies began to try to cooperate with the Ethereum chain to introduce solutions. These methods are Layer 2, built on the Ethereum chain but can help the Ethereum chain to clear the congested data record traffic. We can imagine that after expanding the scale of a small company, it cannot handle every detail in person as before and has to outsource part of the business to downstream manufacturers for execution, just like Nike outsources the production of sneakers to downstream factories.

How Layer 2 works

To put it simply, Layer 2 will help the Ethereum chain handle complicated calculations, including transaction records, so users are trading on Layer 2. Layer 2 will help us organize and record this transaction information together. It is handed over to the ether chain to make records so that it only needs to be responsible for recording a whole stack of information and does not need to calculate one by one.

The above is an introduction to the basic concepts of Gas Fee and Layer 2, hoping to help you better understand the concept of transaction costs in the NFT industry.