Ethereum nonces: stuck transactions and concurrent senders
An Ethereum account has a nonce: the number of transactions it has sent. A new transaction must use exactly the next number. Nodes execute them in order, so nonces work like a queue per sender, and a lot of "my transaction is stuck" stories are queue stories.
The rules
- A transaction with nonce N is executable only when the account has already used N-1.
- If you send nonce 7 while 5 is the next expected one, it waits in the pool as a gap, and it is included only after 5 and 6 arrive.
- If nonce 5 has a fee too low to be included, nonces 6, 7 and 8 wait behind it however high their fees are.

Replacing a transaction
Sending a new transaction with the same nonce and a higher fee replaces the old one in the pool. Nodes require a minimum improvement so nobody can flood the network with tiny bumps. In geth the default price bump is 10%, and for EIP-1559 transactions both the max fee and the priority fee have to go up by at least that much. Other clients and services set their own thresholds, so a bump of around 10 to 15% is typical and you should confirm what your node accepts.
A common way to cancel is to send a zero-value transaction from the account to itself with the same nonce and a higher fee. It does not remove the first one: it replaces it, and whichever gets included first wins. If the original was already picked up, the cancellation fails.
Latest versus pending
eth_getTransactionCount(address, "latest") returns the number of transactions in mined blocks, and "pending" includes those waiting in the node's pool. Which one you need depends on the goal:
- Use
pendingto choose the next nonce for a new transaction, so you do not reuse one already queued. - Use
latestto detect whether a specific transaction has been mined or has been replaced.
The pending count reflects only the pool of the node you ask, which may differ from the rest of the network.
Concurrent senders
A backend with several workers that share a hot wallet will race: two workers read the same next nonce and both send it. One transaction wins and the other fails or replaces it, in a way that is hard to debug. The usual fixes are:
- One sender process (or one lock) per account that assigns nonces in order.
- A persistent nonce counter that is reserved in the database inside a transaction before signing, and reconciled with the chain on startup.
- Several sending accounts, so each worker owns its own.
Keep a state for every outgoing transaction (created, signed, broadcast, mined, failed, replaced) and a job that re-broadcasts or bumps the ones that stay pending too long. A payout system without that job will eventually stall on one bad transaction.
Not every chain has nonces
Bitcoin has no account nonce, because it uses UTXOs. Tron does not use one either. A Tron transaction refers to a recent block and carries an expiration, after which it is invalid (commonly 60 seconds by default), so the failure mode is expiry and not a stuck queue. If you support more than one chain, do not force one sending model on all of them.
A transaction can also silently disappear, not just get stuck
Everything above assumes a submitted transaction stays in some node's mempool, waiting, until it either gets mined or is deliberately replaced. Under a full mempool, nodes evict transactions to make room for new ones, typically starting with the lowest fee rate, and a transaction that gets evicted this way is not stuck in the pending state at all: it is simply gone from that node's view, silently, without any error being returned to whoever originally submitted it. A wallet or backend that only checks "is my transaction still pending" and never re-submits anything can end up with a transaction that was evicted hours ago and will never be mined, while the code still believes it is patiently waiting its turn. The defensive pattern is to track submitted transactions with a submission timestamp and periodically re-check, via eth_getTransactionByHash, whether the node still has them; a transaction that has vanished from the pool and is not in any mined block needs to be re-broadcast (with the same nonce) rather than assumed to still be in flight somewhere.