O que é limite de Gás, Gwei? Preço do gás na rede Ethereum 2024

As a member of the cryptocurrency community, you must have heard of Gas Limit and Gas Price, right? It is considered one of the most important factors for the functioning of the entire Ethereum network. This article will help you answer the question Gas limit, what is Gwei? Gas price on Ethereum. 

Learn what is gas?

Before getting into the concept of Gas Limit, what is Gas Price (Gwei), we will briefly learn about Gas to get a more comprehensive view. So what is gas? What gas is known as a unit of measurement? So what does this measure? Gas measures the computational work of a transaction or smart contract on the Ethereum network.

Simply put, this system is similar to how the KW becomes the unit for measuring the amount of electricity consumed. If the amount of electricity you use is not directly calculated in dollars, it is passed in kWH or Kilowatts/hour and then converted into the amount to be paid. The same goes for the Ethereum network, all through Gas to convert into currencies.

And the amount of gas for each transaction is not the same, but depends on many other factors. An example for you to easily imagine is the following: A simple transaction, specifically sending ETH from one place to another, only costs about 21,000 Gas. But if it is a transaction to send ICO tokens from MyEtherWallet wallet, higher calculation is required, so the fee will also be higher.

Learn more about what is a gas limit?

If you already understand the concept of Gas, it will be much easier to imagine the concept of Gas Limit. To learn more about this type of word, skip ahead to the next section. 

So what is Gas Limit?

Gas limit or gas limit means the maximum amount of gas you are willing to spend on a specific transaction you make.

Check out:  Is Myetherwallet Trustworthy? How it works? |→ Complete guide

The higher the Gas Limit also means that more computing work will have to be done to run the smart contract. As per the rule, the execution of an ETH transfer has a Gas Limit of 21,000 Gas.

The complexity of the orders you want to execute will be proportional to the amount of gas you pay. That is, you will have to spend more money on more complex computational tasks, which is very easy to see when participating in ICOs. These projects will require investors to deposit their ETH into smart contracts or withdraw money from this ICO, both of which will incur transaction fees much higher than the standard gas cap of 21,000 gas.

The explanation for this is not very difficult to understand, when ICO smart contracts have quite complicated command lines compared to normal, as well as requiring a lot more computational work, while the order to transfer ETH from one wallet to another is not very complicated.

Gas limit is the maximum amount of gas ready to spend

In order to protect users from running out of money due to coding errors or errors in smart contracts, Gas Limit is operated as a security mechanism.

What happens when the Gas Limit is set too low?

When the Gas Limit is set too low, it will affect the miners' transaction confirmation. Specifically, at first, the transaction will still be executed by the miner as usual. But when the gas runs out, the miner will stop confirming your transaction.

And of course, the blockchain system will not record your transaction as successful. Of course, your ETH is still in the wallet because that transaction failed.

In addition, your Gas is used for this transaction, even if it fails, it will also be kept by the miner or only a part of it can be returned.

What happens when the Gas Limit is set too high?

If given to miners, 2 options: Transaction A has a gas limit of 42,000 gas, transaction B&C has a gas limit of 21,000. So what transaction will the dignitaries choose to perform? The answer may be the first or the second, but the latter makes more economic sense.

Because when choosing number 1, miners after mining will give you back the unused gas, and in the second choice, they seem to consume the most and have nothing more to pay. Transaction B and C is made to add more value than A, isn't it? 

Check out:  Is MetaMask safe? how it works? - Learn to use

This answers the question, why shouldn't you set the Gas Limit so high. You should only put in a little more than the default, and for necessary trades do this to be sure.

What is the gas price?

If you are really clear about Gas Limit, here I will briefly introduce you to the second term, which is Gas Price.

Gas price overview

The gas price is translated as gas price, it is related to the amount of ether you are willing to pay per unit of gas or Gwei – full is the unit of measurement for each unit of gas. In simple terms, the price of Gas is similar to the amount to be paid per liter of gasoline. 

Familiarize yourself with concepts related to Gas Price

Wait(s) Median(s): This is the average wait time for a single transaction and is measured in seconds.

Average wait (blocks): This is the average wait time for a block transaction.

Standard (standard) cost for transfer: this is the average fee you will pay to transfer ETH for a standard priority transaction and it is in US dollars and the wait time is less than 5 minutes.

Gas Price Std (Gwei): This is the average fee you must pay to transfer ETH for a standard transaction based on the Gwei value. 

Low safe cost for transfer: This is the average fee you pay to transfer ETH for a low priority transaction, calculated in US Dollars and the wait time is less than 30 minutes.

Gas Price Safe Low (Gwei): This is the average fee you pay to transfer ETH for a low priority transaction, calculated in the Gwei value.

How to calculate transaction fees?

The final formula to calculate the transaction fee Ethereum is: Transaction fee = Gas used by Txn * Gas price

Transaction fee calculated by Gas Used by Txn * Gas Price

It is not difficult to see the amount of Gas Limit exceeding the actual gas level. Especially at a time when ICOs have become a craze. Because to give a greater chance of confirmation of the transaction, the house will raise the level of the gas price. Because they want to follow the trend of rushing to participate in the ICOs.

Check out:  What is ethereum? How to mine → Guide to buy and sell eth

How to convert gas to ether?

The conversion price will not be fixed but will change constantly. The person making the transaction can choose an arbitrary gas price level he wants.

Just as miners can choose the transactions they want to verify, of course this choice will depend on the Gas Price, the higher the Gas Price, the more attractive it will be for them. 

The average price of gas is usually around 20 Gwei (or around 0.00000002 ETH). When there are many transactions competing with each other, these numbers can be increased, at this time the network traffic is high.

What happens when the gas is refunded?

The amount of gas is non-refundable. In it, there are 2 commands that guarantee that the user will get the Gas back: This is SUICIDE (this is the command that will kill the smart contract, and the Gas that the user will get back is 24,000 Gas.) AND SSTORE ( It has the function of clearing the memory, from which users can retrieve 15,000 gases.

It is known that Gas is the temple's remuneration, it represents the efforts they calculated for the work. So, of course, it is not arbitrarily returned to the user. For this to happen, a certain condition must be added as follows: Returned Gas cannot exceed half of the Gas consumed in the calculation of transactions.


Surely, through the article above, you have understood the concept of Gas, as well as you have understood the issues surrounding the two terms Gas Limit, what is Gwei, and some information about Gas Price in Ethereum. Hopefully, after this article, you will have a better view of the issues raised at the beginning of the article.