Nonce

Nonce, short for "number used once," is a value meant to be used only a single time. In crypto it means either the counter that orders an account's transactions or the number miners change while searching for a valid block hash.

On Ethereum and other EVM-compatible chains, every account has a transaction nonce. It starts at zero and rises by one with each transaction the account sends. Each new transaction must carry the next number in sequence, so the network processes an account's transactions strictly in order and cannot include the same signed transaction twice.

This ordering explains a common frustration. If transaction #12 sits in the mempool because its fee is too low, transactions #13 and later wait behind it, no matter how high their own fees are. The usual fix is to broadcast a new transaction with the same nonce and a higher fee. To speed it up, the new transaction repeats the original transfer. To cancel it, the new transaction sends zero value to the sender's own address. Whichever version confirms first uses up the nonce, and the other becomes invalid.

In Proof of Work, the nonce is a field in the block header. Miners keep changing it and re-hashing the block until the result falls below the network's difficulty target. Searching for that value is the "work." Bitcoin uses this block nonce but has no account nonce, because it tracks unspent outputs rather than account balances.

A common misconception is that cancelling reverses a payment. Replacing a transaction only works while the original is still pending. Once it is confirmed, it cannot be undone.

Learn more

Related terms