Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: MarkLenner on March 29, 2018, 01:18:25 PM



Title: Changing Max Supply after released
Post by: MarkLenner on March 29, 2018, 01:18:25 PM
Hi Folks,

one technical question: is it possible to change the Max Supply of a coin after the it was released and people started to mine it?

I ask you this because for a typo I inserted a zero too much in the definition of the constant MAX_MONEY

I wrote:

src/amount.h:static const CAmount MAX_MONEY = 650000000 * COIN;

instead of:

src/amount.h:static const CAmount MAX_MONEY = 65000000 * COIN;

Thanks your kind help


Title: Re: Changing Max Supply after released
Post by: DannyHamilton on March 29, 2018, 01:32:28 PM
Hi Folks,

one technical question: is it possible to change the Max Supply of a coin after the it was released and people started to mine it?

I ask you this because for a typo I inserted a zero too much in the definition of the constant MAX_MONEY

I wrote:

src/amount.h:static const CAmount MAX_MONEY = 650000000 * COIN;

instead of:

src/amount.h:static const CAmount MAX_MONEY = 65000000 * COIN;

Thanks your kind help

MAX_MONEY does not have any effect on the Maximum Supply of the coin.

The Maximum Supply is determined by the number of coins that are created with each block.

MAX_MONEY is just used for comparison to prevent overflow conditions in the code.


Title: Re: Changing Max Supply after released
Post by: MarkLenner on March 29, 2018, 01:37:09 PM
Hi Folks,

one technical question: is it possible to change the Max Supply of a coin after the it was released and people started to mine it?

I ask you this because for a typo I inserted a zero too much in the definition of the constant MAX_MONEY

I wrote:

src/amount.h:static const CAmount MAX_MONEY = 650000000 * COIN;

instead of:

src/amount.h:static const CAmount MAX_MONEY = 65000000 * COIN;

Thanks your kind help

MAX_MONEY does not have any effect on the Maximum Supply of the coin.

The Maximum Supply is determined by the number of coins that are created with each block.

MAX_MONEY is just used for comparison to prevent overflow conditions in the code.

ok thanks. So how to calculate the Max Supply? For example I see BTC has 21,000,000. How be sure mine will be 65,000,000? I use 50 coins per block with halving every 4 years like bitcoin does


Title: Re: Changing Max Supply after released
Post by: Heisenberg_Hunter on March 29, 2018, 01:45:07 PM
ok thanks. So how to calculate the Max Supply? For example I see BTC has 21,000,000. How be sure mine will be 65,000,000? I use 50 coins per block with halving every 4 years like bitcoin does


I think my reply in other thread will help you out with this issue.

No, I think you might be wrong in understanding the Max_Money variable. Max_Money is rather a sanity check and not the total money supply which when said in bitcoin is less than 21,000,000. This Max_Money constant is used to prevent people from doing a transaction not more than 21,000,000. For example if there happens to be a overflow bug within the network that happens to create a coin out of simple modification leads to a fork.

The total supply of btc will always be less than 21,000,000.

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

Which means when the first 210000 blocks are created, the mining rewards were 50btc, and the next 210,000 blocks the reward is cut in half to 25 btc and the next 210000 blocks the reward is cut in half to 12.5 btc. This process continues till the total coins are mined out which will be equal to 20999999.9769btc which is approximately equal to 21 million.


Title: Re: Changing Max Supply after released
Post by: MarkLenner on March 29, 2018, 01:55:12 PM
Thank you very much!!!

This I don't have problem with this beacuse:

src/chainparams.cpp:        consensus.nSubsidyHalvingInterval = 650000;

I just need to change MAX_MONEY to prevent overflow conditions.


Title: Re: Changing Max Supply after released
Post by: DannyHamilton on March 29, 2018, 05:04:18 PM
So how to calculate the Max Supply? For example I see BTC has 21,000,000. How be sure mine will be 65,000,000? I use 50 coins per block with halving every 4 years like bitcoin does

It is calculated with maths.

For example, if you have a block subsidy of 10 coins, and you reduce it by 1 coin every block, then you will have a total supply of:
10 + 9 + 8 + 7 + 6 + 5 + 4 + 3 + 2 + 1 = 44 coins.

How frequent are your blocks?
What is your starting subsidy?
When do you reduce the subsidy?
How much do you reduce it by?

And the most important question...
Why are you creating a coin if you don't know what you are doing?  That sounds like a really good way to create something that is full of vulnerabilities and likely to be a complete disaster.



Title: Re: Changing Max Supply after released
Post by: mentalny on March 29, 2018, 07:05:30 PM
Guys, I'm just curious - is it possible to change max supply by doing hard fork? I have never thought about it.


Title: Re: Changing Max Supply after released
Post by: Xynerise on March 29, 2018, 07:42:13 PM
Guys, I'm just curious - is it possible to change max supply by doing hard fork? I have never thought about it.
You can change the block subsidy -- so a smaller number of coins are being emitted with every block -- and increase the block halving to control inflation.
This of course doesn't change the amount of coins already available, just the ones that would be produced.


Title: Re: Changing Max Supply after released
Post by: DannyHamilton on March 29, 2018, 07:55:56 PM
Guys, I'm just curious - is it possible to change max supply by doing hard fork? I have never thought about it.

It is possible to force a REDUCTION in the max supply with a SOFT fork.

You would only need a HARD fork if you want to INCREASE the max supply.

Note that ANY solo miner or ANY mining pool can PERMANENTLY reduce the max supply on their own without ANY fork at all by solving a block and simply not paying themselves the block reward. If they do that, then the 12.5 BTC that they didn't take as a reward will never be mined.  The total maximum will permanently be reduced by at least the value of the block reward.  (This has already happened with Bitcoin in the past when the reward was 50 BTC, which is part of why Bitcoin will never actually reach 21 million)

Furthermore, if they also choose not to take the transaction fees that they are allowed to take, then those transaction fees will be permanently removed from the blockchain and will reduce permanently reduce the total amount of bitcoins that exist on the blockchain.

A fork is only necessary if you want to FORCE all miners to reduce the supply.


Title: Re: Changing Max Supply after released
Post by: MarkLenner on March 30, 2018, 12:53:23 PM
So how to calculate the Max Supply? For example I see BTC has 21,000,000. How be sure mine will be 65,000,000? I use 50 coins per block with halving every 4 years like bitcoin does

It is calculated with maths.

For example, if you have a block subsidy of 10 coins, and you reduce it by 1 coin every block, then you will have a total supply of:
10 + 9 + 8 + 7 + 6 + 5 + 4 + 3 + 2 + 1 = 44 coins.

How frequent are your blocks?
What is your starting subsidy?
When do you reduce the subsidy?
How much do you reduce it by?

And the most important question...
Why are you creating a coin if you don't know what you are doing?  That sounds like a really good way to create something that is full of vulnerabilities and likely to be a complete disaster.





Thanks a lot

Don't worry, the project is not really a "coin" for trading. It's an internal project on my company based on bitcoin blockchain released to our internal users. (I can not tell more sorry)


Title: Re: Changing Max Supply after released
Post by: cellard on March 30, 2018, 02:56:26 PM
Consider that most people buy cryptocurrencies for the speculative factor/as a store of value rather than to transact with it for good and services, since most people can do that just fine with fiat in the developed world, so changing the total supply would be a disaster for investors.

It seems you want to do some sort of federated blockchain for an internal business tho, so that doesn't apply... still, I still don't see what the point of closed blockchains are... isn't mySQL doing the job good enough for these ends?