# Why is the limit 21 million BTC?

How was the 21 million Bitcoin limit chosen ?

This limit doesn’t actually exist in the code that’s behind Bitcoin, but it’s a direct consequence of three built-in parameters of this crypto project.

- Satoshi Nakamoto established a 50-bitcoin reward for each mined block;
- This reward is cut in half every 210000 blocks;
- The indivisible minimum Bitcoin unit is 0.00000001 Bitcoin (which corresponds to 1 Satoshi).

So when Satoshi Nakamoto started to mine, blocks produced a 50-bitcoin reward for each block. After 210 thousand blocks (about 4 years later, since blocks are mined every 10 minutes on average – you can do the math to verify it) the reward per block was cut in half (25 bitcoins) and so on.

We can deduce that the total Bitcoin production can be written as: 50btc x 210000 + 50/2btc x 210000 + 50/4btc x 210000 etcetera.

If we factor out the common factor 50 x 210000 (which equals 10500000) from every term, we obtain: 10500000 (1+1/2+1/4+1/8+1/16+…).

The sum inside the parentheses, even if it went on towards infinity, could still be calculated and would equal 2 exactly, so the total amount of bitcoins that can be mined would be 10500000×2=21000000 (the well renowned 21 million).

We said however that the minimum Bitcoin unit is the Satoshi (0.00000001) and the sum in parentheses will never approach infinity as it will come to a halt when the last division by 2 results in a number that’s smaller than 0.00000001 (and this will happen approximately in 2140). For this reason the total amount of mined bitcoins won’t be exactly 21 million but should be 20999999.99755528.

But even this number isn’t totally exact because the floating-point representation of the total amount of bitcoins won’t allow that degree of precision for the decimal figures and the final number will actually be 20999999.9769.

**
Trivia #1**: The miner who inserted his own reward at block #124724 made a mistake and assigned himself a prize of 49.99999999 bitcoins instead of 50 btc (that is 1 satoshi less). That satoshi will never be mined because no miner can assign himself a higher reward than he’s supposed to.

**: The protocol requires that the 50 bitcoins at block 0 cannot be transferred. This means that these coins are practically non-existent in the blockchain. There are clearly a lot more that are blocked (the bitcoins belonging to those who have lost their private keys), but the bitcoins at block 0 don’t even have a key for anyone to be able to transfer them.**

Trivia #2

Trivia #2

**Mined bitcoins can’t be spent immediately. After their generation you need to wait at least 100 blocks (slightly more than 16 hours approximately). This limit has been established to avoid having to delete transactions of a possibly invalid block (for example in the case of a fork).**

Trivia #3:

Trivia #3:

## Lascia un commento