Transaction pending on Ethereum?

I'm going to explain how to handle pending transactions on Ethereum. If you have a pending transaction on Ethereum, it will block future transactions. It's important that you handle it - here's how.

Gas fees

All transactions on Ethereum incur "gas fees". These fees are charged by nodes to process transactions. Gas fees depend on:

  1. Congestion: # of people who are trying to transact on the network.
  2. Complexity: the complexity of your transaction, i.e. is it a peer-to-peer transfer (simple) or are you buying and registering an NFT (complex).

Transactions remain pending because..

Transactions are prioritised based on gas fees, and your gas fee were too low.

On wallets like Metamask or Coinbase, you can set low, medium or high gas fees. Choose high if your transaction is critical.

Cancelling a transaction

If you transaction is pending, you need to cancel it before you can process another transaction.

To do so, you need to:

  1. Send a transaction from the same wallet to yourself (i.e. your public address).
  2. Set the 'Nonce' to your previous transaction. Nonce is the transaction number for transactions from your wallet. Most wallets require you to enable a setting before you can set a custom nonce. You can find your nonce on Etherscan.
  3. Choose a high gas fee (otherwise this transaction might get stuck too).

I did this on Metamask, but any wallet will do (though I had some problems with Coinbase wallet).

Annoying and expensive

Pending transactions are annoying and expensive. But there's a way out, and I'm hopeful that the UX will improve.