Post
Topic
Board Development & Technical Discussion
Re: Is the 21 million bitcoin limit unchangeable?
by
Sunny King
on 22/03/2013, 03:03:29 UTC
21000000 * COIN is the theoretical upperbound of bitcoin's entire money supply. Of course no one account or transaction can have more than that number, so it is used to check that a given money value is within the valid range.

To understand how this limit came about, you need to understand the function GetBlockValue() that give rise to the upperbound of 21M * COIN: MAX_MONEY = 2 * 210000 * 50 * COIN

Code:
int64 static GetBlockValue(int nHeight, int64 nFees)
{
    int64 nSubsidy = 50 * COIN;

    // Subsidy is cut in half every 210000 blocks, which will occur approximately every 4 years
    nSubsidy >>= (nHeight / 210000);

    return nSubsidy + nFees;
}