You can attempt to cancel a pending ordinary EVM transaction by getting a different transaction with the same sender nonce included first. You cannot use that mechanism to reverse an already confirmed swap.
Cancellation is a race
The original and cancellation compete for the same position in the account sequence. A wallet’s “cancel requested” message is not proof of success. Check the chain to see which transaction consumed the nonce.
MetaMask’s cancellation documentation describes pending-only replacement and notes that confirmed transactions cannot be reversed. The cancellation itself can cost gas if it is included.
Check more than one hash
Track the original swap, any speed-ups and the cancellation. If the cancellation confirms, the original same-nonce transaction cannot later execute in that canonical sequence. If the swap confirms first, the cancellation has lost that race; verify the actual output.
Closing the browser, disconnecting a wallet or clearing local history does not consume the nonce. Those actions do not establish cancellation.
Different systems can have different cancellation rules
An offchain order, smart-account operation or privately submitted transaction may have an application-specific cancellation mechanism. Use its official instructions rather than assuming a self-transfer solves every case.
Before creating a replacement trade, establish the old request’s result. Otherwise, two separately authorized swaps can eventually execute. Keep enough evidence to distinguish “I requested cancellation” from “this cancellation transaction confirmed.” That distinction determines what is safe to assume next.
Sources & verification (2)
Source-check date is recorded in the article details. URLs are provided for manual verification. Use Copy to keep this page open.
- How to speed up or cancel a pending transaction
Same-nonce replacement, pending-only cancellation and earliest unresolved nonce.
https://support.metamask.io/manage-crypto/transactions/how-to-speed-up-or-cancel-a-pending-transaction - Transaction Dropped & Replaced?
Dropped transactions can be rebroadcast; confirmed same-nonce replacement consumes original opportunity.
https://info.etherscan.com/transaction-dropped-replaced/