How to Fix Stuck MetaMask and Uniswap Transaction?
The propaganda around the DeFi means decentralized finance application on Ethereum is growing ascendingly from the past couple of years. A lot of products have been introduced, from decentralized lending to Yield farming, but the fewer have their experience with the usage and growth Uniswap has.
The amount of transactions being submitted and the number of users trading has a rise on Uniswap, an uncertain amount of congestion is being faced by the Ethereum network and on the other hand, has got higher transaction fees. With this, adding extra about the Uniswap’s small assets or micro-cap assets, the volatility is high, and is the transaction is frequently ending up going back due to the indefinable slippage of not being enough or the price of gas is becoming uplifted mid-transaction which then cause to stuck the transaction. On the other hand, MetaMask provides the built-in function to speed up the transactions that are pending.
Permitting advance settings for Nonce and Gas.
For, going to settings in MetaMask UI, at the top right corner, click the account logo, and then click on the setting. After going to the setting, then you have to go to the Advanced menu, where you’ll be able to permit the feature that helps to allow for a pending transaction to replace. There are two features that have to be enabled for the advanced Gas Controls and Custom Nonces.
- Advanced gas control
- Customize transaction Nonce
How to cancel and replace the transactions?
Following are the steps that will help for replacing and canceling the transactions. There are two options to apply for a replacement of a transaction or for the cancelation.
As a replacement, submission of new Swap transaction.
The Swap that was submitted was for buying the Tether (USDT) with your Ether (ETH) and you do not want to cancel the transaction, but instead, you want to replace the transaction. As you have submitted the Swap before, the same way we attempt for submitting another Swap, and with this, we will adjust the attributes of the transaction by the advanced features that we have enabled. And firstly, we have to adjust the transaction speed as fast as it is possible.
Then the gas price is knocked in gwei. When the gas price has defaulted to something around 100 gwei with the help of using the MetaMask as the fastest option, we will try to ridge it with 125-150 but you need to be certain about the gas price as it should be higher as compared to the pending transaction. And then, in the transaction application in the Custom Nonce field, at the bottom of the confirmation page for the transaction, enter the Nonce of the pending transaction.
This will help to let the transaction get into the queue for the same slot for transaction in the history address. As soon as the new transaction has been considered, the two transactions pending for Nonce will drop off your transaction pending list, and the new transaction Swap is confirmed on the Etherscan main transaction list.
Submission of empty transaction (ETH) for canceling the transaction.
The second option is for the scene where you want to cancel the transaction in place of replacing it. Let consider something, you tried to buy a Token A for the price of 0.001 ETH, and the price has been accumulated up to 0.01 ETH, and the transaction is still pending.
Instead of submission for another Swap, let’s just clear the pending transaction as the price change is above the range that we are willing to pay. For this process, a similar process is adopted as the above one, just instead of the new Swap submission; we will send the 0 ETH transactions to our very own address. With the help of this process, the new transaction has been sent to the queue.
To attempt this, by clicking on the top of MetaMask UI copy your address, and then click the send button. Then paste the copied address in the recipient field column.
Then click the ‘next’ option present on the first page to get to the transaction confirmation page. Then you need to follow the same process as Option 1. You can choose the fastest speed for the transaction in MetaMask to get a sensible default then knock the gas price high slightly.
Then you have to enter your Custom Nonce for matching the transaction that we were canceling. As the procedure is accepted the way we are going forward, the transaction will be included in a confirm block section and can see the SELF transaction in the history of Etherscan transaction compared to IN or OUT transaction.
These are the two options and the process for canceling your transaction and replacing the old with the new transaction.
How to reset the account?
- There is an ‘Account icon’ on the top-right corner of a MetaMAsk.
- After going to the account icon, click on the ‘Setting’.
- After the setting page is opened, click the ‘Advanced’ option.
- By scrolling down to the advanced option page, there is a ‘Reset Account’ option, click to it.
Before going to attempt this step, be sure because this is a irreversible action and is not common for the users.