XEN Crypto minting is all a gas fee game, and that’s because XEN is free to mint, and the only thing you need to do is pay for the network transaction fee. This is why the minters are looking for different ways to save on gas to lower their cost of production. Setting a limit transaction with a lower gas fee than the actual one to be executed in the future rather than immediately is quite common practice, but not everyone knows these techniques. Many get rekt when their transactions fail, and some of the Bored Ape Yacht Club (BAYC) minters are the best example of how rekt one can be when aping into a project without knowing how to manage their gas. XENFTs are about to be released, and if you don’t want to overpay for gas or get rekt, read this guide to possibly save yourself some money.
Why did BAYC NFT minters got rekt on gas
When Yuga Labs did a pre-reveal of their Otherside NFT collection, many users paid thousands in gas fees for transactions, whether they were successful or failed. A total of 55,000 land plots were to be distributed among approximately 50,000 KYC-ed users. They all jumped at the chance to pay $5,846 per plot to join the club, and in just three hours, they netted Yuga Labs around $320 million. More than $175 million was spent on gas alone. Secondary sales on OpenSea fluctuated between $20,000 and $30,000. People paid up to $44,000 for gas fees to mint an NFT, and this is because the demand compared to the offer was so huge. When everyone flocked in to get a plot in Otherside, they were trying to get ahead of others by paying more for their transaction escalating the queue to always new highs. Those who got land in Otherside at least have an NFT even if they overpaid for gas, but those whose transactions failed got rekt because they paid even $4,500 (1.6 ETH) for something they didn’t get. During that time, the Ethereum network became pretty much unusable to many because, when a network is congested, everyone needs to pay higher transaction fees. For a simple token transfer, users had to pay even $1,700.
Will the XENFT launch repeat the BAYC rektness
XENFTs will be launched soon, and this may cause Ethereum network disruption for a while. This is because each XENFT is also a batch minter, so you not only mint an NFT but, depending on the category, you also need to batch mint XEN. Collector category XENFT is a simple batch minter where you can mint with 1 up to 128 VMUs (Virtual Minting Units or virtual addresses). Limited and Apex categories require at least 100 VMUs and a burn of XEN starting at 250 million. To avoid overpaying for XENFTs, it’s better to wait for the gas to go down, but sometimes you really want that NFT, and in the case of an Apex, it may make a difference if your top Xunicorn is number 1 or something else. In such a case, there are precautions to take to have the possibility to mint a desired XENFT without seeing a failed transaction.
Take your precautions
To understand how not to get rekt on gas, you need to know how gas fee works. It’s calculated based on this formula
Total Gas Fee = Gas limit x (Base fee + Tip)
where Gas limit is the maximum amount of gas you are willing to consume on a transaction. It’s also what’s needed for the contract to execute a transaction, and this fee shouldn’t be lower than indicated because it may cause your transaction to fail if you set it too low.
A Base fee is what you pay for every unit of gas. The base fee is burned, which reduces the supply of ETH.
Then there’s also a Priority fee or tip per unit of gas. A tip is given by the user to speed up a transaction.
As an example of the total gas fee formula, suppose I want to send you 1 ETH and the average amount of gas required to transfer ETH on the Ethereum network is 21,000 units. That would be my gas limit. The minimum amount of gas required to send the transaction at the time (base fee) is 120 gwei. I want to speed up the transaction, so I add a 20 gwei tip.
In this case, the total cost of sending you 1 ETH is 21,000 * (120 gwei + 20 gwei).
The total gas fee would be 2,940,000 gwei, or 0.00294 ETH (approximately $5.18, at press time)
MetaMask lets you use the low, medium, or fast gas option, or low, market, or aggressive if you’re in enhanced mode. It defaults to medium, or market price, but you can change it to low if you want lower gas prices, or aggressive if the network is congested and you want your transaction to be included faster.
The most common issues with gas
Sometimes the Ethereum network is congested, and your transaction needs to wait for free space in the block. Sometimes, if you set the fee too low, the transactions of other people with higher gas fees are picked up faster, and yours needs to wait. When the network becomes less congested and the gas fee goes down, then your transaction will be included. It may happen that you will need to wait a few days. It all depends on how low your fee is compared to the actual fee.
If you have such a pending transaction and you don’t want to wait, then you may speed it up. MetaMask will calculate a new, higher gas fee for you that will override the old one. This process re-uses the same nonce as the original transaction, so you do not need to pay for gas twice. If the network is congested, sending aggressive fee may make it pass faster, however this is not a guarantee in case of a very high network activity at that moment like for example the BAYC launch.
Before you take the Speed up step, you need to try a different method first, which is to close your browser, reopen it, and unlock MetaMask again. This may be a simple and quick fix.
Sometimes you have a few pending transactions, and adding new ones will only make it worse because they will be added to the pending transactions queue. In that case, you need to make advanced stuff. You need to go to MetaMask‘s Advanced settings and turn on Customize transaction nonce and Advanced gas controls. Now you need to go find the first transaction that is pending and take the nonce number. Next, you need to send a transaction with a 0 ETH value to yourself (to the same address you are sending from) and indicate the same nonce in the custom nonce field. Now, in advanced setting you need to choose higher gas than that you used for that pending transaction. Set your Priority fee at least 10% higher and the Max priority fee at least 30% higher than it was in the original transaction.
Sometimes it will happen that a transaction fails and you need to beware of it because in case of minting XENFTs it may cost you lots of money. You will end up paying for the transaction without getting a XENFT. This may happen if XENFTs will have a great success and everyone will ape in to mint them at the same time. Transaction fees will skyrocket and many will run out of gas if they will not have enough ETH in their wallet and their limit will be too low.
You will see Dropped and Replaced transaction next to Failed what means the transaction was dropped and replaced by a new one.
If your transaction failed and you see “ran out of gas,” that means the transaction had a cost in gas that, when multiplied by the gas price, resulted in a total amount of the network’s native currency that was greater than what you had in your wallet.
In other words all the gas units up to the limit you set were used up before the transaction could be fully processed. The computation has been done that’s why the fee was taken, but it wasn’t finalized due to scarce gas and it failed.
To avoid another “out of gas” error, you will need to increase the gas limit of your next transaction. This can be done just before sending your next transaction, once you have enabled Advanced Gas Controls.
If you want to see what other spent on a similar transaction to yours visit etherscan.io and navigate to the contract you wish to interact with. Start examining successful transactions that have been made with the contract. This will tell you of how much gas other users actually end up using.
How to set a limit gas transaction
If you’re minting XEN and you’re looking for the lowest possible gas, you need to set a limit gas transaction, which means that you set your Max gas fee to a lower one than the actual and you wait until it gets executed. You shouldn’t set it to a fee that is too low and will never be executed. For example, you can see on ultrasound.money or blocknative that during the week, the gas fee is about 20 gwei and sometimes goes down to 13, so if you set 13 as your Max gas fee, it will get executed.
It’s enough if you change only the Max fee and nothing else. That field may become red and you may see an alert saying Max fee too low for network conditions. You can disregard it because when the traffic will go down, the transaction will be executed as soon as the gas reaches 13 gwei. But remember that should you set 9 gwei and the gas will not go down to that level in a week or in a month, your transaction will not get executed, it will remain pending for all this time, and your account will remain unusable until it clears out. Change gas setting if you wish but monitor gas prices first to know what level is low but not too low to be never executed.
Shall you make a mistake and want to get rid of the pending transaction, follow the Pending transaction tips above.
On the contrary, if you want to mint a XENFT and you know that gas prices are very high because lots of people are going to mint them at the same time as you, you need to set a higher than usual gas price.
When you operate in congested network conditions always make sure to have some more ETH in your account in case gas prices spike, you need to speed up a transaction or want to replace it. If you use only limited amount of ETH just for the transaction you make, you may end up without ETH to untangle yourself.