Bitcoin Forum

Bitcoin => Bitcoin Discussion => Topic started by: KonstantinosM on May 13, 2021, 05:23:06 PM



Title: "Satoshi set the total supply of bitcoins to 21 Million" is nonsense
Post by: KonstantinosM on May 13, 2021, 05:23:06 PM
You hear it in every video of someone explaining Bitcoin. Isn't it more accurate to say that the reward will keep halving so that there will never be more than 21 million bitcoins?

There has to be a better way to put it. But from my understanding there is no direct rule within bitcoin's code/protocols that limits bitcoins to 21 Million other than the mathematical rules that govern the mining reward.

It bothers me to hear this over and over to be honest.


Title: Re: "Satoshi set the total supply of bitcoins to 21 Million" is nonsense
Post by: hatshepsut93 on May 13, 2021, 05:28:41 PM
That rule is enough, if no more than 21 million bitcoins can be created, then the maximum supply is 21 million. Bitcoin is not like gold that can be found on asteroids or other planets, mining is the only possible source of new coins. It would be redundant to keep track of existing supply with every new block, Satoshi did not implement it, because it would be a waste of space and processing power.


Title: Re: "Satoshi set the total supply of bitcoins to 21 Million" is nonsense
Post by: BlackHatCoiner on May 13, 2021, 05:37:31 PM
There has to be a better way to put it. But from my understanding there is no direct rule within bitcoin's code/protocols that limits bitcoins to 21 Million other than the mathematical rules that govern the mining reward.

I don't want to be pedantic, but there is a line that limits the units to 21,000,000 on amount.h (https://github.com/bitcoin/bitcoin/blob/b34bf2b42caaee7c8714c1229e877128916d914a/src/amount.h#L25):
Code:
static const CAmount MAX_MONEY = 21000000 * COIN;

I get your point, but that static constant does limit the maximum number of coins. It isn't just the mathematical rules of the block reward that restricts it, but that variable too. If you fork Bitcoin Core, and create your own altcoin that will have more than 21M coins, you should also change that line.

It bothers me to hear this over and over to be honest.
It doesn't bother me, personally. They say that there will be. It doesn't matter that much if you understand the nature of it and its deflationary chart:



Title: Re: "Satoshi set the total supply of bitcoins to 21 Million" is nonsense
Post by: jrrsparkles on May 13, 2021, 05:43:02 PM
You hear it in every video of someone explaining Bitcoin. Isn't it more accurate to say that the reward will keep halving so that there will never be more than 21 million bitcoins?

There has to be a better way to put it. But from my understanding there is no direct rule within bitcoin's code/protocols that limits bitcoins to 21 Million other than the mathematical rules that govern the mining reward.

It bothers me to hear this over and over to be honest.

The reward is havling for every certain period, not for the every block after it was mined so definitely its possible to mine the 21 million bitcoins which is expected to happen in 2140 by that time no one who are discussing about this will be alive.

Why only 21 million? Only satoshi knows the reason, probably it was his lucky number! ;)


Title: Re: "Satoshi set the total supply of bitcoins to 21 Million" is nonsense
Post by: Kabul on May 13, 2021, 06:28:37 PM
Rules are necessary and those rules are enough to maintain the bitcoin network. Without any rule, there will only be chaos. Look at fiat, government keeps printing money making the inflation rate increase significantly over years. Being capped at 21mil makes bitcoin become stronger, invulnerable from the inflation (actually, there is only deflation in bitcoin)


Title: Re: "Satoshi set the total supply of bitcoins to 21 Million" is nonsense
Post by: odolvlobo on May 13, 2021, 06:43:35 PM
You hear it in every video of someone explaining Bitcoin. Isn't it more accurate to say that the reward will keep halving so that there will never be more than 21 million bitcoins?

Sure. That is more accurate, but "'Satoshi set the total supply of bitcoins to 21 Million' is nonsense" is hyperbole. Or as expressed in your terms, your title is nonsense.



... there is a line that limits the units to 21,000,000 on amount.h (https://github.com/bitcoin/bitcoin/blob/b34bf2b42caaee7c8714c1229e877128916d914a/src/amount.h#L25):
Code:
static const CAmount MAX_MONEY = 21000000 * COIN;

That constant is used only for validation. It is not used to limit the number of coins. You overlooked the comment that immediately precedes the line you quoted:

Code:
/** No amount larger than this (in satoshi) is valid.
 *
 * Note that this constant is *not* the total money supply, which in Bitcoin
 * currently happens to be less than 21,000,000 BTC for various reasons, but
 * rather a sanity check. As this sanity check is used by consensus-critical
 * validation code, the exact value of the MAX_MONEY constant is consensus
 * critical; in unusual circumstances like a(nother) overflow bug that allowed
 * for the creation of coins out of thin air modification could lead to a fork.
 * */
static const CAmount MAX_MONEY = 21000000 * COIN;



Title: Re: "Satoshi set the total supply of bitcoins to 21 Million" is nonsense
Post by: Streets 2.0 on May 13, 2021, 07:04:52 PM
It is still so far to reach this quantitative level that I see no reason to even think in this direction. Let's first live up to this post empirically check whether it is or not. Why do you need to guess? Over this period of time, a lot can still change, for example, what to do with those "lost" bitcoins that have been resting on wallets from the beginning of the mining process itself, when a lot was mined and the attitude was like garbage or a toy that is not valued.


Title: Re: "Satoshi set the total supply of bitcoins to 21 Million" is nonsense
Post by: BlackHatCoiner on May 13, 2021, 07:28:20 PM
That constant is used only for validation. It is not used to limit the number of coins. You overlooked the comment that immediately precedes the line you quoted:

But, if it's used for validation, doesn't it also limit it too? If you change the block reward and leave that field same, will you be able to bypass the 21 million?


Title: Re: "Satoshi set the total supply of bitcoins to 21 Million" is nonsense
Post by: ReiMomo on May 13, 2021, 08:04:28 PM
If you’re gonna be checking Bitcoin’s Source code, you will see that the limit has been set up properly and smoothly.
Variable has been set up to the point that everyone can see the maximum amount. Good thing is that Bitcoin is open-source, transparency is too much to be grateful for and feel assured.

I guess you should try to check it yourself. Here are the links you might check you wouldn’t be confused with Bitcoins technical structure below.

https://www.youtube.com/watch?v=VyixWPMbRXI

https://bitcoin.stackexchange.com/questions/41692/how-to-understand-bitcoin-source-code

Hope this helps.


Title: Re: "Satoshi set the total supply of bitcoins to 21 Million" is nonsense
Post by: odolvlobo on May 13, 2021, 08:07:10 PM
That constant is used only for validation. It is not used to limit the number of coins. You overlooked the comment that immediately precedes the line you quoted:
But, if it's used for validation, doesn't it also limit it too? If you change the block reward and leave that field same, will you be able to bypass the 21 million?

It's uses don't affect the limit.  If the limit were increased, its use for validation might be impacted, certain valid transactions might be rejected, and certain tests would be invalidated.

Note also that the actual limit is not (and has never been) exactly 21 million.


Title: Re: "Satoshi set the total supply of bitcoins to 21 Million" is nonsense
Post by: Ryker1 on May 13, 2021, 08:15:22 PM
Well for me, I actually have the same idea before I checked and researched further about bitcoin, --I thought that mining was easy and halving has been set up to attract them to solve mathematical problems but still control the supply. I thought it is the miners who would decide the maximum supply of bitcoin, but then I found out that bitcoin has been created to only have a maximum of 21 million coins. And I really find it fascinating how they did it. Like I think if programming was existing during before fiat has been created? I wonder if this has been applied to it, I think people would have a better experience with the centralized currency. Imagine setting up a maximum supply so the ecosystem has to make sure that the currency is circulating? What a wonderful economy it would be.


Title: Re: "Satoshi set the total supply of bitcoins to 21 Million" is nonsense
Post by: gmaxwell on May 14, 2021, 05:59:16 AM
I don't want to be pedantic, but there is a line that limits the units to 21,000,000 on amount.h (https://github.com/bitcoin/bitcoin/blob/b34bf2b42caaee7c8714c1229e877128916d914a/src/amount.h#L25):
Code:
static const CAmount MAX_MONEY = 21000000 * COIN;

I get your point, but that static constant does limit the maximum number of coins.
I want to be pedantic.  That line doesn't actually limit the maximum number of coins!

Only the halving of subsidy limits the maximum number of coins.

MAX_MONEY is used in various places to clamp transaction amounts. For example, a transaction can't pay an output more than MAX_MONEY coins (as that would just be impossible, so any number over MAX_MONEY is invalid).  This is just as odolvlobo says.

If you broke the halving but left MAX_MONEY in place the system could get more than 21m BTC, though you might trigger bugs and crashes if more than 21M got spent at once in a single transaction.

This is deep in the weeds and inconsequential,  but since we were already being pedantic we ought not be half-assed about it.  Only full-assed pedantry for me!

All that said, saying Satoshi set the limit to 21M BTC is accurate enough in my view.  I mean, if you want to get really detailed he pressed buttons that commanded logic gates by switching electrons ... and so on.  Shall we really say that Satoshi's mother set the limit by giving birth to Satoshi, or her mother by giving birth to her, or the limit was set when some ape that reached out and touched a black monolith giving birth to intelligent life and the inevitable creation of Bitcoin?   At some point you've got to approximate. Saying Satoshi set a specific limit gets the point across without getting into the weeds, unless the subsidy decline is actually relevant to your conversation. :P

Moreover, if you start talking about to newbies about rewards going down they often end up thinking mining becomes slower and slower and eventually blocks won't be created anymore.  Giving people too much detail often confuses them. :)


Title: Re: "Satoshi set the total supply of bitcoins to 21 Million" is nonsense
Post by: FatFork on May 14, 2021, 09:53:11 AM
As I understand it, the maximum number of coins is determined by the fact that halving occurs every 210,000 blocks and that mining rewards started at 50 BTC per block. Any change in either of these values would mean a different maximum number of coins. Since both of these parameters are hardcoded into the Bitcoin client by Satoshi, your argument from the title is invalid.

In approximately 120 years when the mining reward reaches 1 satoshi per block, we will have a coin supply of 209999999.99 BTC, which means we'll never actually reach the total supply of 21 million. My guess is that exactly this is why this value isn't defined anywhere in the source code as the maximum number of coins.


Title: Re: "Satoshi set the total supply of bitcoins to 21 Million" is nonsense
Post by: kryptqnick on May 14, 2021, 02:55:48 PM
Correct me if I'm wrong, but I was also thinking more in the line with what FatFork wrote. This whole halving thing means that there will be a division by two going essentially ad infinitum, just like in the Ancient Dichotomy paradox by Zeno. Unless, of course, some limit like 1 Satoshi (or more 'cause there are probably things I haven't taken into account here) finishes this process. At that point, however, it's possible that Satoshis will get divided into even smaller bits, I think, so when the amount will be reaching 21 million forever. Or does the point that we won't have precisely 21 million mean that this number can somehow be exceeded? In that case, the validation line in the code that was discussed above would become a problem, no?


Title: Re: "Satoshi set the total supply of bitcoins to 21 Million" is nonsense
Post by: Ucy on May 14, 2021, 03:07:12 PM
Interesting...
So I guess you could print more coin and used them outside of the mining rewards then... .Maybe print lot more specifically for Bitcoin price governance or price regulation. But you probably have to get the whole community agree to this, under the condition that the Bitcoin deflationary ideal won't be violated.

I like the idea of of having an Open/public "Price Governance Community" where coin supply can be controlled in a way that prevent extreme price volatility to the overall price. The community can both automatically & manually keep the price of Bitcoin  balanced/moderate long-term. When demand for Bitcoin is high, it sells to the public to prevent Bitcoin from going up to high. When demand is low, it buys back to reduce the overall supply and keep it from going down too much. A Cryptocurrency should be flexible enough to allow for this kind of changes (through public consensus) when it becomes necessary.



Title: Re: "Satoshi set the total supply of bitcoins to 21 Million" is nonsense
Post by: BlackHatCoiner on May 14, 2021, 03:55:42 PM
MAX_MONEY is used in various places to clamp transaction amounts. For example, a transaction can't pay an output more than MAX_MONEY coins (as that would just be impossible, so any number over MAX_MONEY is invalid).  This is just as odolvlobo says.
Yes, you're right, sorry. Judging the source code, it's only used to prevent another overflow incident. (just like in block 74638 (https://en.bitcoin.it/wiki/Value_overflow_incident)). Although, you do have to change it if you fork Bitcoin Core, otherwise you won't be able to create an output spending more than 21 million coins.

To put it simply, Bitcoin nodes don't sum all the bitcoins and check if there are more than 21 million. (This is how a newbie would think of it)

I don't know if MAX_MONEY is being used outside main.cpp (https://github.com/bitcoin/bitcoin/blob/d4c6b90ca3f9b47adb1b2724a0c3514f80635c84/main.cpp#L1011-L1016), but that's its only use in that file:
Code:
// Check for negative or overflow input values
            if (txPrev.vout[prevout.n].nValue < 0)
                return error("ConnectInputs() : txin.nValue negative");
            if (txPrev.vout[prevout.n].nValue > MAX_MONEY)
                return error("ConnectInputs() : txin.nValue too high");
            if (nValueIn > MAX_MONEY)
                return error("ConnectInputs() : txin total too high");

So I guess you could print more coin and used them outside of the mining rewards then... .Maybe print lot more specifically for Bitcoin price governance or price regulation. But you probably have to get the whole community agree to this, under the condition that the Bitcoin deflationary ideal won't be violated.
Changes in the code may occur to upgrade the software, but the consensus rules will remain the same. There isn't anything to be agreed, if you don't believe they should be 21M, you can leave Bitcoin. If the majority of the people that run a node, believe that Bitcoin should have more than 21M coins, they're free to change the block rewards. They'll have to comprehend, though, that they'll instantly stop being the majority.

That, also, answers to the next part of your post, which IMO isn't made to be taken seriously.


Title: Re: "Satoshi set the total supply of bitcoins to 21 Million" is nonsense
Post by: midnightmagic on May 14, 2021, 07:48:43 PM
As I understand it, the maximum number of coins is determined by the fact that halving occurs every 210,000 blocks and that mining rewards started at 50 BTC per block. Any change in either of these values would mean a different maximum number of coins. Since both of these parameters are hardcoded into the Bitcoin client by Satoshi, your argument from the title is invalid.

In approximately 120 years when the mining reward reaches 1 satoshi per block, we will have a coin supply of 209999999.99 BTC, which means we'll never actually reach the total supply of 21 million. My guess is that exactly this is why this value isn't defined anywhere in the source code as the maximum number of coins.


No, incorrect.

https://bitcoin.stackexchange.com/questions/38994/will-there-be-21-million-bitcoins-eventually/38998 (https://bitcoin.stackexchange.com/questions/38994/will-there-be-21-million-bitcoins-eventually/38998)

This is the as-of-the-answer correct number of coins that there will eventually be.

So that hard figure it definitely wrong.

Sorry I did my things that made it forever wrong.


Title: Re: "Satoshi set the total supply of bitcoins to 21 Million" is nonsense
Post by: FatFork on May 14, 2021, 08:03:51 PM
As I understand it, the maximum number of coins is determined by the fact that halving occurs every 210,000 blocks and that mining rewards started at 50 BTC per block. Any change in either of these values would mean a different maximum number of coins. Since both of these parameters are hardcoded into the Bitcoin client by Satoshi, your argument from the title is invalid.

In approximately 120 years when the mining reward reaches 1 satoshi per block, we will have a coin supply of 209999999.99 BTC, which means we'll never actually reach the total supply of 21 million. My guess is that exactly this is why this value isn't defined anywhere in the source code as the maximum number of coins.


No, incorrect.
<cut>

Yes, thank you. I made a slight error in the calculation because I rounded to the eighth decimal place. The exact figure (after the 33rd halving) is 20999999.9769 BTC.


Title: Re: "Satoshi set the total supply of bitcoins to 21 Million" is nonsense
Post by: KonstantinosM on May 18, 2021, 04:02:55 AM
I didn't expect all the high quality posts. I stand by my words. What would make me happy is hearing how the subsidy halves every four years so there will never be more than 21 Million Bitcoins rather than Satoshi set the limit to 21 million.

If you're educating people about bitcoin, maybe have a cute little graph on how many bitcoins were mined in the first 4 year period before the first halving and show the math in a visual way and how it will never reach 21 Million.

Maybe the lesson we learned was the pedantry we engaged in along the way.


Title: Re: "Satoshi set the total supply of bitcoins to 21 Million" is nonsense
Post by: hazenyc on May 18, 2021, 09:17:24 AM
I didn't expect all the high quality posts. I stand by my words. What would make me happy is hearing how the subsidy halves every four years so there will never be more than 21 Million Bitcoins rather than Satoshi set the limit to 21 million.

If you're educating people about bitcoin, maybe have a cute little graph on how many bitcoins were mined in the first 4 year period before the first halving and show the math in a visual way and how it will never reach 21 Million.

Maybe the lesson we learned was the pedantry we engaged in along the way.

Your issue really seems to be just semantic. Satoshi decided by writing the code that there is a supply cap at 21 million Bitcoins. What exactly is the problem with that sentence? He put the code such that based on mathematics that cap of 21 million proves valid. Sure, if someone asks you how many Bitcoins there will be you should provide the mathematical explanation. If someone asks you why that is the case or why exactly that number was chosen, your answer should be "because Satoshi decided that way". He could have decided any other number. From an educational perspective the mathematical answer should be first choice, but it is Satoshi who ultimately chose that number.


Title: Re: "Satoshi set the total supply of bitcoins to 21 Million" is nonsense
Post by: BlackHatCoiner on May 18, 2021, 09:32:53 AM
What would make me happy is hearing how the subsidy halves every four years so there will never be more than 21 Million Bitcoins rather than Satoshi set the limit to 21 million.
Was that what you wanted? I thought you already knew about the mathematical rules that govern Bitcoin. Assuming that every 210,000 blocks a halving occurs then we have:
  • 10,500,000 coins in the first 210,000 blocks.
  • 5,250,000 coins in the next 210,000 blocks.
  • 2,125,000 coins in the next 210,000 blocks.

This goes on and on 'til the 31st halving that each block will reward 0.00000001 coins.

But why is it 4 years?

Because of the block interval. The network is structured in a way to always generate a block every 10 minutes on average. If you multiply 210000 with 10 minutes then you get 2.1 million minutes which is 35,000 hours or 1,458.3 days. Divide that with 365 and you'll get 3.995 years.


Title: Re: "Satoshi set the total supply of bitcoins to 21 Million" is nonsense
Post by: hd49728 on May 18, 2021, 09:34:07 AM
If you're educating people about bitcoin, maybe have a cute little graph on how many bitcoins were mined in the first 4 year period before the first halving and show the math in a visual way and how it will never reach 21 Million.
21 million is a rounded number. Is it a serious problem with 21 million  BTC and 209999999.99 BTC. It is not a serious issue but I agree with you that a note for it is fine.

The 21 million figure can be used with a note and reference to 209999999.99 BTC as total supply. I remembered this issue was discussed in the past.

I could be wrong, but I get the impression that he didn't choose 21 million.  He chose 50BTC as a block reward and then chose to cut that reward in half every 210,000 blocks.  If you do the math, that just happens to work out to a bit less than 21 million (20999999.97690000 to be exact).

4 years for each halving is another rounded figure. BlackHatCoiner explained it above.
https://www.bitcoinblockhalf.com/
Quote
Past halving event dates
The first halving event occurred on the 28th of November, 2012 (UTC) at block height 210,000
The second halving event occurred on the 9th of July, 2016 (UTC) at block height 420,000
The third halving event occurred on the 11th of May, 2020 (UTC) at block height 630,000


Title: Re: "Satoshi set the total supply of bitcoins to 21 Million" is nonsense
Post by: FatFork on May 18, 2021, 11:29:11 AM
If you're educating people about bitcoin, maybe have a cute little graph on how many bitcoins were mined in the first 4 year period before the first halving and show the math in a visual way and how it will never reach 21 Million.

You're just being sarcastic now.

Maybe the lesson we learned was the pedantry we engaged in along the way.

Yep.


Title: Re: "Satoshi set the total supply of bitcoins to 21 Million" is nonsense
Post by: buwaytress on May 18, 2021, 12:57:04 PM
Pedantry can get confusing for those not willing or not able (like me) to get full-assed about it.

I honestly don't know why it's a bother to say there is a limit of 21m that will ever be produced (as a consequence of halving), agree that there are more accurate ways to say it, but we would then have to go through almost every other way we refer to Bitcoin use and rephrase them... we could get really pedantic over how we're not really sending any actual Bitcoin when we spend them, for example (but really, that's accurate enough to say, isn't it?).


Title: Re: "Satoshi set the total supply of bitcoins to 21 Million" is nonsense
Post by: seoincorporation on May 18, 2021, 01:28:43 PM
the 21 million supply is a tricky number because if you focus on the digits after the point you will realize how big the number really is. For a reason satoshi decides to add 8 zeros after the point... and that makes the number much bigger than 21 millions.

If the bitcoin price goes really high, let's say 1 btc = $10millions then the miners can adjust the transaction fees to some satoshis. And that way we will only move satoshis for a good amount of money.