Bitcoin Forum
April 24, 2024, 02:30:19 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Changing Max Supply after released  (Read 248 times)
MarkLenner (OP)
Newbie
*
Offline Offline

Activity: 11
Merit: 0


View Profile
March 29, 2018, 01:18:25 PM
 #1

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
1713925819
Hero Member
*
Offline Offline

Posts: 1713925819

View Profile Personal Message (Offline)

Ignore
1713925819
Reply with quote  #2

1713925819
Report to moderator
1713925819
Hero Member
*
Offline Offline

Posts: 1713925819

View Profile Personal Message (Offline)

Ignore
1713925819
Reply with quote  #2

1713925819
Report to moderator
1713925819
Hero Member
*
Offline Offline

Posts: 1713925819

View Profile Personal Message (Offline)

Ignore
1713925819
Reply with quote  #2

1713925819
Report to moderator
"There should not be any signed int. If you've found a signed int somewhere, please tell me (within the next 25 years please) and I'll change it to unsigned int." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713925819
Hero Member
*
Offline Offline

Posts: 1713925819

View Profile Personal Message (Offline)

Ignore
1713925819
Reply with quote  #2

1713925819
Report to moderator
1713925819
Hero Member
*
Offline Offline

Posts: 1713925819

View Profile Personal Message (Offline)

Ignore
1713925819
Reply with quote  #2

1713925819
Report to moderator
DannyHamilton
Legendary
*
Offline Offline

Activity: 3374
Merit: 4606



View Profile
March 29, 2018, 01:32:28 PM
Merited by ABCbits (1)
 #2

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.
MarkLenner (OP)
Newbie
*
Offline Offline

Activity: 11
Merit: 0


View Profile
March 29, 2018, 01:37:09 PM
 #3

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
Heisenberg_Hunter
Legendary
*
Offline Offline

Activity: 1583
Merit: 1276


Heisenberg Design Services


View Profile WWW
March 29, 2018, 01:45:07 PM
Merited by Choii (1), butka (1), Xynerise (1)
 #4

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.
MarkLenner (OP)
Newbie
*
Offline Offline

Activity: 11
Merit: 0


View Profile
March 29, 2018, 01:55:12 PM
 #5

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.
DannyHamilton
Legendary
*
Offline Offline

Activity: 3374
Merit: 4606



View Profile
March 29, 2018, 05:04:18 PM
Last edit: March 29, 2018, 07:15:36 PM by DannyHamilton
Merited by ABCbits (1)
 #6

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.

mentalny
Member
**
Offline Offline

Activity: 133
Merit: 10


View Profile WWW
March 29, 2018, 07:05:30 PM
 #7

Guys, I'm just curious - is it possible to change max supply by doing hard fork? I have never thought about it.

Xynerise
Sr. Member
****
Offline Offline

Activity: 322
Merit: 363

39twH4PSYgDSzU7sLnRoDfthR6gWYrrPoD


View Profile
March 29, 2018, 07:42:13 PM
 #8

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.
DannyHamilton
Legendary
*
Offline Offline

Activity: 3374
Merit: 4606



View Profile
March 29, 2018, 07:55:56 PM
 #9

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.
MarkLenner (OP)
Newbie
*
Offline Offline

Activity: 11
Merit: 0


View Profile
March 30, 2018, 12:53:23 PM
 #10

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)
cellard
Legendary
*
Offline Offline

Activity: 1372
Merit: 1250


View Profile
March 30, 2018, 02:56:26 PM
 #11

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?
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!