Replacing and canceling Ethereum transactions

What is the Replace by fee?

A situation arises when you want to cancel or replace a transaction. This may be due to the fact that transactions do not enter the block for a long time. All operations that were not added to the block after launch are considered unconfirmed. Unconfirmed transactions most often happen precisely because of the low fees. Such transactions still have the ability to become processed.

In the blockchains Bitcoin, Ethereum and others, there is a mechanism that allows you to replace an unconfirmed transaction with another transaction with a higher fee. This mechanism is called Replace by Fee.

Accelerating transactions by increasing fees

The difference between Ethereum and Bitcoin is that each transaction has a sequence number (nonce). Therefore, in order to use the Replace by fee function, the transaction to be replaced and replaced must have one number.

Nonce tells miners and nodes about the order of transactions and, accordingly, how to change the "account state". The first to be accepted is the transaction with the smaller nonce. If there are two transactions with the same nonce, then the one with the higher commission will be accepted.

  1. Open the wallet that you used to send the original transaction.
  2. Fill in the "Recipient" field, indicating the address to which you want to send.
  3. Change the value of the "Amount" field from 0 to the amount of ETH you want to send.
  4. When sending a standard transaction in ETH, you can use the fuel limit of 21,000. If you are sending tokens, increase the limit to around 100,000. Otherwise, just leave the default.
  5. Increase the value of the "Fuel Price" field by 10 GWEI, compared to your previous transaction. If it is an urgent transaction, you can increase it more. Keep in mind that the higher the gas price, the higher the transaction fee (gas limit * gas price).
  6. Make sure the value in the Nons field is the same as in the previous transaction. If so, then do not change the value in the field. If you change it, then this transaction will not replace the previous one.
  7. Click the "Submit Transaction" button.
  8. The hash of the new transaction will appear. Click on the link to view it and see if you got it. If it doesn't appear right away, try refreshing the page after a few minutes.

Canceling a transaction

In order to prevent the "passing" of the previous transaction, its extraction and inclusion in the blockchain, you need to create a transaction in the amount of 0 ETH to your own address.

  1. Go to Etherscan.io or Ethplorer.io.
  2. Insert your transaction hash.
    • If the status of the transaction is Pending, then you can try to cancel it.
    • If the transaction is not found, press the button again, waiting a few minutes between each press. If that doesn't work, chances are your transaction was not sent.
    • If the status of the transaction is Success, then you cannot cancel it.
  3. If the status is Pending, log into the wallet that you used to send the original transaction to MEW.
  4. Send yourself a transaction with a balance of 0 ETH.
  5. Click the Submit Transaction button.
  6. A dialog box will appear. Click the "Yes, I'm sure" button to submit it.
  7. The hash of the new transaction will appear. Click on the link to view it and see if you got it. If it doesn't appear right away, try refreshing the page after a few minutes.

Speeding up a transaction with Child Pays for Parent

In ETH, the Child Pays for Parent option is not possible. Wanting to speed up the transaction with higher fees, an ETH user can only send the same transaction with the same nonce with a higher gas price. The miner adds only one transaction with the best commission to the block. Two transactions with the same nonce cannot be added to a block.

Messaggi recenti