How to cancel a transaction if I accidentally send funds

What to do if your transaction has already been signed and is displayed in explorer? If you’re looking for the short answer- in most cases, reversing a transaction on the blockchain is simply not possible. But there are some cases that can help you cancel transactions. We will tell you more about these cases in this article.
Is it possible to cancel a transaction?
A blockchain transaction cannot be reversed because of the way the technology itself works. Each transaction on the blockchain is part of a chain of blocks that are stored on multiple nodes in the network. Each block contains a hash of the previous block and information about new transactions that have been added to that block.
When a transaction is sent to the network, it goes through a process of verification and validation by other members of the network called miners. The miners solve complex math problems to add a new block to the chain and get rewarded for their work. Once a transaction has been added to a block, it becomes immutable and cannot be deleted or changed. This is because each block in the chain contains a hash of the previous block, and any change in one block will affect all subsequent blocks in the chain.

Thus, if it were possible to undo a transaction, it would result in the integrity of the entire blockchain being compromised, which is impossible. Therefore, there is no mechanism to undo transactions on the blockchain, and everyone on the network must be careful when sending funds or transferring assets.

Canceling and replacing a transaction
In most cases, we cannot cancel a transaction. However, there are a couple of exceptions.
You can cancel or replace a transaction if your transaction is in Pending status. Important: such transactions are displayed in the EVM network explorers and TRON.
How to do it:
Each transaction sent from your address has a unique number, called Nonce.
In Ethereum, Nonce is a number that is unique to each transaction and is incremented by 1 each time a transaction is sent from a specific address. Nonce is used to securely transmit information and prevent attacks using intercepted records.
If your transaction is stuck in Pending status, you can send a 0 ETH transaction to your own address, with the same Nonce value and a higher gas price. This will cancel your first transaction.
IMPORTANT! This is not a 100% option to cancel your transaction. There is a chance that you won’t make it in time and both transactions will be sent to the blockchain.

How to check transaction status

Copy the hash of the transaction and verify it through explorer. You can read more about explorers in article "How to find out your address and how to use blockchain explorer".
A transaction can have 4 statuses:
Success (successful transaction)
This transaction is recorded on the blockchain. This transaction cannot be changed.
Failed
The transaction has been canceled. There can be many reasons for this, the most common reason being a lack of gas for payment.
Transaction not found
This is a rare error, in most cases the error is in the hash, perhaps you copied it incorrectly. If you copied it correctly, then the transaction was not executed.
Pending
Your transaction has been detected in the transaction pool of the browser you are using. It is currently pending (waiting to be mined by miners). There is a chance that you can cancel or replace this transaction, but it is very small.

What Token Approval is and how it can "undo" a transaction?

To use decentralized apps, you must give access to your web wallet through two requests: the first allows the app to see your balance and activity, and the second allows the app to directly interact with your cryptocurrency to make a transaction.
However, this authorization can be used by attackers for fraudulent purposes. To protect your wallet, you should periodically check the issued approvals and revoke them if necessary. You can revoke an approval if you want to secure your wallet, do not intend to use the app, no longer trust it, or have accidentally issued an authorization. Never give projects unrestricted access to your cryptocurrency and regularly revoke issued approvals to ensure the safety of your wallet.

Token Approval is managed through the revoke.cash service. If you connect your address to this service, you will receive a list of all tokens to which you have issued Approve. You can also disable the use of certain smart token contracts. In this way, you can restrict the use of certain tokens on your address.
IMPORTANT! Disabling the use of tokens after a transaction has occurred will not cancel the transaction. This method can only help if the token has been disconnected from Approve and you are trying to conduct a transaction with it.
Just Try Btrace
Check it out for free — we will give you a unique opportunity to look at cryptocurrency wallets through the eyes of an exchange compliance manager and see how our service works in practice.
PROTECT YOURSELF FROM "DIRTY" ASSETS

PREVENT BLOCKING OF FUNDS

GET OUT OF TROUBLE WITH THE LAW

We also recommend