bitcoin

How to Fix Slow Bitcoin Transactions with Replace-By-Fee

Mario Dian May 13, 2017 5 min read

Bitcoin's network congestion due to a surge in cheap non-financial "time-stamping" spam has led to a frustrating experience for users. BitFury, a prominent player in the Bitcoin space, recently struck a deal to prioritize these transactions over genuine financial ones. As a result, mempool, a storage area for unconfirmed transactions, has become inundated with nearly 200,000 pending transactions, causing significant delays lasting hours or even days.

For people hoping to have their transactions confirmed promptly, they need to increase transaction fees substantially, thus competing against the backlog of pending transactions. Those who are unwilling or unable to pay the higher fees face the challenge of their transactions being stuck in mempool for an extended period of time.

Fortunately, there is a mechanism called Replace-By-Fee (RBF) that can help alleviate these concerns. RBF offers users the ability to resend their pending transactions with a higher fee attached, effectively replacing the previous transaction in mempool. Once miners notice the new transaction with a higher fee, they are more likely to prioritize it, expediting its confirmation and freeing up precious block space.

By employing Replace-By-Fee, users who initially paid lower fees have the opportunity to enhance their transaction's priority without re-broadcasting a new separate transaction. This feature empowers users to compete fairly for block space and increase the likelihood of their transactions being confirmed within an acceptable timeframe.

While Replace-By-Fee offers a practical solution to the dilemma faced by those with low-fee transactions, it is important to note that not all Bitcoin software wallets support this feature by default. Users should ensure that they use a wallet that implements Replace-By-Fee if they anticipate the need to adjust transaction fees retrospectively.

Overall, Replace-By-Fee serves as a valuable tool to mitigate the consequences of network congestion caused by an influx of cheap transactions. It allows users to adapt to the prevailing conditions, improving the likelihood of their transactions being successfully confirmed without an exorbitant increase in fees.

For the purpose of the tutorial, I'll be using Electrum 2.8.2. The process should be very similar in other wallets that support RBF feature too.

Before proceeding with a low-fee transaction, it is essential to ensure that the Replace-By-Fee (RBF) option is enabled. To do this, follow these steps:

Go to Tools -> Electrum preferences and change Propose Replace-By-Fee to Always or If the fee is low.

Turn on Replace-By-Fee

Now, let's say you decide to take a chance and pay a 0.0001 BTC fee for your transaction, even though it might not be sufficient for speedy confirmation.

Make the transaction replaceable

In this case, select the Replaceable option before sending the transaction. By enabling this option, your transaction will be flagged as replaceable, meaning you can modify its fee later if necessary.

Once you send the transaction, it enters mempool, which is essentially a waiting area for unconfirmed transactions. Mempool functions as a list or pool where unconfirmed transactions are stored temporarily until they are included in the next block by miners.

Currently, almost 150 000 transactions are waiting to be confirmed

The current size of mempool is quite large, resulting in potential delays of up to several days for confirming low-fee transactions. To check mempool size, you can visit Mempool Space.

Back to Electrum now.

In Electrum, unconfirmed Replace-By-Fee transactions are easily distinguishable from non-RBF transactions. They are marked with a yellow triangle and labeled as Replaceable. This distinction helps users identify transactions that have the option to be replaced with a higher fee if needed in order to expedite their confirmation.

The transaction is marked replaceable

Wait for the transaction to confirm within an amount of time that is acceptable for you.

If the confirmation does not occur as expected, right click the "stuck" transaction and select Increase the fee. A window will popup with an option to raise the fee.

Bump the transaction fee

Move the slider back and forth to get new confirmation estimates.

You can also calculate the "sufficient" fee yourself.

List of current fee rates
Old screenshot from now defunct 21.co

In this particular case, paying anywhere between 201 and 220 satoshi per byte should be good enough to get the transaction confirmed within the next 25 blocks or roughly 4 hours.

To calculate the total needed fee click OK. Transaction details will pop up (don't hit the Sign button yet).

Find the transaction size and calculate the fee

Look for the transaction Size, which is 226 bytes in our case.

Multiply this size by a chosen fee rate, and you will get the total fee that needs to be paid. Let's say:

226 B x 220 satoshi = 49 720 satoshi or 0.0004972 BTC

Close the window and go back to the "RBF screen".

in the New fee field, type in the new fee denominated in BTC (0.0004972 BTC) and hit OK.

Click Sign and then Broadcast to send the new transaction.

Sign and broadcast the new transaction

The former transaction will be replaced by the new one, with the hope that it will be picked up by miners in the near future. It's important to mention that when you search for the new transaction on a block explorer such as blockchain.info, you may encounter a warning indicating a possible "double spend" of a previous transaction.

Although RBF (Replace-By-Fee) simplifies the process for non-technical individuals to perform a double spend on an unconfirmed transaction, it is equally effortless to do so even without enabling Replace-By-Fee. It is highly advisable to refrain from accepting any unconfirmed transactions for this reason alone.

By accepting unconfirmed transactions, you run the risk of encountering situations where the original transaction is replaced by a new one that spends the same funds. This can lead to potential fraud or conflicts within the blockchain. Thus, it is crucial to wait for a transaction to be confirmed by miners before considering it valid and reliable.


I hope your Bitcoin experience is mostly positive, but the Replace-By-Fee was put in place in case it is not.

Having RBF (Replace-By-Fee) turned on by default for all transactions is considered a general guideline. The primary rationale behind this recommendation is the dynamic nature mempool, which can rapidly expand in a matter of minutes. Therefore, what might appear to be an appropriate fee initially can soon become inadequate.

Especially when conducting transactions of high significance, such as paying business partners for goods and services or sending crucial payments like rent, it is generally advised not to take any risks. By having RBF enabled, you have the flexibility to increase the fee later if necessary, ensuring that your transaction is processed promptly and efficiently.

Found this valuable?

Please consider supporting us. Thank you!

Support us
WRITTEN BY

Mario Dian

I'm an Anarchist, Rothbardian, Bitcoiner and Travel Hacker. Also founder of @freedomnodecom.

Show comments