Skip to main content

Can a Transaction Be Cancelled or Replaced Once It Enters the Mempool?

A transaction can be effectively cancelled or replaced while it is still in the mempool (unconfirmed) by submitting a new transaction with the same "nonce" (a sequential transaction count) but with a significantly higher gas fee. This technique is called "replace-by-fee" (RBF) or "cancel-by-fee." The network nodes will prioritize the transaction with the higher fee, effectively ignoring the original one.

If the new transaction is a zero-value transfer to the sender's own address, it acts as a cancellation.

Relate the Concept of ‘Nonce’ in Mining to the ‘Nonce’ in ECDSA Signing
What Is the Difference between Gas Limit and Gas Price?
How Does the Nonce Relate to Replay Attacks in Smart Contracts?
Is the Nonce in Ethereum the Same as the Nonce in Bitcoin Block Mining?