What is RBF (Replace-By-Fee)?
RBF (Replace-By-Fee) is a mechanism in the bitcoin network that allows you to replace an unconfirmed transaction with a new transaction with a higher commission in order to speed up its confirmation by miners.
When is it useful to use RBF?
Confirmation delay: Sometimes bitcoin transactions can take a long time to be confirmed, especially if the commission is set too low. In this case, RBF allows you to "increase" the commission by replacing the transaction with a new one with a higher commission in order to speed up its confirmation.
Market conditions analysis: You can first send a transaction with a low commission to save money, and if the network is busy, increase the commission using RBF.
How does RBF work?
You are sending a transaction with RBF capability (this feature must be activated when sending).
If the transaction is delayed and not confirmed, you create a new transaction with the same inputs and outputs, but with a higher commission.
The new transaction replaces the old one in the mempool (pool of unconfirmed transactions), and miners will prefer to process the transaction with a higher commission.
Steps for using RBF:
1. RBF support on the wallet
In order to use RBF, your crypto wallet must support this feature. Not all wallets include RBF by default.
For example, wallets such as Electrum, Samourai Wallet, and Bitcoin Core support RBF.
When sending a transaction, you need to make sure that the "replace by commission" (RBF) function is enabled.
2. Creating a transaction with RBF
When you submit a transaction, select the RBF option. This gives you the opportunity to later replace the transaction with a new one with a higher commission, if necessary.
3. Tracking unconfirmed transactions
If you see that your transaction has been hanging unconfirmed in the mempool for too long, you can decide to replace it with a higher commission. Usually, this can be seen through a wallet or a blockchain explorer.
4. Replace the transaction
There should be an option in your wallet to replace a transaction that is no longer being confirmed. The process may vary depending on the wallet:
In Electrum, simply highlight the transaction that has not been confirmed and select the "Replace-by-Fee" or "Bump Fee" option.
Specify a new, higher commission.
5. Sending a new transaction
After setting a higher commission, resend the transaction. The new transaction will replace the old one in the mempool.
Important points:
Commissions: The higher you set the RBF fee, the faster your transaction will be confirmed by the miners.
Wallet Compatibility: Make sure that your wallet and the network to which the transaction is sent support RBF.
Unconfirmed Transaction Notifications: Many wallets can notify you if your transaction is not confirmed for a long time, which can be a signal to use RBF.
Example:
You are sending a transaction with a low commission of 5 satoshi per byte.
The transaction has not been confirmed for several hours or even days.
You use RBF to increase the commission to 50 satoshi per byte, and your transaction gets into the block quickly.
How do I learn RBF?
Practice on wallets: Start by using wallets that support RBF, such as Electrum. This will help you understand how the mechanism works.
Reading the documentation: Review the documentation on using RBF for the specific wallet or client you are using.
Video Tutorials and Guides: Find tutorial videos that explain step-by-step the process of creating and replacing transactions using RBF.