CAmount GetBlockSubsidy(int nHeight, const Consensus::Params& consensusParams)
{
    int halvings = nHeight / consensusParams.nSubsidyHalvingInterval;
    // Force block reward to zero when right shift is undefined.
    if (halvings >= 64)
        return 0;

    CAmount nSubsidy = 50 * COIN;
    // Subsidy is cut in half every 210,000 blocks which will occur approximately every 4 years.
    nSubsidy >>= halvings;
    return nSubsidy;
}

Simple right?

In just a few days we will have the second bitcoin halving event. Often in bitcoin we forget that not everyone is elbow deep in code all day, not everyone has been 'with us' for years and while we may talk about things like 'The Halving' we probably don't do the best job at explaining exactly what it is, why it is, what happened last time and what might happen this time.

What is it?

For completeness, I will add the following line of code to the ones above;-

consensus.nSubsidyHalvingInterval = 210000;

What this code does is get the block subsidy (in bitcoins). The subsidy started out at 50 BTC (50 * COIN, where the coin is 100,000,000 satoshis) and halves that amount every 210,000 blocks (the consensus.nSubsidyHalvingInterval bit).

This subsidy is claimed by the miners of that particular block (plus a small amount of transaction fees) as payment for their work securing the bitcoin network. They use it to pay their bills (mostly electricity and updating hardware) and what is left over is their profit.

Since every block takes somewhere about 10 minutes because of the Poisson Process it works out to take approximately [1] 4 years for those 210,000 blocks to be generated, after which, the block subsidy halves. In reality, because the total hash rate has been increasing so quickly since Satoshi mined block 0 as more and more miners have come online with better and even more specialised hardware the blocks have been found in less than 10 minutes on average but for the purpose of this article, we are just going to call them 10-minute blocks and 4 years between halvings.

So, the subsidy started at 50 BTC on January 3rd, 2009, dropping to 25 BTC on November 28th, 2012 and it is about to drop to 12.5 BTC in a few days. The intention is that as the subsidy decreases the fees will take over paying the miners to secure the network.

This pattern will continue from now until the 64th halving (if (halvings >= 64) return 0;) but in practical terms it means that by 2140 there will be no block subsidy at all and the subsidy will (probably [2] ) be totally trivial well before that. Miners will, well before 2140, be relying totally on transaction fees (and that time is coming soon) in order to pay the bills and secure the bitcoin network.

Below is a table that lays it out from the beginning until 2024 so you can get a feel for the progression.

Block Year (Approx) BTC/block Start BTC BTC Added End BTC BTC Increase End BTC % of Limit
0 2009 50 0 10,500,000 10,500,000 infinite 50%
210000 2012 25 10,500,000 5,250,000 15,750,000 50% 75%
420000 2016 12.5 15,750,000 2,625,000 18,375,000 16.67% 87.5%
630000 2020 6.25 18,375,000 1,312,500 19,687,500 7.142857% 93.75%
840000 2024 3.125 19,687,500 656,250 20,343,750 3.33333333% 96.875%

Rough numbers only, 2016 where we are now in bold. Check out the bitcoin wiki for the full progression.

Why do we do it?

Right, now the semi-technical stuff is out of the way the obvious question is why do we do this?

The answer is a bit philosophical (sorry) but it is one of the core tenants of bitcoin, controlled supply.

Unlike the fiat currency's that we are all used to (USD, GBP, Euro, NZD etc.) we know exactly how many bitcoins will ever be in existence 20,999,999.9769 [3] . We also know exactly how many have been minted at any particular point in time.

This is not actually a new concept, proponents of the Austrian School of Economic Thought have been suggesting such a monetary system since the late 19th century. It separates money from the state similar to how the church was separated from the state in many countries over the past few centuries.

It puts the value (or price if you like) directly into the hands of supply and demand and takes it away from any form of governance. No matter how much any authority wants they cannot print more, artificially fix or adjust supply in any way in order to manipulate their own (and others) economies.

Supply and demand are kings in bitcoin and since supply is fixed, demand is the only variable and the only way the price of bitcoin is discovered.

Because bitcoin cannot be destroyed [3] but can be lost (please backup your wallets now) this also makes bitcoin a deflationary currency and that is a stark point of difference as to what we have now with our traditional fiat currencies. Not everyone agrees that a deflationary currency is a good thing, in fact, most traditional economists subscribe to Keynesian Economics and they most definitely don't see it as a good thing.

Satoshi never explained why he chose 21 million as the upper limit nor did he explain why he chose 4 years for each halving (at least not when I was around or have found later apart from some vague references to gold mines). Like a lot of numbers in bitcoin they appear to be just arbitrary, perhaps they have some deeper meaning to him but in reality, the numbers are unimportant, what is important is that they exist and the effect (controlled supply in a predictable manner) that they have.

What happened last time?

Not a lot.

I wrote a few articles at the time. The block was found on slush's pool by a relatively new user called Laughingbear using a GPU in a standard PC that he normally used to play games.

Bitcoin was going for USD $12.17 (at MtGOX) and there was a whopping 13.56295554 BTC of fees [4] in the block (USD $165). The entire block reward was 38.56295554 BTC, at the going rate of the time that was just short of USD $470 (Oh, how things have changed). It was almost a year before we had any serious price movement and it did not seem related to the halving at all.

The entire bitcoin market cap was just under USD $128 million compared to just over USD $10 billion today.

Speculation with the mainstream media (and more than a few bitcoiners) was that bitcoin would be over, after all, how could mining continue at such a low return?

The difficulty did a little dip before the halving but continued to grow, we knew at the time that the next generation cheaper and more efficient miners (ASIC's) were about to become generally available but we were still mining mostly with GPS's and FPGA's. If you had more than a few gigs of mining power you were considered a serious miner.

All and all, it was a bit of a non-event.

What will happen this time?

Who knows? I would caution you to treat anyone who tells you that they do with scepticism.

There are a few things to take into account though;-

  • Unlike last time there are no 'next generation' miners hitting the market. Last time we were making the transition from GPU/FPGA to dedicated ASIC's and while there are more efficiencies to be made to today's hardware it is nothing like the increases that were made from the transition to ACIC's 4 years ago.
  • Mining has scaled up so it is no longer a hobby that can be run to make a few coins.
  • Mining farms now are serious investments with serious ongoing costs.
  • The margin in mining is quite slim, there is/was no way to 'build in' the cost of the upcoming halving into your costs, certainly no way near the ~50% hit miners are about to take.
  • At the current bitcoin price the current hash rate is unsustainable.

Bitcoin has always and will always be venturing into uncharted waters. What comes next is far from certain and looking to the past at what happened last time, for this halving at least, does not help much past telling us that we don't actually know what the future holds.

Footnotes

[1]210,000 blocks * 10 minutes / (525,600 minutes in a standard year - 1440 for a leap day) = 4.00641025641 years. It is 'close enough' to 4 years.
[2]Who knows what a satoshi will be worth decades from now. There is also the chance that we may extend bitcoin beyond 8 decimal places.
[3](1, 2) Technically not true, there can be less. For example In Block 124724, a miner mined a solo block which underpaid the subsidy by a single Satoshi.
[4]13.56295554 BTC in fees was not normal for the time by the way, a lot of people paid larger than normal fees to get a transaction into that block.


Comments

comments powered by Disqus