Use a replacement fee to cancel pending ETH/ERC20 transactions in a DeFi wallet.

If you have used the Ethereum network, you should have experienced the problem of waiting too long for a transaction confirmation. This happens because the miners give priority to transactions with higher miner fees. When the transaction volume is too large, you will notice that your transaction processing time may be as long as several hours or even days.

If your Ethereum transaction is stuck due to low gas fee, you need to wait for the fee to drop before miners start processing your transaction. However, you can also choose to replace a pending transaction with another transaction with a higher gas fee.

See also: How do I speed up a pending ETH/ERC20 transaction?

Principles of Cancelling Transactions

In the Ethereum network, there will be no two transactions with the same "Nonce" value for the same address. Cancelling a transaction will send a 0 ETH transaction to your own wallet address. The Nonce value of this 0 ETH transaction is the same as the transaction that is scheduled to be cancelled. At the same time, the miner fee will be higher than the transaction that is scheduled to be cancelled. This will ensure that the 0 ETH transaction is given priority by the miners. When the 0 ETH transaction is successful, the transaction that is planned to be cancelled will fail, which achieves the purpose of cancelling the transaction.

Only transactions under "Pending" status can be cancelled. According to the basic principles of blockchain networks, successful transactions cannot be cancelled. Some extreme situations can lead to unsuccessful cancellation of a transaction. For example, after a 0 ETH transaction is issued, the transaction that is planned to be cancelled has gone through. In this case, the cancellation of the transaction will be unsuccessful.


 In Metamask, go to the "Activity" tab and look for the "Pending" transaction.


 Click on the transaction to view the details and write down the number for "Nonce".


 Go to "Settings"  >> "Advanced" and activate "Customize transaction nonce".

 Go back and click on your wallet address to copy it to the clipboard.

 You need to send 0 ETH (you need to key in "0" instead of leaving blank showing the default gray-out zero) to your own wallet using the Nounce number of the pending transaction (see step 2). Use the +/- button to change the Nounce number or tap on the existing number to edit. Click "Send" when you are ready.

Please note that if the new gas fee is too low, this transaction may also be stuck. Make sure that a reasonable gas fee is set.

 Wait for the confirmation for the new transaction to replace the pending transaction.

 Once the new transaction is confirmed, you may view the details at Etherscan. As you can see here, the Nouce value is 283 too. Etherscan also reported that another transaction with the same account Nounce was found and it is now dropped.

 When your transaction is pending, you are unable to use the Ethereum wallet. Sometimes, when network fees drop, stuck transactions are automatically cleared. However, this will take a long time. Thankfully, you can simply send 0 tokens to cancel the stuck transaction.

Copyrights UPOINT dotINFO