If you’re reading this post I assume that like many others, you sent a bitcoin transaction and was kind of confused as to why it’s still listed as “unconfirmed” or “pending” after a few hours or so.
I mean Bitcoin transactions are supposed to be instant right?
In this post I want to try and explain in a very basic way how a Bitcoin transaction works and why the fee that you attach to each transaction has a crucial role in how long it will take the transaction to go through the network.
Here’s what happens when you send Bitcoins to someone
Whenever you send someone Bitcoins, the transaction goes through different computers running the Bitcoin protocol around the world that make sure the transaction is valid. Once the transaction is verified it then “waits” inside the Mempool (i.e. in some sort of a “limbo” state).
It’s basically waiting to be picked up by a Bitcoin miner and entered into a block of transaction on the Blockchain. Until it is picked up it’s considered an “unconfirmed transaction” or a “pending transaction”. A new block of transactions in added to the Blockchain every 10 minutes on average.
However since there are so many transactions lately due to the price increase, and a block can only hold a finite amount of transactions, not all transactions are picked instantly. So you need to wait for a certain amount of time until a miner decided to pick your transaction out of all of those sitting around in the mempool.
Once your transaction is included in the block it receives its first confirmation and it’s no longer pending. After another block of transactions is added it will get another confirmation and so on….here’s a short video explaining this:
How can you make sure your transaction will get included in the next block?
Simple. By adding a big enough mining fee to it. You see one of the ways miners get paid for their work is by collecting the fees on the different transactions. So naturally they would prefer to include the transactions with the highest fees first. If your fee is high enough – your transaction will go through faster.
How can you tell how much is the right fee?
Fees are calculated by the size of the transaction. Every transaction has a size, just like a file size. The size depends on many factors that I won’t go in to at the moment. The fastest and cheapest transaction fee is currently 60 satoshis/byte. So if, for example, your transaction is 257 bytes, you will need to pay 257*60 = 15,420 Satoshis as a transaction fee in order to be included in the next block.
So now you’re probably asking “How can I calculate my transaction size?”
You can’t, at least not without extensive knowledge of how Bitcoin works. Your wallet is supposed to do this for you. Most wallets today will either automatically add the required fee to get the transaction confirmed as soon as possible or will let you choose from a variety of fees according to the requested confirmation time (e.g. fast, medium, slow).
However, since I wouldn’t want to leave you hanging I decided to give you an overview of how the most popular wallets around handle their fees:
Coinbase – Coinbase pays the miner fees (typically 0.0003 BTC) on external transactions in order to ensure these transactions propagate throughout the bitcoin network quickly. For very small transaction amounts you may be prompted to pay the transaction / miner fee. (source)
Blockchain.info – The wallet implemented a dynamic fee structure.Dynamic fees work to detect changes in network volume and will raise or lower transaction fees accordingly. This means that the same transaction may require a higher fee during a period of network congestion, or a lower fee if sent during a period of decreased activity. If you set a custom fee a warning will display if a custom fee is thought to be unnecessarily high or dangerously low. (source)
Greenaddress – GreenAddress is the first Bitcoin wallet to include a replace-by-fee option. With it, users can increase fees on their transactions and increase the likelihood a miner will include a transaction in a block.
Clicking on the “bump fee” tab opens a mini-menu. On top of the menu, text displays how fast the transaction is expected to confirm. The menu allowed me to bump the fee: times 1.5, times 2 or times 3.
if a transaction is not expected to be mined in the first available block because the fee is too low, the mini-menu offers users the option to include a fee big enough to have the transaction included in the next two, three or six blocks. (source)
MyCelium – Mycelium does give you some control over the fee. In Settings/Miner Fee, you can select Standard, Economic, or Priority for (I think) 0.1mBTC, 0.01mBTC, or 0.5mBTC, respectively, per mB. (source)
Bitcoin QT -Bitcoin Core will use floating fees. Based on past transaction data, floating fees approximate the fees required to get into the `m`th block from now. Bitcoin Core will cap fees. Bitcoin Core will never create transactions smaller than the current minimum relay fee. Finally, a user can set the minimum fee rate for all transactions. (source)
There’s a very helpful resource created by 21.co that shows how many Satoshis/byte you’ll need to pay in order to get included in the upcoming blocks. Here’s an example of the current situation inside the Bitcoin network:
For each Satoshi/byte category you can see the number of unconfirmed transactions as opposed to the transactions that went through. For example, 15405 transactions with a fee of 11-20 Satoshis/byte went through the system in the last 3 hours as opposed to 1533 that are waiting for confirmation.
On the right hand side you can see the estimated number of block confirmation / minutes you’ll have to wait until your transaction gets included.
What happens to transaction that don’t get confirmed ever?
Basically transactions stay in “limbo” (i.e. the mempool) until they are included in a block. However, if a transaction stays inside the mempool for too long the different computers holding it (Bitcoin nodes) may just drop it from their system. In this case the transaction will be canceled.
Some wallets may try to rebroadcast an expired transaction and therefor it will stay inside the mempool for a long time until some miner decides to have pity on your soul and include it :)
So I hope this clears things up a bit. Next time before sending a Bitcoin transaction make sure to add the appropriate fee in accordance to the wallet you are using.
If you have any more questions or insights about Bitcoin fees feel free to leave them in the comment section below.
Find the best exchange to buy Bitcoins
Latest posts by Ofir Beigel (see all)
- Bitbay Reviewed: Buying Bitcoins in Poland - November 28, 2016
- Bitcoin All Time High Chart - November 23, 2016
- “Bitcoin was supposed to change the world. What happened?” – Vox | $735.54 - November 21, 2016