Skip to main content
DFR Publication
Donate
← DeFi glossary

Glossary · N

Nonce

Key takeaway

A sequentially incrementing integer assigned to each transaction sent from an Ethereum address. The nonce ensures transactions are processed in the correct order — a transaction with nonce 5 cannot be processed before nonce 4. If you submit a transaction with a higher gas price and the same nonce as a stuck transaction, you can replace the stuck transaction (known as a 'speed up' or 'cancel' in wallet interfaces).

Last updated

How Nonce works in practice

A nonce is a per-account counter ensuring transactions execute in order and only once. Each transaction from an address must use the next sequential number, which is what prevents replay and enforces ordering.

Worked example

If a transaction with nonce 42 is stuck pending, nothing with nonce 43 or higher can execute. Replacing the stuck one — same nonce, higher fee — is what unblocks the queue.

Figures are illustrative and chosen to be checkable, not live market data.

The mistake that costs people money

A single stuck transaction blocks every later one from the same address. The fix is to resubmit with the same nonce and a higher fee, not to send another transaction and hope.

Nonce: common questions

What is Nonce?
A sequentially incrementing integer assigned to each transaction sent from an Ethereum address. The nonce ensures transactions are processed in the correct order — a transaction with nonce 5 cannot be processed before nonce 4. If you submit a transaction with a higher gas price and the same nonce as a stuck transaction, you can replace the stuck transaction (known as a 'speed up' or 'cancel' in wallet interfaces).
Which DeFi concepts are most closely linked to Nonce?
Nonce is closely connected to Front-Running, Block, Multisig. Understanding how these concepts interact helps evaluate real yield, execution costs and smart-contract risk in decentralised finance.
What is the main risk or misconception around Nonce?
A single stuck transaction blocks every later one from the same address.
Which guide covers Nonce in practice?
Read "Rabby Wallet Setup and Security" for full context on how Nonce affects real DeFi workflows, costs and risk management.

Related DeFi glossary terms

  • Front-Running In DeFi, front-running occurs when a bot detects a profitable pending transaction in the mempool and submits an identical or similar transaction with a higher gas fee to execute first and capture the profit. Classic front-running copies an arbitrage opportunity discovered by another trader. Sandwich attacks are a related form of front-running specific to large DEX swaps. MEV-protected RPCs (Flashbots Protect) help prevent front-running.
  • Block A data structure containing a batch of validated transactions on a blockchain. Each block references the previous block (via a hash), forming a chain. On Ethereum, a new block is added approximately every 12 seconds. Block size limits how many transactions can be included per block.
  • Multisig A smart contract wallet that requires multiple private keys to sign transactions before they execute — for example, 3-of-5 multisig requires 3 out of 5 keyholders to approve. Multisigs are used by DeFi protocols, DAOs, and high-value wallets to prevent any single point of compromise. Safe (formerly Gnosis Safe) is the dominant multisig wallet on Ethereum, used by most major DeFi protocols for treasury management.
  • Arbitrage The practice of exploiting price differences for the same asset across different markets. In DeFi, arbitrage bots constantly scan DEXs for price discrepancies and execute trades to profit from the difference, simultaneously normalising prices across platforms.
  • Ethereum The second-largest cryptocurrency by market capitalisation and the dominant blockchain for DeFi. Ethereum's programmability (via smart contracts) enabled the creation of DeFi applications. Ethereum transitioned from Proof of Work to Proof of Stake in September 2022 ('The Merge'), reducing energy consumption by ~99.95%.
  • Sandwich Attack An MEV attack where a bot detects a large pending DEX swap, places a buy order immediately before it (frontrun — pushing the price up), lets the victim's trade execute at the worse price, then immediately sells (backrun — pocketing the price impact). The victim receives fewer tokens than expected; the bot profits from the spread. Protection: use MEV-resistant RPCs (Flashbots Protect), tight slippage tolerance, or intent-based protocols like CoW Protocol.