What is a GAS and how to not overpay for GAS?
Many of us have memories of a time when the transaction fees were higher than the cost of registration or sometimes even tens times higher. Those were not easy times for the Community, but thanks to ETH xGOLD developers' efforts, we can all remember that as a bad dream.
🔎 As you know, the fees on the Ethereum network is made up of 2 parameters:
- the gas limit;
- the gas price.
Smart contracts on Ethereum are designed so that when any contract is accessed, a certain amount of gas is required for the contract to run its algorithm.
The calculation of the commission for running smart contracts is made up of:
gas limit * gas price
❗️The gas limit is determined by the smart contract complexity and the number of operations that a smart contract has to run. This is why the gas limit of a smart contract is primarily influenced by how this contract is developed and optimised.
🔄And the price of gas is determined by the load on the entire Ethereum network, and if there is high load on the network, the price will grow, as we saw a few months ago.
In creating xGOLD on Ethereum, past experience with xGOLD on TRON was drawn upon and a set of contracts were developed to work in conjunction with each other, keeping the whole system transparent and secure, but minimising the gas limit for the contract to work.
📉To see if the price of gas is low right now you can look on the graph at https://etherscan.io/chart/gasprice
For an example gas values in December:
⚠️ How to not overpay for GAS
We would also like to add that Metamask wallet users may see incorrect transaction fees due to overstated Gas Limit, which Metamask defines incorrectly itself. If your wallet determines a commission for your transaction too high in your opinion, the reason is probably Gas Limit, which is unreasonably high (found in Metamask version 8). How to set up Gas Limit and successfully complete an xGold ETH transaction, read further ⬇️
✔️In this case, manually adjust the value of the gas limit to 700,000 when Metamask prompts to sign the transaction. The fee amount will be recalculated to more closely match the real one. To do this, in the Metamask transaction window, select "Edit" in the gas fee field and click on the Advanced tab where you can edit the gas limit to the correct one:
‼️We do not recommend lowering the Gas Price, as the transaction may be stuck in MemPool for an extended period of time. To determine a suitable gas price, we recommend always referring to https://etherscan.io/chart/gasprice to check the current gas prices.
📍The actual fees can be seen on the page of recent transactions to the FORSAGE smart contract at https://etherscan.io/txs?a=0x5acc84a3e955Bdd76467d3348077d003f00fFB97 , by opening the details of a few recent successful transactions (Transaction Fee value).
Example: by clicking on the link
📉The trend is that the gas prices will fall further. This is not only due to the situation of launching ETH 2.0, where the network can handle loads hundreds of times higher, but also due to the declining interest in Defi products, which caused the rise of gas prices this summer.