Skip to the article
Web3 Hub

Markets, protocols and policy, reported

Replace an Ethereum Transaction When Its Nonce Is Pending

To replace a pending Ethereum transaction with the same nonce, sign a new transaction from the same account with higher fees, then see which transaction gets a receipt.

By Web3 Hub Newsroom3 min read

Replace an Ethereum Transaction When Its Nonce Is Pending

Open the pending transaction’s details in the sending wallet; its sender account and nonce are the starting point. Create and sign a new transaction from that same account with the same nonce, and set fees high enough for the wallet or RPC provider to accept it as a replacement. Submit it through the original route, then check the transaction status and receipt to see which version was included. A hash proves the transaction was signed; it does not prove a node accepted it.

The sender and nonce decide whether a transaction is a replacement

Ethereum processes each account’s transactions in nonce order, and a nonce marks a transaction’s position in that account’s sequence. A new transaction competes with the original only when it comes from the same account and uses the same nonce; changing either means it is a separate transaction.

For EIP-1559 transactions, both the max fee and priority fee affect whether a wallet or RPC provider accepts the replacement. Their fee bump rules vary, so there is no universal percentage to use. Raise the fees enough to meet the policy of the route you are submitting through.

With Flashbots Protect, check the submission route’s status as well as public explorers, because private RPC submissions may not appear in the same places as public submissions. For Flashbots pending transaction delays, the route used to submit the transaction is also relevant to checking what happened.

Nonce 12 can replace an action or cancel it

Say nonce 12 is pending because a token transfer has not been included. To replace it with a different action, create that transaction from the same account, set its nonce to 12, and raise its fees to meet the wallet or RPC policy.

To cancel it, submit a zero-value transfer to yourself from the same account, also using nonce 12 and higher fees. This cancellation competes with the original just like any other replacement; it takes effect only if accepted and mined before the original.

After submitting, look up the replacement hash and the original hash on the relevant route or explorer. A hash can be calculated from signed transaction data before any node accepts the submission, so seeing one alone is not proof that the transaction is pending. An accepted submission can still lose the race: the original may be mined first, or the replacement may be included instead.

The receipt shows which transaction was included. If one receives a receipt, that transaction used nonce 12; the other cannot also be included on the same canonical chain. The same-nonce rule is what lets you retry or cancel, while the route’s fee policy and which transaction gets mined determine the outcome.