A piece of flying flower reduces the spring, and the wind blows thousands of petals, which makes people sad. Watch the flowers passing by your eyes, and don't be disgusted by the sadness of drinking too much wine.

In the crypto market in May, BTC (Bitcoin) was hesitant at $60,000, and the flowers were falling in spring. There was not much excitement, but strolling by the lake, looking at the green water and green mountains, the heart was peaceful, and the position was far-reaching.

BTC is the root of the crypto industry. The total upper limit of 21 million is the foundation of BTC. Everything starts from this magical number. But why is it such a number?

In short, it is this:

1. 50 BTC per block

2. Every 210,000 blocks, the output is halved

Using the sum of geometric progressions, it can be easily calculated that the final total output of BTC is: (50 + 25 + 12.5 + 6.25 + 3.125 + ...) x 210,000 = 21 million.

Furthermore, the difficulty of mining is adjusted so that a new block is generated approximately every 10 minutes, or 6 new blocks per hour. 210,000 blocks is approximately 4 years in the human world.

This is the origin of the four-year halving cycle of Bitcoin production.

However, this is just a retelling of established facts. First, it lacks some detailed examinations; second, it does not really reveal why Bitcoin inventor Satoshi Nakamoto chose and designed such a number.

Let’s talk about the details first.

First of all, 21 million is not 21 million, but 2,099,999,997,690,000. Yes, the latter number is 100 million times larger than 21 million, that is, about 2100 trillion. In the Bitcoin system, all integers are in the trillion level.

When we "display" BTC as 8 decimal places on this integer point, it becomes 2 0,99 9,99 9.97 690 000. Here I use spaces to indicate the thousandths division point when it is an integer. We can see at a glance that Satoshi's choice of 8 decimal places is actually a bit strange, because this will cause the comma division point of the 8-decimal BTC integer part to be inconsistent with the comma division point of the real integer in the system.

8 decimal places, that is, 1/100 million, this is not very Western. As we all know, English uses thousandths to divide numbers, so the units of counting are thousand, million, billion, trillion. There is no unit of "100 million" in English. The Chinese counting method is slightly different, and it is divided by 4 digits, that is, ten thousandths, so there are ten thousand, hundred million, trillion.

2100 trillion divided by ten thousandths is like this: 2099 9999 9769 0000; 21 million with 8 decimal places is like this: 2099 9999.9769 0000. It's 4 measures, 4 digits per measure, no confusion. So it looks like, 8 decimal places, 1 in 100 million, well, this is very oriental.

Secondly, the reason why 21 trillion is 2,099,999,997,690,000 instead of the exact 2,100,000,000,000,000 is precisely because of the precision limitation of 8 decimal places.

The geometric sequence (50 + 25 + 12.5 + 6.25 + 3.125 + ...) is not a truly infinite sequence. Instead, when it is reduced to 0.0000 0001, it returns to zero after being halved. Therefore, this is a truncated finite sequence, and its sum is less than the sum of the infinite sequence, 100. Therefore, after multiplying by 210,000, the final result is also slightly less than 21 million.

Third, please note the description in the first point, the 8 decimal places and decimal point are just a "display" design. There is only the trillion-level integer inside the system.

Since it is just for display, the decimal point can be moved anywhere. It is now at the 8th decimal place, and it can be at the 5th or 4th decimal place in the future.

For example, 20,999,999,976.90000 (5 decimal places), or 2099 9999 9769.0000 (4 decimal places).

Then, 1 Bitcoin with 8 decimal places will be displayed as 1000 when shifted to 5 decimal places, and 10000 when shifted to 4 decimal places. Correspondingly, the original 0.001 or 0.0001 BTC will now be displayed as 1.

This idea of ​​displacement was not invented by Wang Ge, but was Satoshi Nakamoto’s real idea. In his reply to Mike Hearn on April 12, 2009[1], Satoshi Nakamoto wrote:

"My choice for the number of coins and distribution schedule was an educated guess. It was a difficult choice, because once the network is going it's locked in and we're stuck with it. I wanted to pick something that would make prices similar to existing currencies, but without knowing the future, that's very hard. I ended up picking something in the middle. If Bitcoin remains a small niche, it'll be worth less per unit than existing currencies. If you imagine it being used for some fraction of world commerce, then there's only going to be 21 million coins for the whole world, so it would be worth much more per unit. Values are 64-bit integers with 8 decimal places, so 1 coin is represented internally as 100000000. There's plenty of granularity if typical prices become small. For example, if 0.001 is worth 1 Euro, then it might be easier to change where the decimal point is displayed, so if you had 1 Bitcoin it's now displayed as 1000, and 0.001 is displayed as 1."

"My choice of the number of coins and the release schedule was very deliberate. It was a hard choice because once the network is up and running it is locked in and we are stuck with it. I wanted to choose a value that would keep the price close to existing currencies, but without knowing the future it is hard to do. In the end I chose a value in the middle. If Bitcoin remains a niche currency then its unit value will be lower than existing currencies. If you imagine Bitcoin being used for some part of world commerce, there are only 21 million Bitcoins in the world so its unit value will be higher. The value is a 64-bit integer with 8 decimal places, so 1 coin is represented internally as 100000000. If typical prices get smaller, there is enough granularity. For example, if 0.001 is worth 1 Euro, it might be easier to change where the decimal point is displayed, so if you have 1 Bitcoin it is now displayed as 1000 while 0.001 is displayed as 1."

Some people say that for common 64-bit computers, if we use 64-bit binary numbers to represent both integers and decimals (also known as floating-point numbers), the safest approach is to limit integers to the upper limit that can be expressed by the integer part of the floating-point number.

Anyone who has a little knowledge of computer principles knows that there are no decimals inside the computer, only digits of 0 and 1. The so-called 64-bit integer refers to a binary integer composed of 64 0s or 1s. The corresponding decimal number is 2^64 = 18446744073709551616. This number is much larger than 2100 trillion. However, if the computer is to be able to process floating-point numbers, then a part of the 64 bits must be separated to express the decimal part, and 1 bit must be reserved to indicate the positive and negative signs. This became the IEEE 754 floating-point encoding standard. The standard defines that double-precision floating-point numbers are encoded in 64-bit binary as follows:

In this way, the integer part can only use 53 bits, that is, the maximum is no more than 2^53 = 9007199254740992. If you want to easily test whether the result is an integer, it is best not to exceed 2^51 = 2251799813685248. In this case, 22 (quadrillion) can be chosen, but 22 is not a "triangular number", so Satoshi Nakamoto chose 21 (quadrillion).

Based on this, many people believe that Satoshi Nakamoto chose 210 trillion, which greatly facilitates various programming languages ​​to handle calculations related to the number of Bitcoins.

However, after reading Satoshi’s email, Wang Ge felt that Satoshi might not have such a complicated idea. Or maybe he did think about it, but he did not fully explain his considerations. He just said that he had considered other numbers, such as 420 trillion, but felt that it was too large, so he compromised and settled on 210 trillion. In Satoshi’s email to Mike Hearn on January 10, 2011 [2], he wrote:

"It works out to an even 10 minutes per block:21000000 / (50 BTC 24hrs 365days 4years 2) = 5.99 blocks/hour"I fudged it to 364.58333 days/year. The halving of 50 BTC to 25 BTC is after 210000 blocks or around 3.9954 years, which is approximate anyway based on the retargeting mechanism's best effort."I thought about 100 BTC and 42 million, but 42 million seemed high."I wanted typical amounts to be in a familiar range. If you're tossing around 100000 units, it doesn't feel scarce. The brain is better able to work with numbers from 0.01 to 1000."If it gets really big, the decimal can move two places and cents become the new coins."

“That gives an average time of 10 minutes per block: 21,000,000 / (50 BTC 24 hours 365 days 4 years 2) = 5.99 blocks/hour “I revised it to 364.58333 days/year. The halving of 50 BTC to 25 BTC is after 210,000 blocks, or about 3.9954 years. “I thought about 100 BTC and 42 million, but 42 million seemed too high. “I want typical amounts to be in a familiar range. If you’re tossing around 100,000 units, it won’t feel scarce. The brain can handle numbers between 0.01 and 1,000 better. “If the number is really big, the decimal point moves two places and ‘cents’ become a new coin.”

It seems that Satoshi Nakamoto first determined the time parameters, and then adjusted the block output and total amount, and thought about what number would be more appropriate.

According to Satoshi Nakamoto, the amount of BTC that most people hold should be between 0.01 and 1000. Don’t try to get a 6- or 7-digit coin, as that will lack a sense of scarcity.

The above is the background of the total number of 21 million coins.