Bitcoin: (High) Transaction Fees (Long) Confirmation Times

Why is my transaction fee so high?! Why is my transaction not yet confirmed?!

In my previous blog post, we touched on some basic concepts of Bitcoin. We will now use those concepts to discuss transaction fees and confirmation times. These are important concepts to understand because these affects how you will be using your Bitcoins later on.

Transaction Fees

For new Bitcoin users, the concept of transaction fees are not immediately noticeable. However, if you look closely, whenever you do any transaction you are required to pay a transaction fee. So what are transaction fees and what are they used for?

To answer that, we need to back track a bit and go back to our previous discussion about blocks and transactions. As we already know, blocks store all transactions made in the Bitcoin network permanently. We also learned that miners’ solves for hashes in blocks in order for a block to be added into the blockchain. So where does transactions fees come in? We must first understand the building blocks of transaction before proceeding.

Inputs and Outputs

I mentioned in my previous post that a transaction contains an input and an output. A single transaction can contain multiple inputs and multiple outputs.  To keep it simple,  an input tells you where your Bitcoins came from. While on the other hand, an output tells you where your Bitcoins will be sent. Let’s have an example to have a better idea of how inputs and outputs work in a transaction.

Let’s say you have 10 Bitcoins and you wanted to purchase a car worth 9 Bitcoins. For simplicity’s sake, let’s just say that your 10 Bitcoins came from a single transaction. Now you bought the car and sent your 10 Bitcoins to the car dealer. You will then get your 1 Bitcoin back and 9 Bitcoins will now be sent to the car dealer. In this example, your transaction of sending your 10 Bitcoin to the dealer will contain 1 input (which is your 10 Bitcoins) and 2 outputs (1 output is the 1 Bitcoin returned to you as your change and the other output is the 9 Bitcoins you sent to the car dealer).

Note: Inputs and Outputs are much more complicated than this. What I did was to simplify it as much as possible.

Transaction Size

Now that we know about inputs and outputs, we also need to understand what a transaction size is. These concepts plus other factors are needed to understand how transaction fees are calculated.
A transaction can be composed of a single or multiple input and a single or multiple output. Each input and output has its own size in bytes. We can calculate for the transaction size by adding up all the sizes of inputs and outputs plus other information included in the transaction.
This transaction which was used in an example in a Stack Exchange question contains 40 inputs and 16 outputs. With other information in place, the resulting size of that transaction is 7761 bytes or 7.58 kilobytes. The other information included in a transaction other than the inputs and outputs are constant in all transactions. This means that the number of inputs and outputs greatly affects your transaction size.

Bitcoin Blocksize and the Mempool

Before finally going back to transaction fees, we must first understand Bitcoin’s blocksize and how it affects everything. In our example above, a single transaction with 40 inputs and 16 outputs totaled to about 7.58 kilobytes. Bitcoin’s blocksize, disregarding SegWit’s “advantage”, is just 1 megabyte. Since we already know that a block is comprised of multiple transactions, this means that only a handful of transactions can be included in a block whenever it is mined. Basing from my previous blog post again, we have an idea that a block is mined roughly every 10 minutes. So if we have a lot of transactions amounting to more than 1 megabyte, where do these transactions end up while they are waiting to be included in the next block?

That’s where the Mempool comes in. You can think of the mempool as the “waiting lounge” of transactions that have yet to be included in a block. Each mining node has their own set of mempools which miners use to store transactions that they will process in the next block. Whenever a transaction is included in a block, it is removed from the mempool. There are times when activity in the Bitcoin network gets so high that the mempool gets clogged up. This results to thousands of transactions being “stuck” in the mempool for hours. This is because only a handful of transactions can be included in a block every 10 minutes. There are even times when a transaction gets cancelled because it was left in the mempool for far too long (more than 14 days).

Back to Transaction Fees

So where does the transaction fee fit in to all these? As mentioned above, Bitcoin’s blocksize is only 1 megabyte. This greatly limits the number of transactions that can be included within a block. Technically, transactions should be on a first come first serve basis or what we call FIFO (First in, First Out). However due to the limited block size and high number of transactions on busy days, most transactions end up waiting in the mempool.

A fee market was later on introduced to Bitcoin. This allows users to set a higher fee than normal so that miners will prioritize their transactions over other transactions. This also incentivizes miners to prioritize transactions with higher fees. Transaction fees are measured by sats (satoshis*) per byte. This means the larger your transaction size is, the more expensive your transaction fee would be. Take note this is based on transaction size (inputs + outputs + other info) and not transaction amount. Because of this fee market setup, the growing demand for the usage of Bitcoin and the limited block size, network fees sky rocketed and confirmation times became longer.

Confirmation and Confirmation Times

We already know that a block contains transactions. Once a block is added to the blockchain, all transactions in it will be irreversible and will be forever part of the blockchain. To secure a transaction against double spending, all transactions require a minimum number of confirmations before being considered as “Confirmed”. So what are confirmations?

Once a transaction gets included in a block, it automatically gets one confirmation. This means that your transaction is 1 level deep in the blockchain. When a new block gets added, your confirmation number increases by 1. For majority of small transactions, 6 confirmations are required before considering a transaction as confirmed. This means that once your transaction is included in a block, you must wait for 5 more blocks to be mined before your transaction gets confirmed. On average, a small transaction should not take more than 1 hour to be confirmed.

Unfortunately, due to the fee market, transactions with higher fees gets prioritized by the miners. This leaves transactions with lower fees stuck in the mempool while waiting to be included in the next block. This means that there are times when your transaction may take hours or even days before it gets confirmed in the network. This does not mean your funds are lost forever, they are just stuck in limbo waiting to be processed by miners.

Summary

Due to the fee market and the limited block size of Bitcoin, users experience high transaction fees and long confirmation times. So the next time you want to send your coins from your personal wallet to an exchange, don’t be surprised if the fee is too high or if it takes hours or days before your confirmation gets confirmed.  It will eventually get there, you just need to be patient.

Other Notes

If you want to check the average transaction fee (sats per byte), you can check this site.
If you want to check how many transactions are in limbo, you can check it here.
The higher the number in these sites, the higher the transaction fee and the longer confirmation time will be needed for your transaction to get confirmed.

Bitcoin: Concepts and Terms

Bitcoin ATH

Reaching a record high of 11200USD+ yesterday after just reaching 10000USD the other day, Bitcoin is gaining more and more attention. Most cryptotraders, miners and enthusiasts alike will notice that more and more people are talking about Bitcoin and cryptocurrency. Whenever Bitcoin reaches a new all-time-high, a bunch of new users are pulled in by the hype and try to put in as much money as they can into Bitcoin. This sometimes results to people asking why their transactions fees in Bitcoin are way too high and why it’s taking a long time for their transaction to push through.

I gave a very brief background of what bitcoin is in one of my posts. If you haven’t read the bitcoin white paper, I highly suggest that you do. If you don’t have the time, I’ll try to simplify some of the concepts about it which we will later on need in order for us to understand why transaction fees and confirmation times are sometimes long and expensive. However, before that, we must familiarize ourselves with some basic concepts in Bitcoin and the blockchain technology.

Transactions

Let’s start with a very basic concept of transaction.  The wiki defines a transaction as “a transfer of Bitcoin value that is broadcast to the network and collected into blocks”. To put it simply, a buy or a sell is a transaction. Whenever you buy bitcoins from Coinbase , or sell your Bitcoins in Bittrex, those activities are all considered as transactions. You gain or lose Bitcoin and that gain or loss is then recorded in a block. A transaction also contains inputs and outputs but more on that later.

Blocks

As mentioned earlier, transactions are all collected into blocks. So what is a block? A block basically is a container of transactions. This is where all transactions are permanently recorded. You can think of a block as a ledger where you note down whom you paid and who paid you. Whenever you make a transactio, it will eventually be saved in a block and later on, stored in the blockchain.

Blockchain

You might be hearing the term blockchain recently because of the success of Bitcoin. We already know what a transaction and what a block is. Now it’s time for us to discuss what a blockchain is. A blockchain literally is just a chain of blocks. What makes the blockchain technology great is the fact that since all transactions are recorded in a block and a block is later on added to the blockchain, all historical transactions starting from the genesis block (the very first block mined) up until the latest transaction are visible to everyone.

There are more technical aspects behind the blockchain but we won’t discuss it for now. You just need to understand that a blockchain is a collection of blocks where ALL transactions in the Bitcoin network is stored. From the first transaction of Satoshi Nakamoto to Hal Finney, the 10,000 BTC worth of pizza bought way back, up until the recent Bitcoin purchased/sold, all of them are stored in the blockchain.

Miners

I mentioned above that a blockchain is a collection of linked blocks where all our transaction are saved. However, have you thought how blocks are created and who maintains the blockchain? Nodes, most specifically minding nodes or what we commonly call Miners are responsible for all of these. All miners have a copy of the entire blockchain in their nodes. So as not to complicate things, you can think of a node as just a computer used by a miner. It’s the responsibility of the miners to secure the Bitcoin network.

They do this by constantly validating blocks added in the network and make sure that those blocks are valid. They are also responsible for creating blocks that will be added in the blockchain. Whenever there are set of transactions done in the Bitcoin network, miners compete with each other to find what is known as a hash. Currently a miner who successfully solves a block is rewarded 12.5 Bitcoins. This cycle of finding a block and adding them to the blockchain usually takes on average 10 minutes. This means there are roughly 6 blocks added to the blockchain every hour.

These terms and concepts have much more depth in them and I barely scratched the surface with what I’ve explained. It’s important to understand these concepts before proceeding to our next topic which we will discuss in my next post.

Cryptocurrency and Bitcoin

This will be an introductory post for a series of posts that I’ll be writing about cryptocurrency and bitcoin. Today, I’ll be discussing about what bitcoin is and how to get started using bitcoin.

Before discussing what Bitcoin is, I suggest you to read this post by /u/hodlgentlemen in reddit where he lists a somewhat historical progression of how Bitcoin came about.

What is Bitcoin

So what is Bitcoin? Bitcoin is the first decenteralized digital currency. You can use it to instantly transfer money (well used to, but more on that later) to anyone in the world. Unlike the currency we have now which is mostly controlled by the banks or the government, Bitcoin is an open network managed by its users. The video below by weusecoins perfectly summarizes what bitcoin is and how it works.

The Genesis block, which kicked off the Bitcoin network started last January 3, 2009.  Six days later, Satoshi Nakamoto, the developer of the Bitcoin protocol, made the source code available to the public. On October 5, 2009, just a few months after its creation, Bitcoin was sold at 1,309 BTC per US$1.00. After almost 8 years, Bitcoin reached its All Time High amounting to ~US$4,600.00. As of writing, Bitcoin is currently being traded at 1 BTC = ~US$4000.00.

As Bitcoin price rises, more and more folks are starting to take notice of it and other cryptocurrency. There are lots of things to know and understand about Bitcoin and Cryptocurrency. I’ll try to help you ease in to Bitcoin by helping you get started on setting up your first wallet and buying your first Bitcoin.

Getting Started

So how do I start using Bitcoin? Before you can start purchasing Bitcoins, it is important to first have a Bitcoin wallet address. Your Bitcoin wallet address is like your bank account number which people can use to send you Bitcoins. There are multiple wallets available depending on what platform you want to use. If you will be using your personal computer or laptop to store your wallet, I recommend installing Electrum and/or Exodus. For mobile, I personally use Jaxx and Bread Wallet. There are also Bitcoin wallets online which you can use like Blockchain.info and Coins.ph. Feel free to check the posts below on how to setup these different wallets.

  • Electrum(requirement: Laptop/PC)
  • Jaxx (requirement: Smartphone)
  • Blockchain.info (requirement: Browser) –soon
  • Coins.ph (requirement: Smartphone or Browser) –soon

Yay! I now have a Bitcoin Wallet. Now what?

After successfully setting up your very first Bitcoin wallet by following one of the posts above, you can now start purchasing Bitcoins.My friends and some people I know tend to think that it’s too late to buy Bitcoins because of its high price. Many people also think that they need to purchase one whole Bitcoin in order to participate in the cryptocurrency market.

One of Bitcoin’s many and useful characteristic is that it is easily divisible. The smallest unit of Bitcoin is called a Satoshi or Sat  in honor of its creator Satoshi Nakamoto. 1 Satoshi is equivalent to 0.00000001 BTC or one hundred millionth of a Bitcoin! Some folks also use mBTC (0.001 BTC) or millibitcoin which is one thousand of a Bitcoin. Because of this characteristic of Bitcoin, you don’t have to buy an entire Bitcoin. You can own 0.1 BTC or even 0.00001 BTC!

So how do you buy Bitcoins? There are many options in buying Bitcoins depending on where you are in the world and what payment method you want to use. You can purchase Bitcoins via wire transfer/cash, credit card and other altcoins. Feel free to check the posts below on how to purchase Bitcoins using different methods.

  • Coinbase (payment method: Credit Card/Wire Transfer) –soon
  • Coins.ph (payment method: Over the counter/Wire Transfer/Cash)
  • Coinmama/CEX.IO (payment method: Credit Card) –soon
  • Bittrex (payment method: Altcoins) — soon

What’s next?

Now that you have setup your wallet and have purchased your own bitcoins, what’s next? There are other cryptocurrency that is already competing with Bitcoin. One popular alternative is Ethereum which I’ll be writing about in the next few weeks. For now, you can start reading up about the blockchain technology and other cryptocurrencies. In my next posts I’ll be talking about how you can earn money by investing in Cryptocurrency thru different methods. I’ll be discussing mining, trading and holding. Their pros and cons and how to get started on each of those methods.