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:
There is a detailed explanation of Bitcoin Fees here.