NFT Guide: How Do ETH Gas Fees Work?
This article is a quick and simple way to understanding and explaining what ETH gas fees are. You will learn how to save on gas fees and how gas works for NFTs.
🤔 What Are Gas Fees?
There are basically two things that will determine the price of a transaction on Ethereum, they are the price of gas in gwei and the amount of gas you will need to execute the transaction or smart contract.
You can think of this as filling up a car with gas. If lots of people are using the network gas is in high demand, so the price of gas goes up. This would be like paying more for your liter/gallon of gas at the pump. A transaction/smart contract is like a trip you will be going on in the car. A normal transaction is like a very easy short trip in your car, so you only need a liter/gallon of gas to get where you're going. A smart contract is a much longer trip and requires several gallons of gas.
The below video is a visual representation of the people in the blockchain found here. As you can see on the left, Ethereum users are waiting for the next block to be mined. The Ethereum block is represented by a car, and the people who picked ‘slow’ are waiting in a large group to be picked by the Ethereum miner when it is profitable for them to do so. The ‘slow’ group being pushed behind usually has a wait of <10 minutes, sometimes in an excess of hours or even having the transaction failed. When the tx fails, the gas fees are deducted from your account without your intended action. Whether that be sending an ERC-20 token or minting an ERC-721 token (NFT). Be sure to cancel when you can see you are too behind to not waste gas. Please make sure to subscribe to the free newsletter if it helped you learn about gas in a simple way.
The faster group on the left side hopping into the fast car means that they have set their gwei at a higher amount than the slower group, therefore getting higher priority by the miners and a faster transaction.
The amount of gas you need to execute a transaction or smart contract does not change with network traffic and congestion, only the price of the gas itself does. An NFT requires the execution of a much more complicated smart contract than a normal transaction, so you have to buy a lot more gas to get the smart contract processed by the network as it takes up more block space.
🤫 How To Save Gas Fees
There are ways to reduce your transaction costs by altering the amount you are willing to pay for gas. You can lower the amount you are willing to pay in GWEI and your transaction will get picked up when it becomes profitable for a miner to process it. You can look at graphs of gas prices over the last several hours/days to create an estimate of whether or not the gas price you bid is likely to get picked up in a reasonable amount of time. The graph below can be found at gasnow.org and is extremely informative with current/past gas prices.
This can be very useful when you are doing transactions that are not time-sensitive, like sending crypto to yourself or minting an NFT. However, if you are doing a time-sensitive transaction like a swap on Uniswap you must be careful because if the price of the swap changes too much before your transaction is picked up and processed the transaction may fail. When this happens you still lose a bunch of ETH to gas fees for the failed transaction.
Don't mess with the amount of gas unless you really know what you are doing. If you run out of gas before the smart contract or transaction can execute fully the transaction will fail and you will lose all of the gas fees you paid. This is like only putting a gallon of gas into your car when you know you need to drive 100 miles. You'll never get there.
⌛ Conclusion
While you are looking around why not check out our Youtube Channel NFT Post for some free content? Make sure to subscribe and to be notified for each video upload! You can also follow me on Twitter @HuhaoNFT for giveaways and the latest happenings in NFTs.
If you want more of these articles, you can receive them through our free new NFT Post newsletter. Just click on ‘Subscribe now’. We like NFTs.