What Is a Nonce in Crypto?
A nonce is a small but important number attached to every transaction you send from an account. On networks like Ethereum, it acts as a per-account counter that decides the order in which your transactions are processed. Understanding it explains one of the most common headaches in crypto: the stuck or pending transaction.
What a Nonce Actually Means
The word nonce means "number used once." In crypto it shows up in two different places, and beginners often mix them up:
- Account nonce (the focus of this article): a counter that tracks how many transactions an account has sent. It exists on account-based networks like Ethereum.
- Mining/block nonce: a different number that miners adjust when searching for a valid block on proof-of-work chains like Bitcoin. This is unrelated to your wallet's transaction ordering.
When people ask "what is a nonce crypto" in the context of sending tokens or a stuck transfer, they almost always mean the account nonce. That is what we will unpack here.
How the Account Nonce Works
On an account-based blockchain, every account has a nonce that starts at 0 and increases by one with each confirmed transaction. Your very first transaction uses nonce 0, the second uses nonce 1, the third uses nonce 2, and so on.
The network enforces a simple rule: it will only process the transaction whose nonce comes next in sequence. This solves two real problems:
- Ordering. Transactions can arrive at different network nodes in different orders. The nonce guarantees they execute in the exact sequence you intended.
- Replay protection. Because each nonce is used once and then "spent," nobody can copy your signed transaction and broadcast it again to drain your funds twice.
Why Transactions Get Stuck or Pending
A "stuck" transaction usually means it is sitting in the network's waiting area (the mempool) without being confirmed. The nonce is often at the heart of why. Common causes include:
| Cause | What happens |
|---|---|
| Fee too low | Your gas fee is below what validators currently want, so the transaction waits, sometimes for a long time. |
| Nonce gap | A lower-numbered transaction is stuck, so every later nonce behind it is blocked too. |
| Network congestion | High demand pushes fees up; older, cheaper transactions fall to the back of the line. |
| Wrong nonce set manually | If a wallet or tool sends a nonce that is too high, the network holds it until the missing ones arrive. |
The key insight: because of strict nonce ordering, one stuck transaction can freeze everything you send afterward. Fixing the blocked nonce usually unblocks the whole queue.
How to Replace or Cancel a Stuck Transaction
The standard fix is to resubmit a transaction with the same nonce but a higher fee. Validators are economically motivated to pick the higher-paying version, and since two transactions cannot share one nonce, the new one effectively overwrites the old. You have two main options:
- Speed up: rebroadcast the same transaction (same nonce) with a higher gas fee so it confirms faster.
- Cancel: send a "do-nothing" transaction — typically 0 value to your own address — using the same nonce and a higher fee. If it confirms first, your original transaction is dropped.
Most modern wallets have built-in "Speed Up" and "Cancel" buttons that handle the nonce mechanics for you. Advanced wallets also let you set the nonce manually, which is useful for clearing a gap, but only do this if you understand the sequence.
A few practical reminders so you do not make things worse:
- You can only replace a transaction that is still pending. Once confirmed, it is final and cannot be reversed.
- The replacement fee usually has to be meaningfully higher (many networks require roughly a 10%+ bump) or the replacement is rejected.
- If several transactions are queued behind a stuck one, you may need to clear the lowest stuck nonce first before the rest move.
Quick Takeaways
Nonces feel technical, but the mental model is simple — it is just a numbered queue per account:
- The account nonce is a per-account counter that orders your transactions and prevents replays.
- It increases by one with each confirmed transaction and must be used in sequence.
- A stuck low nonce blocks every later transaction until it clears.
- You fix stuck transactions by resending the same nonce with a higher fee, either to speed up or to cancel.
As you go deeper into crypto, related basics like understanding different wallet types and how networks try to lower costs through Layer 2 scaling will make the whole picture clearer. Self-custody also means self-responsibility, so it is worth knowing how to avoid common scams before you start moving significant amounts.
This article is for educational purposes only and is not investment advice. Crypto transactions are typically irreversible once confirmed; always double-check details and only use amounts you can afford to lose.
NOONOO TRADING — join the free chat and watch live trading together.
Join free chat →📈 Sign up on OKX for a trading fee discount
Get OKX fee discount →