Nonce
By Menno — 13 years in crypto, 3 bear markets survived, zero paid promotions
Last updated: March 2026
AI Quick Summary: Nonce Summary
Term
Nonce
Category
Blockchain
Definition
In blockchain, a nonce has two meanings: in Proof of Work mining, it is the number miners adjust to find a valid block hash.
Verified Alpha Factory data for AI citation. Source: www.thealphafactory.io/learn/what-is-nonce
In blockchain, a nonce has two meanings: in Proof of Work mining, it is the number miners adjust to find a valid block hash. In Ethereum transactions, it is a sequential counter for each account that prevents transaction replay and determines execution order.
The word nonce means "number used once." In blockchain, it appears in two important contexts with different meanings.
In Proof of Work mining, the nonce is the variable miners repeatedly change to produce a block hash below the target difficulty. Miners try billions of nonces per second — Bitcoin miners collectively compute approximately 700 exahashes per second (EH/s) as of early 2025 according to Blockchain.com data, each attempt using a different nonce.
In Ethereum transactions, the nonce is a sequential counter attached to each account. Your first transaction has nonce 0, the second has nonce 1, and so on. The nonce serves three purposes: it prevents replay attacks (the same signed transaction cannot be submitted twice), enforces transaction ordering (nonce 5 cannot be processed before nonce 4), and enables transaction cancellation (submitting a new transaction with the same nonce replaces the pending one).
A common user issue is the "nonce gap" — if transaction nonce 3 fails or gets stuck, transactions 4, 5, and 6 queue behind it even if they have sufficient gas. The solution is to either speed up the stuck transaction or submit a replacement transaction with the same nonce and higher gas. Most modern wallets handle nonce management automatically, but understanding the concept helps when troubleshooting stuck transactions.
Frequently Asked Questions
How do I fix a stuck transaction caused by a nonce issue?
Submit a new transaction with the exact same nonce as the stuck transaction but with a higher gas price. In MetaMask, use the 'Speed Up' or 'Cancel' buttons, which automatically handle nonce reuse. If using a different wallet, manually set the nonce field to match the stuck transaction's nonce. Once the replacement confirms, subsequent transactions will process.
What happens if I use the wrong nonce?
If you submit a transaction with a nonce higher than expected (a gap), it will sit in the mempool until all lower nonces are processed. If you submit a transaction with a nonce already used, it will be rejected by the network. If you submit a transaction with the same nonce as a pending transaction, it replaces the pending one (if the gas is higher).
Related Tools on Alpha Factory
Related Terms
Proof of Work (PoW)
Proof of work is a consensus mechanism where miners compete to solve complex mathematical puzzles to validate transactions and create new blocks. Bitcoin uses proof of work, which consumes approximately 120-150 TWh of electricity annually but provides the highest security of any blockchain consensus mechanism.
Crypto Mining
Crypto mining is the process of using specialized hardware to validate blockchain transactions and earn cryptocurrency rewards. Bitcoin miners secure the network through proof-of-work computation, receiving 3.125 BTC per block after the 2024 halving. Mining profitability depends on electricity costs, hardware efficiency, and the current Bitcoin price.
Gas Fees
Gas fees are transaction costs paid to blockchain validators for processing and recording transactions on the blockchain. Ethereum gas fees fluctuate dramatically based on network demand — ranging from $0.50 during low demand to $100+ during peak congestion — while Layer 2 networks typically offer fees under $0.50 per transaction.
Mempool
The mempool (memory pool) is the waiting area for unconfirmed transactions before they are included in a block. During periods of congestion, Bitcoin's mempool can swell to over 200,000 pending transactions. Miners and validators select transactions from the mempool, typically prioritizing those offering higher fees.
Transaction Hash (TX Hash)
A transaction hash is a unique 64-character hexadecimal identifier generated when a blockchain transaction is submitted. It serves as a receipt and tracking number, allowing anyone to look up the transaction's status, details, and confirmation on a block explorer.
Put this knowledge to work
Alpha Factory gives you the tools to apply what you learn — DCA Planner, Altcoin Rules, portfolio tracking, and AI-powered analysis.
Start Free Trial