IndexCrypto
Educational only. Not financial, tax or legal advice, and nothing here is a recommendation to buy anything.

Nonce and Transaction Order: Why One Stuck Blocks All

The nonce forces a strict order per account, which is why one pending transaction blocks every later one. How replacement and cancellation actually work.

  • Difficultyintermediate

The nonce is a small field with outsized consequences. It explains why a single pending transaction stalls everything behind it, why cancelling is not really cancelling, and why a wallet sometimes refuses to send anything at all until its view of the account is refreshed.

What It Is For

Every account has a counter. It starts at zero and increases by one for each transaction the account gets confirmed.

Each transaction includes the counter value it expects to occupy. The network will only include a transaction whose nonce is the next one due for that account.

This does two things. It makes the order of an account’s transactions deterministic, so they execute in the sequence the sender intended. And it prevents replay: a confirmed transaction cannot be resubmitted, because its nonce is already spent.

The Queue

Because the order is strict, a pending transaction occupies its position exclusively until it confirms or is replaced.

If nonce four is pending with a fee too low to attract inclusion, and you then submit nonce five with a generous fee, five cannot be processed first. It waits. This surprises people who assume raising the fee on a new transaction will get it through.

The queue clears in exactly one way: nonce four confirms, or it is replaced by something that does. Everything behind it then becomes eligible in order.

SymptomCauseAction
Transaction pending for a long timeFee too low for current conditionsReplace with a higher fee, same nonce
Later transactions also stuckThe earlier nonce is blocking themClear the earlier one first
“Nonce too low”That nonce is already confirmedRefresh the wallet’s account state
“Nonce too high” or queued indefinitelyA gap in the sequenceSubmit the missing nonce
Wallet shows a different nonce than the explorerLocal state is staleReset the account in wallet settings

Replacement

A replacement is a new transaction with the same nonce as the pending one and a higher fee.

Nodes hold pending transactions in a local pool and will substitute a replacement when the fee increase is large enough to meet their threshold. A marginal increase is usually rejected, which is why wallets suggest a meaningful step rather than a token one.

Only one of the two can confirm, because both claim the same nonce. Once either is included, the other becomes permanently invalid.

This is what a wallet’s speed-up button does.

Cancellation

There is no cancel operation. Once a transaction is broadcast it exists in node pools and cannot be withdrawn.

What passes for cancellation is a replacement designed to do nothing: same nonce, higher fee, sending zero value to your own address. If it confirms first, it consumes the nonce and the original can never be included.

Two caveats matter. It is a race, not a guarantee, and the original may confirm first. And it costs a fee, because a transaction that does nothing is still a transaction.

This is the mechanism behind a wallet’s cancel button, and understanding it explains why cancelling sometimes fails.

Gaps in the Sequence

A transaction with a nonce higher than the next one due cannot be processed. It sits in node pools waiting for the gap to be filled, and it may be dropped after a time.

Gaps usually arise when a transaction is submitted and then lost, or when a wallet’s local counter drifts ahead of the account’s actual state.

The fix is to submit the missing nonce, which releases everything queued behind it. Where the wallet will not let you set a nonce directly, resetting the account in its settings forces it to re-read the true value from the network.

Stale Local State

Wallets track the next nonce locally so they can build transactions without waiting for a query. That local count can drift out of step with reality, particularly after switching networks, using the same account in two wallets, or interrupting a submission.

The result is a wallet insisting on a nonce that is already used, or one too far ahead. Neither is a fault in the account; both are the wallet’s bookkeeping.

Most wallets provide an account reset that clears the local transaction history and re-reads the nonce. It does not affect funds, which live on the chain rather than in the wallet.

What People Get Wrong About This

The first mistake is raising the fee on a new transaction to get past a stuck one. The new transaction is behind the old one in the queue and its fee is irrelevant until the old one clears.

The second is believing cancellation removes a transaction. It replaces it, and only if it wins the race.

A third is submitting a replacement with a trivially higher fee. Nodes reject replacements that do not clear their threshold, so nothing changes.

A fourth is using the same account in two wallets simultaneously. Both maintain their own local nonce and they collide.

And the last is assuming a long-pending transaction has failed and the funds are gone. It is pending, the nonce is held, and the funds are still yours; see stuck transactions for working through it.

Fee mechanics determine whether a transaction is attractive to include at all, which is the other half of this picture; see gas fees and gas limit and price. Ordering within a block, as opposed to ordering within an account, is a separate subject covered in MEV and sandwich attacks.

Common questions

What is a nonce?

A counter attached to each account, incrementing by one for every transaction that account has confirmed. It is included in each transaction, and the network will only process transactions from an account in nonce order. That ordering is what stops a transaction being replayed and what makes the sequence deterministic.

Why does one stuck transaction block everything after it?

Because the network processes an account's transactions strictly in nonce order. A transaction with nonce five cannot be included before the one with nonce four. If four is pending because its fee is too low, five waits behind it regardless of how generous its own fee is.

How do I replace a stuck transaction?

Send a new transaction with the same nonce and a higher fee. Nodes accept it as a replacement if the increase is large enough to meet their replacement threshold. Whichever version is confirmed consumes that nonce, and the other becomes invalid.

How do I cancel a transaction?

There is no cancel operation. What is called cancelling is a replacement that does nothing: a transaction with the same nonce sending nothing to yourself, with a higher fee. When it confirms it consumes the nonce, and the original can no longer be included.

What does nonce too low mean?

The transaction carries a nonce that has already been used by a confirmed transaction from that account. It cannot be included because that position in the sequence is taken. This usually means a wallet was working from a stale view of the account and needs its state refreshed.

Read next