Nonce
A sequentially incrementing number attached to each transaction from a wallet address, ensuring transactions are processed in order.
Nonce — A nonce is a sequential counter assigned to each transaction sent from a blockchain wallet address. On Ethereum and EVM-compatible chains, the nonce starts at 0 for a new address and increments by 1 with each outgoing transaction. The nonce prevents replay attacks and ensures transactions are processed in the correct order.
What Is a Nonce?
In blockchain, a nonce ("number used once") is an integer that tracks the number of transactions sent from a specific address. The first transaction from a new Ethereum wallet uses nonce 0, the second uses nonce 1, and so on. The network rejects any transaction that does not use the expected next nonce for that address.
The nonce system serves two critical functions: it prevents the same signed transaction from being submitted multiple times (replay attacks), and it enforces a strict ordering of transactions from each address.
How Nonces Affect Transaction Processing
Transactions must be processed in nonce order. If you submit nonce 5 while nonce 4 is still pending, nonce 5 will wait in the mempool until nonce 4 is confirmed. This means a stuck transaction with a low gas price will block all subsequent transactions from that address until it either confirms or is replaced.
To speed up or cancel a stuck transaction, users can submit a new transaction with the same nonce but a higher gas price. The network will include whichever version of that nonce arrives first with sufficient gas, effectively replacing the original transaction.
Nonces in Automated Trading
For trading bots and volume generation tools, nonce management is critical. Bots that send many transactions in quick succession must carefully track and increment nonces to avoid gaps or duplicates. A nonce management error can stall an entire bot session until the nonce sequence is corrected. Professional bots use nonce queuing systems that track pending and confirmed nonces across multiple wallet addresses simultaneously.
Related Terms
Transaction Hash (TxHash)
A unique cryptographic identifier for a specific blockchain transaction, used to look it up in a block explorer.
Read definition Blockchain & Crypto FundamentalsWallet Address
A public identifier derived from a private key that functions like a bank account number for receiving and holding crypto assets.
Read definition Blockchain & Crypto FundamentalsGas
The unit measuring the computational effort required to execute operations on EVM chains; gas fees are gas used × gas price.
Read definition Blockchain & Crypto FundamentalsMempool
A waiting area for unconfirmed transactions where miners/validators select which transactions to include in the next block.
Read definition Blockchain & Crypto FundamentalsEVM (Ethereum Virtual Machine)
The computation environment that executes smart contracts on Ethereum and EVM-compatible chains like Base, Arbitrum, and BNB Chain.
Read definitionFrequently Asked Questions
Common questions about Nonce in cryptocurrency and DeFi.
If you submit a transaction with a nonce lower than expected, it will be rejected as a duplicate. If you submit a nonce higher than expected, it will sit in the mempool waiting for the missing nonce(s) to be filled. This can cause transactions to appear stuck until the gap is resolved.
Submit a new transaction using the same nonce as the stuck transaction but with a higher gas price (typically 10-20% higher). This replacement transaction will be prioritized over the original. Most wallets like MetaMask offer a "Speed Up" or "Cancel" feature that handles this automatically.
Solana does not use a sequential nonce system like Ethereum. Instead, it uses recent blockhash references to prevent replay attacks. Each Solana transaction includes a recent blockhash, and the network rejects transactions referencing blockhashes older than about 60 to 90 seconds.
Ready to put your knowledge into practice?
Start Boosting