Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Follow Contact

HF Rulez the UniverseHF Rulez the Universe
Focus Broken
𝕭𝖎𝖙𝖈𝖔𝖎𝖓
Bitcoin Electrum fee fees unconfirmed transaction Cryptocurrency RBF CPFP

How to use Electrum to add fees to unconfirmed Bitcoin transactions

Posted 01-10-2021, 01:08 AM
Electrum Bitcoin wallet

Electrum is the most advanced, open source, full feature Bitcoin wallet.  This is only a basic guide for new users who just need to get their unconfirmed transactions mined quickly, I do not cover the advanced setup requirements to use Electrum in a private way.  If you want to use Bitcoin privately, see my guide on Wasabi Wallet here:  https://hackforums.net/blog/how-to-use-b...-privately

Bitcoin fee basics:  "I've been waiting for X days and my transaction is still not confirmed??  Help!"

This is a common problem that can frustrate new Bitcoin users, but it's not an unplanned bug that you are experiencing- Satoshi placed a limit on the size of Bitcoin blocks, which are mined every 10 minutes on average.  This protects the decentralized node network from being flooded/DDoSed, and creates a "highest bidder" market for new data (such as your transaction) being recorded to the blockchain.  This design limit means that the fee your transaction pays does not depend on the value of the transaction you send, it depends on the size of the transaction you send, measured in vbytes.

Adding a fee to an unconfirmed transaction

You shouldn't feel the need to "play it safe" and waste money overbidding on a Bitcoin transaction fee because you are worried it will take too long to confirm.  There are ways to increase the fee on an unconfirmed transaction as both the sender and receiver.  It is more cost efficient for the sender to increase the fee, but it is possible to do it as the receiver as well.

Boost fee as receiver:  Child pays for parent (CPFP)

CPFP allows a receiver to "boost" an unconfirmed transaction by spending the unconfirmed coins in a new transaction with a high enough fee to pay for both of them combined.  This is not as cost efficient as RBF because a second transaction has to be created with an extra high fee to pay for the original one, whereas RBF actually cancels the original one.  However, sometimes you would rather secure the payment immediately as the receiver even if it means you pay the extra fee yourself.

Boost fee as sender: Replace By Fee (RBF)

RBF allows a sender to cancel an unconfirmed transaction that pays a lower fee by broadcasting a new one using the same UTXO that pays a higher fee.  This is the reason you do not want to complete your end of an exchange with an untrustworthy party until their transaction reaches 1+ confirmation because they might pay a higher fee on an unconfirmed transaction that spends the coins back to their own wallet instead of your address!

=-=-=

Electrum Installation Walkthrough

The Electrum version in this guide is 4.0.9 and I'm installing it on Windows 10.

=-=-=

1.  Download https://electrum.org/

You have the options to compile from the source and verify PGP signatures.  I'm just going to download the installer for this guide.

Download (Click to View)
=-=-=

2.  Install

Run the installer, then open the app.  "Next" through these options:  You will be prompted to select a server or auto connect, then you will be prompted to create the directory on your hard drive to store your wallet, then you will be prompted to choose your wallet type.  After that, you will be asked whether or not you are creating a new wallet or importing an existing one.  I am going to create a new one for this guide.  Choose "Segwit" for your seed type instead of legacy in order to save 40%+ on transaction fees.

=-=-=

3. Write down your 12 word recovery phrase on a sheet of paper

You need this to recover your Bitcoins in case the device your wallet is on stops functioning.  Do not lose it or store it electronically!  This step cannot be skipped, you will be required to re-enter this phrase on the next screen to make sure you have recorded it correctly.

12 word wallet recovery phrase (Click to View)
=-=-=

4.  Password

If you set a password for your wallet, THERE IS NO WAY TO RESET IT!  You will need your password each time you send a transaction, and you will need your password in addition to your 12 word seed in order to recover your funds.

=-=-=

5.  Configure settings

Click tools->preferences on the menu bar to open the customization box.  I've toggled on the dark theme and changed the units from mBTC to sats under the General tab, and I've turned on the "Batch RBF transactions" and "Advanced preview"  under the Transactions tab:

Preferences (Click to View)
Now your wallet is set up and ready to receive transactions!

=-=-=

Example-  Child Pays For Parent:

Under the receive tab, the description, requested amount, and expiration boxes are all optional so I did not complete them for the purpose of this guide.  Click "New address" and copy/paste the address to the transaction sender.  You should always create a new address for each transaction you receive in order to get better privacy.

Receive tab (Click to View)
So you check your history tab and see that your address has been paid 2.5 million sats 😁!...  But the sender only paid a fee rate of 2 sat/b while there are 65 MB of waiting transactions already bidding higher rates, and new transactions that pay higher fees are being created every second, potentially pushing this number even higher ☹️...

Right click the unconfirmed transaction and click "Child pays for parent" to skip everyone else in line:

History tab (Click to View)
CPFP (Click to View)
=-=-=

Example-  Replace By Fee:

This is the transaction creation screen.  Adjust the target fee at the bottom and make sure "Replace by fee" is filled.  Review the details, click finalize, sign, and broadcast:

Create transaction (Click to View)
You sent 1.5 million sats with a 2 sat/byte fee which is being outbid by 69 MB of other transactions... now your counterparty won't give you the goods until the transaction reaches 1 confirmation because they don't trust you not to cancel it, and they don't want to pay the extra fees themselves! 

Right click your transaction in history and click "Increase fee" to get it confirmed in the next block:

History tab (Click to View)
RBF (Click to View)
01-10-2021, 09:47 AM
Nice tutorial
RECENT ARTICLES