The Economics of Transaction Fees
Transaction fees have been dropping recently and have caused all manner of speculation about what is going on. In this article, I seek to examine what has been going on and what may have changed.
Why Fees are High
Transactions get into blocks, generally by offering higher fees than others. That is, there is a market for transaction inclusion in Bitcoin. This is called a fee market. The Transactions represent demand and block space represents supply. Scaling solutions like larger blocks or Segwit are directly trying to address the fact that the current fee market has a lot of demand.
What’s more, transactions that are larger have to pay more as there is a 1MB limit to each block. a 1000 byte transaction would have to pay double what a 500 byte transaction has to pay. The size of the transaction is a function of the inputs and outputs, which we’ll need to know more about later.
Fees in general are high when there are many competing transactions. The competing transactions in Bitcoin are stored in what’s called the mempool. This is where transactions that haven’t been put into a block go. What’s interesting is that the mempool has significantly shrunk over the same time frame:
This means that the demand for transactions has reduced, but the supply remained the same (essentially fixed for the duration at 1 MB per 10 minutes). This would explain why fees have reduced recently.
The question then is why is the mempool reducing? To answer this question, we have to know a bit more about how Bitcoin works.
UTXOs, if you’re unfamiliar, are unspent transaction outputs. In Bitcoin, they are like coins or bills in traditional currency except that they can represent any amount of bitcoin. For example, dollar bills only come in denominations of 1, 2, 5, 10, 20, 50 and 100. Bitcoins, on the other hand can come in any denomination, for example, 0.001473 BTC or 1047.7483 BTC. Essentially, when anyone creates a new transaction, they are both destroying old bills of various denominations (called the “inputs”) and creating new bills of other denominations (called the “outputs”).
We can create more UTXOs if we have more outputs than inputs. For example, if I have an input that’s 2 BTC and want to send 0.5 BTC to someone (perhaps an exchange or a merchant), I would spend the 2 BTC “bill” and split it into two bills, 0.5 BTC and 1.5 BTC, with the first going to the person I’m sending it to and the second going to myself. Note this doesn’t account for transaction fees, but basically that’s how Bitcoin transactions work. We’ve spent 1 input but created 2 outputs, essentially creating a net of 1 UTXO.
We can reduce UTXOs in the system if we have more inputs than outputs. For example, if I have 3 inputs, 0.2 BTC, 0.3 BTC and 0.4 BTC and want to send 0.8 BTC to someone, I would be spending 3 inputs and split it into two outputs, 0.8 BTC and 0.1 BTC, with the first going to the person I’m sending it to. Again, this doesn’t account for tx fees, but I’ve essentially reduced the total number of UTXOs in the system by 1 UTXO.
Throughout Bitcoin’s history, we have generally had more transactions of the first type than the second. That is, we’ve had more transactions that create new UTXOs than reduce UTXOs. As a result, the total number of UTXOs on the system have been growing as you can see here:
What’s interesting is that more recently, since June 2017, UTXO sets have been actually been in a steady state on the system. That is, the number of UTXOs seem to be holding steady, maybe going down a bit. There are all manner of speculations on why this is the case, but suffice it to say something has changed.
What’s more, this coincides with a reduction in transaction fees:
This is not a coincidence. As stated earlier, transaction size has to be proportional with the fees getting paid. A 1000-byte transaction has to pay twice a 500-byte transaction’s fees and half a 2000-byte transaction’s fees. Having fewer UTXOs in the system means that generally, transactions will be smaller. That is, since there are fewer UTXOs being created, transactions will trend towards a smaller size. This makes more room in blocks causing less demand. This may explain why transaction fees are getting smaller.
This then brings up another question. Why is the UTXO set in a steady state?
Steady state UTXOs
This part is mostly speculation, but still interesting to consider. We know that large parts of the Bitcoin transaction volume is dominated by a few players (various merchants and exchanges, basically). They probably considered the fact that UTXOs with very little value aren’t economical and thus started combining more inputs and producing fewer outputs. Even a few major players making such a change would essentially eliminate a lot of the UTXO creation.
Note there are many other factors that I’m not including here, like off-chain transactions and the like, but in general, this looks like the market at work. Companies have responded to market conditions that have in turn caused fees to drop.