Education

What Is a Nonce in Crypto? Account Nonce vs Mining Nonce

October 21, 2026
5 min read

A nonce is a number used once. In Ethereum it orders an account's transactions and can block them; in Bitcoin mining it is what miners change to find a valid block.

Table comparing the Ethereum account nonce with the Bitcoin mining nonce: chains, values, who sets it and why.
An account nonce orders your transactions; a mining nonce is what miners iterate. Open the full-size diagram

A nonce is a number used once. In crypto the word has two everyday meanings. On Ethereum and other account-based chains, the nonce is a counter attached to your address: your first transaction has nonce 0, the next one 1, and so on, and the network will only accept them in that order. In Bitcoin mining, the nonce is a 32-bit field in the block header that miners change billions of times a second until the block's hash falls below the target. The first meaning is the one that affects ordinary users, usually when a transaction gets stuck.

Two meanings side by side

Nonce in two contexts
Account nonce (Ethereum, BSC, Polygonโ€ฆ)Mining nonce (Bitcoin)
What it iscount of transactions sent from an addressa field in the block header
Who sets ityour wallet, automaticallythe miner's hardware
Range0, 1, 2โ€ฆ one per transaction0 to about 4.29 billion
Why it existsordering and replay protectionto vary the block hash
What users noticestuck or replaced transactionsnothing directly

The account nonce: why order matters

Every Ethereum transaction includes the sender's nonce. Nodes process an address's transactions strictly in nonce order. If the transaction with nonce 14 is still pending because its fee is too low, transactions with nonce 15, 16 and 17 wait behind it, even if they pay a high fee. That is the most common reason a wallet shows several pending transactions at once.

The nonce also prevents replay. A signed transaction with nonce 14 can be included only once; after that, the network knows nonce 14 for that address is used. This is why you cannot accidentally send the same signed payment twice by broadcasting it again.

How a stuck transaction is fixed

  1. Find the lowest pending nonce for your address. A block explorer shows the nonce of each transaction; see how to read an Etherscan transaction.
  2. Send a replacement with the same nonce and a higher fee. Most nodes require the new fee to be noticeably higher than the old one, typically at least 10% on both the max fee and the priority fee.
  3. To cancel instead, send 0 ETH to your own address with that nonce and a higher fee. The first transaction can no longer be included.
  4. Once the low nonce confirms, the queued transactions behind it go through in order.

Wallets such as MetaMask expose this as speed up and cancel. The EIP-1559 max fee calculator helps choose a replacement fee that survives a few blocks of rising base fee.

Common nonce errors

  • nonce too low: you are trying to use a nonce that is already confirmed. Usually the wallet's local state is out of date; resetting the account's activity in the wallet fixes it.
  • replacement transaction underpriced: a pending transaction with that nonce exists and your new fee is not high enough to replace it.
  • nonce gap: you sent nonce 20 while 19 was never broadcast. Nothing after 19 will confirm until a transaction with nonce 19 is sent.

If you are paying a KOT.CASH order from an EVM wallet and the payment does not appear, a stuck earlier nonce is a likely cause. The guide on a missing nonce before a swap walks through that exact case.

The mining nonce: trial and error

A Bitcoin block header is 80 bytes and contains the version, the previous block hash, the Merkle root of the transactions, a timestamp, the difficulty target and a 4-byte nonce. Miners hash the header twice with SHA-256 and check whether the result is below the target. If not, they change the nonce and try again. The nonce has about 4.29 billion values, which a modern ASIC exhausts in a fraction of a second, so miners also change an extra nonce in the coinbase transaction and the timestamp to get fresh headers.

Finding a valid nonce is the proof of work. It cannot be computed directly, only searched for, and the network adjusts the target every 2,016 blocks so that, on average, a block is found every ten minutes. Once a miner finds it, anyone can verify the block with a single hash.

Chains that do not use an account nonce

Bitcoin, Litecoin and other UTXO chains do not number transactions per address; each transaction spends specific outputs, and spending the same output twice is what the network prevents (see what a UTXO is). Solana uses a recent blockhash instead of a counter: a transaction is valid only for a short window after the blockhash it references, which is why old Solana transactions fail with a blockhash error rather than wait forever. TRON transactions also reference a recent block and expire.

Other places the word appears

Cryptography uses nonces too: in encryption schemes and signatures, a nonce is a random or unique value that must never repeat with the same key. Reusing a signature nonce has leaked private keys in real incidents, which is why modern wallets generate it deterministically. For users this happens out of sight; it is the account nonce and the block nonce that come up in practice.

FAQ

What is a nonce in Ethereum?

The number of transactions an address has sent. Each new transaction uses the next nonce, and the network processes them strictly in order.

Why are my transactions stuck behind one pending transaction?

Because a lower nonce is still pending. Later nonces cannot confirm until it does or is replaced.

How do I cancel a pending Ethereum transaction?

Send a 0 ETH transaction to yourself with the same nonce and a higher fee, usually via the wallet's cancel button.

What is the nonce in Bitcoin mining?

A 32-bit field in the block header that miners change to search for a header hash below the difficulty target.

Does Bitcoin have an account nonce?

No. Bitcoin uses UTXOs, so ordering comes from which outputs a transaction spends, not from a per-address counter.

A missing nonce before a swapEIP-1559 max fee calculatorWhat is the mempoolWhat is a gas limit

Sources

Ready to exchange crypto?

Fast, transparent swaps โ€” no registration required.

Start Exchange Now
What Is a Nonce in Crypto? Account Nonce vs Mining Nonce | KOT.CASH