Bitcoin Fees and Unconfirmed Transactions - Complete Beginner's Guide
Summary
TLDRThis informative script delves into the intricacies of Bitcoin transaction fees, explaining why they exist and how they function within the Bitcoin network. It clarifies that these fees are paid to miners as an incentive to prioritize transactions during times of network congestion. The video outlines the process of transaction verification, the role of the Mempool, and how miners select transactions based on attached fees. It also discusses the concept of feerate, measured in Satoshis per byte, which fluctuates with network demand. The script provides practical advice on reducing fees, such as avoiding busy network times, using SegWit-compatible wallets, and consolidating inputs. It touches on the Replace By Fee (RBF) feature and transaction accelerators, and addresses concerns about transactions getting stuck. The summary concludes by acknowledging the complexity of fees and the ongoing search for scalable solutions like the Lightning Network, inviting viewers to engage with further questions.
Takeaways
- 💰 **Transaction Fees**: Bitcoin owners pay miners to process transactions, which are prioritized based on the fee attached.
- ⏱️ **Transaction Speed**: Higher fees can expedite the confirmation process, while lower fees may result in slower transaction times.
- 🚫 **Insufficient Fees**: If the fee is too low, transactions may be delayed or not processed, potentially getting 'stuck'.
- 🔄 **Mempool**: Valid transactions wait in the Mempool to be included in a block; they are 'unconfirmed' until added to the blockchain.
- 📏 **Transaction Size**: The fee is calculated based on the transaction's size, which is influenced by the number of inputs and outputs.
- 🏡 **Feerate**: Similar to cost per square foot in real estate, the feerate in Bitcoin is the fee paid per byte of transaction data.
- 📊 **Dynamic Fees**: The required fee fluctuates with network demand, much like apartment prices vary by location and demand.
- 💡 **Wallet Assistance**: Bitcoin wallets typically calculate and suggest appropriate fees based on the current network conditions.
- 🕒 **Timing**: Sending transactions during off-peak times can reduce fees, as network congestion drives up the cost to prioritize transactions.
- 🔗 **SegWit**: Using a wallet that supports SegWit can reduce transaction size and fees, as it optimizes the way transaction data is structured.
- ⛓ **Lightning Network**: As a future solution, the Lightning Network aims to offer nearly instant and free transactions for Bitcoin users.
Q & A
Why are Bitcoin transaction fees necessary?
-Bitcoin transaction fees are necessary because they serve as an incentive for miners to include transactions in the blocks they mine. Fees are a way for users to signal the urgency of their transactions to miners, with higher fees leading to faster confirmation times.
How can I ensure my Bitcoin transaction goes through quickly?
-To ensure your Bitcoin transaction goes through quickly, you can attach a larger transaction fee. This signals to miners that your transaction is a priority and should be processed sooner.
What happens if I don't pay enough in transaction fees?
-If you don't pay enough in transaction fees, your transaction may be delayed or not processed at all. Miners prioritize transactions with higher fees, so a low-fee transaction may remain unconfirmed for a long time or be dropped from the mempool after 72 hours.
Is it possible for my Bitcoin transaction to get stuck indefinitely?
-While it's unlikely, a transaction can theoretically get stuck indefinitely if a node continuously rebroadcasts it. However, if a transaction remains unconfirmed for a long time, it will eventually be erased from the mempool of most nodes.
How can I pay less in transaction fees compared to the average user?
-You can pay less in transaction fees by avoiding sending transactions during peak network times, using a wallet that supports SegWit to reduce transaction size, consolidating your inputs to reduce the number of inputs in a transaction, and grouping multiple outputs into a single transaction.
How is the size of a Bitcoin transaction calculated?
-The size of a Bitcoin transaction is calculated based on the number of inputs (references to past transactions), the number of outputs (addresses being paid to), and the script complexity (special features like multisig). The more inputs and outputs, and the more complex the script, the larger the transaction size.
What is the Mempool and why is it important?
-The Mempool, short for Memory Pool, is a 'waiting room' where valid but unconfirmed transactions wait to be picked up by miners and included in a block. Transactions in the Mempool are considered 'unconfirmed' until they are confirmed by being included in a block.
What is the Replace By Fee (RBF) feature and how does it work?
-Replace By Fee (RBF) is a feature that allows a wallet to rebroadcast a transaction with a higher fee. This can help speed up the confirmation of a transaction that is stuck due to a low fee. However, not all wallets support RBF, and in some cases, it is an opt-in feature.
What is the Lightning Network and how does it relate to transaction fees?
-The Lightning Network is a proposed solution for handling a large volume of Bitcoin transactions off the main blockchain. It aims to enable near-instant and virtually free transactions, which could significantly reduce the reliance on transaction fees for prioritization.
How do Bitcoin wallets typically handle transaction fees?
-Bitcoin wallets typically recommend a reasonable fee based on the current and recent activity levels of the Bitcoin network. Users can often adjust their fees or set a general fee preference (low, medium, or high) within the wallet. Wallets also calculate the transaction size and suggest the appropriate fee based on the average feerate.
What is the Child Pays for Parent (CPFP) strategy and how does it work?
-Child Pays for Parent (CPFP) is a strategy where a new transaction is created that spends unconfirmed incoming transactions (child transactions) and includes a high enough fee to incentivize miners to also mine the old, low-fee transactions. This can be a complex and risky procedure not intended for average users.
Outlines
🤔 Understanding Bitcoin Transaction Fees
This paragraph discusses the reasons behind Bitcoin transaction fees, the importance of fee size in transaction confirmation speed, and strategies to minimize fees. It explains that fees are paid to miners and are determined by the urgency of the transaction. The concept of 'Mempool' is introduced, which is a waiting area for transactions before they are included in a block. The paragraph also touches on the historical changes in fee structures and the current necessity of fees for transaction mining. The transaction size and its factors, such as the number of inputs and outputs, are also explained, along with how they affect the transaction fee.
💡 Minimizing Bitcoin Transaction Costs
The second paragraph delves into methods to reduce transaction fees. It suggests avoiding network congestion, using SegWit-compatible wallets, and consolidating inputs to decrease transaction size. The paragraph also covers the use of grouping multiple outputs into a single transaction to save on fees. It discusses how wallets estimate and recommend fees based on network activity and how users can adjust their fee preferences. Additionally, it provides an example of calculating the transaction fee based on the transaction size and the current feerate. Lastly, it addresses what happens if a transaction fee is not sufficient, including the potential for transactions to get stuck and the options available to users in such scenarios.
🔄 Advanced Fee Management and Network Solutions
The final paragraph explores advanced fee management strategies, such as using the Replace By Fee (RBF) feature and transaction accelerators. It also mentions the potential risks of double-spending and the Child Pays for Parent (CPFP) method. The paragraph discusses the mempool's role in transaction confirmation and the possibility of a transaction being forgotten or stuck indefinitely. It concludes with a note on the importance of low fees for Bitcoin's goal as a peer-to-peer payment system and hints at the Lightning Network as a potential solution for handling increased demand on the Bitcoin network.
Mindmap
Keywords
💡Bitcoin transaction fees
💡Transaction verification
💡Mempool
💡Transaction size
💡Feerate
💡Unconfirmed transaction
💡SegWit (Segregated Witness)
💡Inputs and Outputs
💡Replace By Fee (RBF)
💡Transaction accelerators
💡Lightning Network
Highlights
Bitcoin transaction fees are paid to miners as an incentive for including transactions in a block.
Transaction verification involves checking the validity of a Bitcoin transaction by nodes.
After verification, transactions enter the Mempool, a 'waiting room' for miners to pick up.
Miners prioritize transactions based on the attached fee, especially during network congestion.
The urgency of a transaction is signaled by the fee size, affecting confirmation speed.
Bitcoin transaction fees are always paid by the sender.
Every transaction requires a fee to get mined, unlike in the past where certain transactions could be free.
Transaction fees are calculated based on the size of the transaction and the current network demand.
Feerate, measured in Satoshis per byte, determines how much is paid per unit of transaction size.
Transaction size is influenced by the number of inputs, outputs, and script complexity.
Bitcoin wallets suggest fees based on the average feerate at the time of transaction.
The Bitcoin blockchain does not explicitly list fees; they are inferred from the transaction inputs and outputs.
To save on fees, avoid transacting during network peak times and use wallets that support SegWit.
Consolidating inputs and grouping multiple outputs can optimize fee costs.
Wallets recommend fees based on network activity levels, with options to adjust fee preferences.
If a transaction fee is too low, the transaction may be delayed or stuck in the mempool.
Replace By Fee (RBF) and transaction accelerators are methods to address fee-related issues.
Transactions not confirmed for an extended period may be erased from mempools, potentially 'stuck' if not managed.
The Lightning Network is a promising solution for handling increased demand and reducing transaction fees.
Transcripts
Why are there Bitcoin transaction fees?
How much do I need to pay
to get my transaction to go through quickly?
What happens if I don’t pay enough of a fee?
Can my transaction get stuck?
Is there a way for me to pay less in fees than most other people do?
If you’re looking for easy to understand answers,
stick around,
here on Bitcoin Whiteboard Tuesday,
we’ll answer these questions and more.
When talking about fees in the context of Bitcoin
we usually are referring to
the amount bitcoin owners pay to bitcoin miners
whenever they send funds to another bitcoin address.
In order to truly understand fees in detail
we first need to understand
what happens when you send Bitcoins to another address.
After you send a Bitcoin transaction,
the first step it goes through is transaction verification.
This means the transaction is checked by every computer
holding a copy of the Bitcoin blockchain for validity.
These computers are called nodes.
Basically, at this stage
the nodes are checking Bitcoin’s history
to make sure that you actually have the Bitcoins in your account balance
that you want to spend.
After a transaction is deemed valid
it goes into the Mempool, short for Memory Pool.
This is sort of a ‘waiting room’
where the transaction sits and waits for a miner to pick it up
and pack it into a block of transactions.
In other words,
even though the transaction is valid,
we still haven’t updated it into the global ledger of Bitcoin transaction.
At this point
the transaction is considered an “unconfirmed transaction”
or a “zero confirmation transaction”.
Finally, once a miner picks up the transaction
and includes it in a successfully mined block
the transaction is considered to be confirmed
and the process of sending the funds is complete.
Now here’s the thing -
A block can only hold a finite amount of transactions,
so at times when the network is crowded
and there are a lot of transactions waiting to be confirmed
the miner will prioritize which transactions to pick up
based on the fee attached to the transaction.
So fees are a way of signalling to the miner
how urgent your transaction is.
If you want to get confirmed faster you’ll attach a larger fee.
If you’re not so time sensitive you can do with a smaller fee.
One thing to keep in mind is that
fees are always paid for by the sender of the transaction.
In the past,
fees had different rules than what they do today.
You could send transactions for free
if your transaction was small enough in size
or if it had “priority”.
Today however, things have changed,
and every transaction requires a fee in order to get mined.
Calculating the appropriate Bitcoin transaction fee
isn’t as straightforward as it seems.
Every transaction has a size, just like a file size on your computer.
Since miners want to maximize their profit,
they will prioritize transactions that have
a larger fee to size ratio, or feerate for short.
Let’s explain with an example from a different market.
When shopping for a home or an apartment,
the price of the home is calculated in terms of cost per square foot.
While the apartment’s price is comparable to
the total transaction fee you pay,
in order to measure the apartment’s value,
you need to calculate
how much you would need to pay per square foot.
Feerate is Bitcoin’s cost per square foot.
Feerate is measured in Satoshis per byte.
It basically means how many Satoshis
or the smallest unit of account in Bitcoin
that you are willing to pay
for every byte or unit of size of your transaction.
This rate varies depending on
how much the network is crowded with transactions,
much like the cost of an apartment varies
depending on the demand for living space
in the area you want to live.
There are several websites that list the estimated feerate
in order to get your transaction included into the next block.
So how is the transaction size calculated?
Well, a transaction size depends on a number of different factors,
let’s go over the most significant ones.
The first factor is the number of inputs.
Each Bitcoin you own, at its core,
is just a reference to past transactions that were sent to you,
adding up to the amount you own.
These references are known as inputs.
When you send Bitcoins to someone
you are basically selecting different inputs sent to you in the past
and forwarding them to the recipient as outputs.
The more inputs your transaction is comprised of,
the bigger its size.
For example, let’s say you own one Bitcoin.
That Bitcoin is actually comprised of
many references to transactions sent to you in the past,
assuming you accumulated that one Bitcoin from several sources.
When you send this one Bitcoin to someone else,
your transaction will be composed of all of these previous references.
The second factor is the number of outputs.
Simply put,
outputs are the number of addresses you’re paying to.
For example,
if you’re only paying to one address,
it’s highly likely you’ll actually generate two outputs.
One for the address you’re sending to, and another one to “pay yourself back”
the change from your initial payment.
For an explanation about change,
take a look at our ‘Bitcoin change explained’ video.
The last significant factor in determining your transaction size
is the script complexity.
Some transactions use special features
which we won’t go into in this video like multisig.
These features increase the transaction size.
As you may imagine,
it is very difficult for the average user to calculate the transaction size
based on these factors.
Luckily,
your Bitcoin wallet will do this for you and suggest the fee you should pay,
based on the average feerate at the moment of transaction.
As a side note,
you should know that the Bitcoin blockchain
doesn’t list the fee paid for each transaction explicitly.
The only way to deduce what fee was paid by the sender
is to calculate the difference between how many Bitcoins were sent
minus how many were received
and how many were returned as change.
Here’s an example to illustrate this:
In the transaction you see on the screen,
the input is 10 Bitcoins.
The outputs are 1.9995 Bitcoins for the receiving address
and 8 Bitcoins have been returned as change.
From this we can calculate that the missing amount or 0.0005 Bitcoins
has been paid as a fee.
Let’s move on and explore ways for paying less in transaction fees.
For starters,
you can avoid sending transactions when the network is busy.
When the Bitcoin network is extremely busy,
for example, when the price spikes
and many people are looking to buy Bitcoin,
users will bid up their fees in order to prioritize their transactions.
This can cause fees to become ridiculously expensive.
If you can delay a transaction to a time when the network is less crowded
you may be able to save a lot of money on fees.
Another option would be to use a wallet that supports SegWit.
SegWit, short for Segregated Witness,
is a Bitcoin protocol upgrade which configures the transaction's data
in such a way as to create a file that is smaller in size.
Many wallets already support this feature
and it can cut costs substantially.
Grouping your inputs is a more advanced method for optimizing fees.
The more inputs you need to create your transaction,
the bigger its size,
meaning the more fees you’ll need to pay for it.
If you want to keep fees low,
every once in a while you can consolidate your inputs.
This is done by sending many small inputs to an address you own
at a time when fees are low.
This way, you will significantly reduce your future fees
since you will only have one input.
Aside from consolidating inputs
you can also group multiple outputs or payments to one transaction.
Not all wallets support this feature, but if your wallet allows this,
you will be able to send payments to several addresses in one transaction
which will reduce the required fee.
Now let’s talk about how Bitcoin wallets deal with fees.
Wallets attempt to recommend a reasonable fee,
based on the current and recent levels of activity of the bitcoin network.
Some wallets and services manage fees poorly and overbid fees,
which in turn drives up the fees for everyone else as well.
Most wallets allow you to adjust your fees
or at least set a general fee preference like low, medium, or high.
As I mentioned earlier,
to choose the right fee
you’ll first need to know your transaction size.
If your wallet supplies you with that info,
you can then use a feerate estimation table
to figure out how much you need to pay
in order to be included in the next block.
Here’s an example:
If your transaction size is 16,000 bytes
and at the moment of transaction
the average feerate to be included in the next block
is 10 Satoshis per byte,
then you’ll need to pay 10 X 16,000 or 160,000 Satoshis
as a transaction fee,
for a good chance to be included in the next block.
Up until now
we’ve covered what happens if you pay enough fees,
but what happens if you don’t?
While what I’m sharing with you in this video
sheds some light on the topic of fees,
most Bitcoin users aren’t “fee experts”.
Therefore, more often than not
and especially when the price rallies,
and the network is crowded,
you’ll hear of people complaining
that their transaction is stuck as unconfirmed or pending.
There are two things that can get a transaction stuck,
so to speak :
#1 You didn’t pay a high enough fee
so miners prioritize other transactions over your own.
or #2 You are trying to send coins from a transaction you received
that hasn’t been confirmed yet,
and yes, some wallets allow this.
So what can you do?
Well, here are your options:
The first option would be just to wait it out.
If your transaction isn’t urgent,
take a break, and forget about it for at least 72 hours.
There’s a good chance that it’ll sort itself out one way or another.
Another option would be to use the Replace By Fee feature or RBF.
RBF allows a wallet to rebroadcast a transaction
with a higher fee.
Bear in mind that not all wallets support RBF,
and in certain wallets RBF is an opt-in feature.
If your wallet does support RBF,
it can save you a lot of fee-related headaches,
and there’s really no downside to using it.
You can also try transaction accelerators.
There are different transaction accelerators
which are operated by mining pools.
They’ll add your transaction to the next block they mine
if they have the capacity to do so.
Some are free,
while others are free below certain size limits,
some mining pools charge upfront,
while there are others that request tips.
If all else fails you are left with two final options:
Try to double spend the transaction
or use “Child Pays for Parent”
Double-spending sends the same transaction again,
but with a higher fee.
It’s much like RBF,
but with one big difference:
RBF transactions conform to agreed rules,
and are incorporated in several wallet designs.
On the other hand,
double-spending is explicitly considered something you shouldn’t do.
It’s actually one of the major problems that Bitcoin was created to solve
and that all wallets are designed to prevent.
Child Pays for Parent or CPFP
means you essentially spend coins that are incoming
but are yet unconfirmed,
which is something I previously advised against.
The idea behind this is that
the fees on a new outgoing transaction
will be high enough to cover
both themselves and the unconfirmed incoming transactions they depend on.
A miner may be enticed to mine the old, low-fee unconfirmed transaction,
in order to claim the new, high-fee CPFP transaction,
as it’s impossible to claim the new transaction
before the old one is confirmed.
Both these processes are rather difficult procedures
which may place your funds at risk
and are not intended for the average user
so we won’t go over them in this guide.
Many people often ask us,
can my transaction get stuck forever?
Well the short answer is no.
The Correct answer is probably not,
but it depends.
Earlier in this video
I talked about the transaction waiting in the mempool
to get picked up by a miner.
Well, the mempool doesn’t exist in just one place.
Each computer or node that validates transactions
has a part in its hard drive
that is dedicated for storing pending transaction.
So different nodes have different versions of the mempool,
depending on which transactions they know about and remember.
If a transaction is not confirmed for a long period of time,
it will eventually be erased from a node's mempool.
The current default time period for deletion is 72 hours
but nodes may set their own duration.
This is why waiting for at least 72 hours
will probably yield one of two results:
Either your transaction will get confirmed,
or it will get erased from all of the mempools in the network
and the funds will be returned to your wallet.
Having said that,
it’s possible that a certain node will never forget about your transaction,
and may even occasionally rebroadcast it,
which reminds other nodes about it.
In that case,
your transaction can be stuck forever
unless you use some of the methods I’ve mentioned earlier.
As you can see
the issue of fees is pretty complex
and can be a topic for a lot of controversy.
Keeping fees low is important
since having a cheap peer to peer payment system
is one of the goals Bitcoin was created to achieve,
but as always there are other considerations
to take into account, aside of low fees.
As Bitcoin grows in popularity,
more and more people will begin using it
and the network needs to find new solutions to handle the demand.
One promising candidate for such a solution
is the Lightning Network.
While it’s not quite ready for mainstream adoption,
the Lightning Network promises nearly instant, free transactions
to all Bitcoiners
but that’s a topic for a different video.
Hopefully by now you better understand the topic of fees
and how they act as a method of prioritizing Bitcoin transactions.
You may still have some questions.
If so, just leave them in the comment section below.
And if you’re watching this video on YouTube,
and enjoy what you’ve seen,
don’t forget to hit the like button.
Then make sure to subscribe to the channel and click that bell
so that you’ll be notified as soon as we post new episodes.
Thanks for joining me here at the Whiteboard.
For 99Bitcoins.com, I’m Nate Martin,
and I’ll see you… in a bit.
Просмотреть больше связанных видео
![](https://i.ytimg.com/vi/f3CFUbeehc8/hq720.jpg)
What is Segwit? Segregated Witness Explained Simply
![](https://i.ytimg.com/vi/ONhbb4YVRLM/hq720.jpg)
What is Bitcoin Cash? - A Beginner’s Guide
![](https://i.ytimg.com/vi/qLZ1IoezucE/hq720.jpg)
Ethereum Wallets Explained Simply (Smart Contracts, Gas, Transactions)
![](https://i.ytimg.com/vi/d2kMmNyNo00/hq720.jpg)
Bitcoin investigation and wallet seizure
![](https://i.ytimg.com/vi/ZPFL6R-voW0/hq720.jpg)
Bitcoin Transactions - from "Send" to "Receive"
![](https://i.ytimg.com/vi/NHTeT2hYng0/hq720.jpg)
Optimizing Bitcoin Transactions: Exploring Innovative Solutions
5.0 / 5 (0 votes)