What Does a Nonce Gap Mean and How Does It Affect Pending Transactions?
A nonce gap is a missing number in the sequence of transaction nonces associated with a specific wallet address. It means that a transaction with a lower nonce was never confirmed or mined, so every transaction with a higher nonce is stuck waiting in the mempool, unable to be processed until the gap is filled. In practical terms, a nonce gap is the on-chain equivalent of a traffic jam caused by one car breaking down in the middle lane: nothing behind it moves until that car is pushed out of the way.
What exactly is a nonce?
Before you can interpret a nonce gap, you need to understand the nonce itself. Every transaction you send from a wallet includes a nonce - a counter that starts at zero for the first transaction ever sent from that address and increments by one for each subsequent transaction. The blockchain uses this number to enforce transaction ordering. If you send two transactions from the same wallet, the one with the lower nonce must be confirmed first, regardless of which one you sent later or which one has a higher gas price.
This design prevents double-spending and ensures that transactions from a single address are processed in a strict sequence. The nonce is not a global counter; it is specific to each wallet address. A nonce of 5 on one address has no relationship to a nonce of 5 on another.
What does a nonce gap look like?
A nonce gap appears when you look at the transaction history for a wallet on a block explorer and see something like this: transactions with nonces 0, 1, 2, 3, 4, and then 7, 8, 9. Nonces 5 and 6 are missing. That is the gap.
The missing nonces do not mean the transactions were lost. It means those transactions were either never submitted, were rejected by the network, or are still sitting in the mempool unconfirmed. Because the network enforces strict ordering, the mempool will hold all transactions with nonces higher than the gap. It will not broadcast them to miners or validators until the gap is filled.
Why do nonce gaps happen?
Several common situations create a nonce gap:
-
A stuck transaction that never confirms. You submit a transaction with a low gas price during a period of high network congestion. It sits in the mempool for days, perhaps eventually dropping out of most nodes' mempools. Meanwhile, you submit another transaction from the same wallet with a higher gas price and a higher nonce. The second transaction cannot be confirmed because the first one is still missing.
-
Manual nonce management. Some wallets allow you to set a custom nonce. If you set a nonce too high and then send a transaction with a lower nonce, you have created a gap. This happens most often with power users, hardware wallet interfaces, or command-line tools.
-
Wallet software bugs or crashes. Occasionally, a wallet will use a nonce for a transaction that never actually gets broadcast, then continue to use the next nonce. The result is a gap that the wallet may not even be aware of.
-
RPC node issues. If you are using a custom RPC endpoint and it fails to propagate a transaction, your wallet may not realize the transaction was never broadcast and continue from a higher nonce.
How does a nonce gap affect pending transactions?
The effect is straightforward and severe: every transaction you send from that wallet with a nonce higher than the gap will not confirm. The transactions are not rejected; they are held in limbo. They may show as "pending" in your wallet interface, but they are not being propagated to the network in a meaningful way because miners and validators ignore them.
This affects not just the transactions you send after the gap appears, but also any transaction that was already in the mempool with a higher nonce. If you had a transaction with nonce 5 stuck, and you send a transaction with nonce 6, transaction 6 will not confirm until transaction 5 does.
The practical consequence is that your wallet appears frozen. You can still send transactions, but none of them will go through. Your funds are not lost, but they are effectively inaccessible until you resolve the gap.
How to Find a Nonce Gap
You do not need special tools to spot a nonce gap. Any block explorer will show it:
- Open the explorer for the network you are using (Etherscan, BscScan, Polygonscan, etc.).
- Enter the wallet address in the search bar.
- Look at the transaction list. If you see a "Nonce" column, sort it or just scan it for missing numbers.
- If the explorer does not show nonces by default, look for a "Transactions" tab and check the details of recent transactions - the nonce is listed in each transaction's details page.
Alternatively, you can use an API endpoint or a script to query the nonce for a wallet at the current block height. The "next nonce" value returned by the node tells you what the next expected nonce should be. If your wallet has a confirmed transaction with nonce 10, and the node says the next nonce is 15, you have a gap of four missing transactions.
How to Fix a Nonce Gap
Fixing a nonce gap requires filling the missing nonce with a valid transaction. The standard approach:
-
Identify the lowest missing nonce. This is the one you need to fill first. If nonces 5 and 6 are missing, start with 5.
-
Send a transaction with that exact nonce. You can send a transaction to yourself, or to any address, with the missing nonce. The transaction can be for zero value (if the network supports it) or a small amount of the native token to cover gas. The key is that the nonce must match exactly.
-
Set a reasonable gas price. If the network is busy, you may need to set a higher gas price to get this transaction confirmed quickly. If the network is quiet, a standard gas price will work.
-
Repeat for each missing nonce. You must fill every gap in order. Once nonce 5 is confirmed, nonce 6 becomes the next valid transaction, and you can fill that one.
-
Once all gaps are filled, your higher-nonce transactions will confirm. They may confirm immediately if they are still in the mempool, or you may need to resubmit them.
What if you cannot fill the gap?
If you do not have the private key for the wallet, you cannot fill the gap. This can happen if the gap was created by a wallet you no longer have access to, or by a contract that sends transactions from an address you do not control. In that case, the stuck transactions are permanently stuck. There is no way to skip over a missing nonce.
If you have the private key but do not want to send a transaction, you can use a "nonce replacement" transaction with the same nonce and a higher gas price. This is the same technique used to replace a stuck pending transaction. The difference here is that you are replacing a nonce that has never been broadcast, so you are effectively creating the transaction from scratch.
A Word on Wallets and Nonce Management
Most modern wallets handle nonces automatically and hide them from you. You will rarely need to think about nonces unless you are using a wallet with manual nonce management, or you are debugging a stuck transaction. If you are using a custodial exchange or a service where you do not control the private key, you cannot fix a nonce gap yourself - you would need to contact the service provider.
A nonce gap is not a sign of a compromised wallet or a network issue. It is a local ordering problem. With the right tools and a bit of patience, you can usually clear it yourself.
Not financial advice. basiliskawakens.xyz publishes market data and general information about digital assets. Crypto assets are volatile and you can lose everything you put in. Nothing here is a recommendation to buy, sell or hold, and we make no price predictions.
Prices are sourced from third parties and may be delayed or wrong. Verify anything you intend to act on against a primary source.