7 Easy Steps to Resolve/Cancel Pending Ethereum (EVM) Transactions

Nonse Odion
4 min readApr 25, 2020
Ethereum
image from shutterstock

Don’t fret, cancelling or resolving a pending transaction on Ethereum or Ethereum Virtual Machine (EVM) chains like BNB Smart Chain, Polygon, Avalanche or Fantom is much simpler than you think. No nerdy stuff involved, you just need your crypto wallet.

I had some pending transactions and I cancelled them, easy. If you are in a hurry to resolve/cancel these transactions, you can skip to the Let’s Go section of this article. But if you are just as inquisitive as I am, and would love to know how I cancelled them, read on.

What is a Pending Transaction?

A transaction is pending when it has not been recorded. For your transaction to be recorded, you have to pay a service or transaction fee called gas to the miners (computers on the network that maintain the blockchain).
The miners work for profit; they’ll add only transactions that make them most profitable — transactions with high gas costs. I mean who doesn’t want to make a profit. I guess my gas fees were just too low for my transaction to be considered. No hard feelings.

Etherscan is a good platform to monitor the transactions on any Ethereum address. Other chains have their own block explorers too e.g Polygonscan is Polygon’s block explorer. It tells you if a transaction has been recorded and when it was recorded or if it’s still pending.

Etherscan showing Pending transactions
The first two transactions of this address are pending.

What is a Nonce?

This is a number used only once. To prevent double spending — spending the same money twice — Ethereum and other EVM chain addresses make use of a nonce. Every address assigns a number to each of its transactions. This number starts from zero for the first transaction on that address and is incremented by one with each subsequent transaction. This means no two transactions can have the same nonce. Each number is used only once on that address.

And so, what concerns a Pending Transaction and a Nonce?

Simple, since no two transactions can have the same nonce, I created a new transaction that had the same nonce as the pending transaction. This made it replace the pending transaction. For this to be possible, I’ll have to pay a suitable gas fee.

Let’s Go.

We’ll be cancelling an Ethereum transaction but you can repeat the same process for other EVM chains. You’ll need an Ethereum wallet with advanced send options. Coinomi and Trust Wallet on Android have this function. I’ll be using Trust Wallet.

1. Go on Etherscan and enter your address in the search box. You’ll see a list of all your transactions.

Etherscan search b
Etherscan’s search box

2. Select the transaction hash of the last successful transaction and take note of its nonce.

Transaction on
transaction hash of the last confirmed transaction of an address

3. You’ll need to find a suitable gas fee, your wallet will handle that for you. Eth-gas-station can also give you a suitable fee to be used.

EthGasStation showing gas rices with speed
Ethgasstation showing suitable gas fees according to the speed of transaction

4. Open your wallet, select Ethereum, and select send.

5. If you intend canceling your transaction, input your address and enter zero as your send amount.

But if you intend to resolve the pending transaction, enter the original address and amount sent in the pending transaction.

Trust Wallet
Address and amount spaces on Trust Wallet

6. Select Advanced and enter the nonce of the last confirmed transaction increased by one, into the nonce space

Trust wallet send
The settings icon on Trust Wallet

The settings icon when selected takes you to the advanced options of your transaction on Trust Wallet.

Trust Wallet Advanced
nonce space under the advanced options menu (Trust Wallet)

Add one to the nonce of the last confirmed transaction and enter in the nonce space

7. Save and send your transaction.

Your transaction will appear as confirmed in no time, and the pending transaction will be discarded.
To prevent this from ever happening again, always select suitable gas fees for your transactions. Usually, your wallet will give you a suitable fee, but if you are still uncertain, Eth-gas-station will be a good stop. EtherScan will also help you monitor your transaction status. For your confirmed transactions, here’s how you can track them.

Thanks for reading, please do leave claps, comments and questions are also welcome.

--

--