What is rеplace by Fee and why is it needed?
There are situations where you may need to cancel or rеplace a transaction. This often happens when a transaction has not been added to the block for a long time due to a low fee. All transactions that have not yet been added to a block after being created are considered unconfirmed. Unconfirmed transactions typically occur because of low fees.
However, these transactions can still be processed using the rеplace by Fee (RBF) mechanism. In blockchains like Bitcoin and Ethereum, you can rеplace an unconfirmed transaction with a new one that has a higher fee. This helps speed up the transaction’s processing by miners.
How to speed up a transaction by increasing the fee
The main difference between Ethereum and Bitcoin is that each transaction in Ethereum has a unique sequence number called nonce. To use rеplace by Fee, both the original and replacement transactions must have the same nonce.
The nonce tells miners and blockchain nodes the order of transactions and how to change the “state of the account.” The first transaction with the smaller nonce will be processed first. If there are two transactions with the same nonce, the one with the higher fee will be prioritized.
Steps to rеplace a transaction:
- Open the wallet you used to send the original transaction.
- Fill in the “Recipient” field with the address you want to send to.
- Enter the amount of ETH you want to send. Change the “Amount” field from 0 to the desired amount.
- If sending ETH, use a gas limit of 21000. If sending tokens, increase the limit to 100000. Otherwise, leave the default value.
- Increase the “Gas Price” by 10 GWEI compared to your previous transaction. For urgent transactions, you can increase it even more.
- Make sure the nonce matches the one used in the original transaction.
- Click “Send Transaction”.
- Get the new transaction hash and check its status by clicking the link. If it doesn’t appear immediately, refresh the page after a few minutes.
How to cancel a transaction
To prevent the previous transaction from being processed and added to the blockchain, you can send a transaction for 0 ETH to your own address with the same nonce.
Steps to cancel a transaction:
- Go to Etherscan.io or Ethplorer.io.
- Enter the hash of your original transaction.
- If the transaction status is Pending, you can try to cancel it.
- If the transaction is not found, refresh the page every few minutes. If it still doesn’t show up, the transaction likely wasn’t sent.
- If the status is Success, you won’t be able to cancel it.
- If the status is Pending, log into the wallet you used to send the original transaction (e.g., MEW).
- Send a 0 ETH transaction to yourself with the same nonce.
- Click “Send Transaction”.
- Confirm your action and receive the new transaction hash.
- Check the hash and transaction status on Etherscan or Ethplorer.
Why Child Pays for Parent (CPFP) doesn’t work in Ethereum
Unlike Bitcoin, Ethereum does not support the Child Pays for Parent (CPFP) mechanism. In Ethereum, to speed up an unconfirmed transaction, you need to send the same transaction with the same nonce but with a higher gas price. Miners will inсlude only the transaction with the better fee. Two transactions with the same nonce cannot be included in the block.
Conclusion
The rеplace by Fee mechanism is a useful tool for speeding up or canceling unconfirmed transactions in Ethereum. Understanding how nonce and gas fees work will help you manage your transactions more effectively and avoid delays. If you experience issues with transactions through CrystalTrade, our technical support team is ready to assist you.