Skip to main content
Blocktape

Crypto markets, protocols and policy

How to clear a pending swap blocked by an earlier nonce

What is a nonce in an Ethereum transaction? The lowest pending nonce holds later transactions until it confirms or is replaced with a higher fee on that network.

The Blocktape Editors 3 min read 010403

How to clear a pending swap blocked by an earlier nonce

To free a pending swap, find the lowest pending nonce and get that transaction confirmed or replaced. A Matcha swap exchanges tokens through routes across liquidity sources, but its place in your wallet’s queue still depends on the account’s nonce. Start with the account’s transactions on Etherscan, identify the lowest pending nonce, then use MetaMask to speed up or replace that transaction; the queue clears when it confirms.

One pending nonce can hold every later transaction

A nonce is the sequential number attached to each transaction from an Ethereum account. The first transaction uses nonce 0, and each later one increases the count by 1.

Nodes process an account’s transactions in nonce order. A transaction at nonce N must be processed before one at N+1, so a low-fee transaction that remains pending can hold back every later transaction from that account on the same network. A missing nonce can also leave a gap that prevents higher-numbered transactions from proceeding.

Say you submitted an approval at nonce 41 with a fee too low for it to confirm. A Matcha swap sent next with nonce 42 can stay pending behind that approval, even if the swap itself has a higher fee. The approval is the blocker because it has the lower nonce.

Nonce is easy to confuse with gas fee, but they answer different questions. The nonce sets a transaction’s order in the account’s queue; the fee affects how attractive it is for a validator to include the transaction. Raising the fee on nonce 42 cannot make it pass a still-pending nonce 41.

Find the lowest pending nonce and clear it

On Etherscan, review the account’s Ethereum transactions and find the lowest nonce that is still pending. Compare it with the higher nonces waiting behind it. That lowest pending transaction is the one to resolve first.

In MetaMask, try speeding up that transaction or replacing it with another transaction using the same nonce and a higher fee. Geth’s default replacement rule requires the new fee to be at least 10% higher; the exact replacement policy can depend on the node handling the transaction. Once the blocking nonce confirms, nodes can process the later transactions in order.

Nonces are counted separately on each network. A pending Ethereum transaction from an address does not block that address’s swaps on Arbitrum or Polygon, because those networks maintain separate transaction sequences. The deciding factor is the lowest pending nonce on the network where the swap was sent: clear that transaction, and the queue behind it can move.

Related stories