<blockquote>
<p>I see the max coin supply being 21.000.000 (million) under the variable called <code>MAX_MONEY</code>.</p>
</blockquote>
<p><code>MAX_MONEY</code> is not what controls the maximum coin supply. It is just a variable for use elsewhere that estimates the coin supply. The actual coin supply is regulated by the halving interval and the starting generation amount.</p>
<blockquote>
<p><code>CAmount COIN</code></p>
<p><code>CAmount CENT</code></p>
</blockquote>
<p>The base unit in Bitcoin is actually a satoshi, which is 1/100000000th of a Bitcoin. So <code>COIN</code> and <code>CENT</code> are used as multiplier values to convert units in Bitcoin (for <code>COIN</code>) and bitcent (1/100th of a Bitcoin) (for <code>CENT</code>) to the actual value that would be found in transactions which is in satoshis.</p>

CC BY-SA 3.0
2018-01-26T07:26:02.070Z
when I am forking the coin, where do I set a max coin limit then? Also when i first launch i want to be able to sell ICOs, meaning i want small amount of coins for myself, which code does it? where do I set wallet addresses for myself (devs), I want to learn all these @AndrewChow
Ahmed Can Unbay
CC BY-SA 3.0
2018-01-26T15:43:50.710Z
To change the coin limit, you need to change the subsidy halving interval here: https://github.com/bitcoin/bitcoin/blob/master/src/chainparams.cpp#L77 and change the initial subsidy value here: https://github.com/bitcoin/bitcoin/blob/master/src/validation.cpp#L1138. As for the other things you want, they are not part of Bitcoin Core so there isn't anything you can change to add those. You will need to figure out how to add them yourself.
Ava Chow
CC BY-SA 3.0
2018-01-25T16:48:36.970Z
2018-01-25T16:48:36.970Z
2020-06-16T11:10:03.350Z
Ava Chow
<p>I have question about the source code, under <code>src/amount.h</code> I see the max coin supply being 21.000.000 (million) under the variable called <code>MAX_MONEY</code>. I want to ask what other variables mean, </p>

<p><code>CAmount COIN</code></p>

<p><code>CAmount CENT</code></p>

<p>And I want to know how they're used. As an interest in forking coins, I am analyzing source code and I would like to see how these numbers affect the blockchain.</p>

<p>Here is the link.</p>

<p><a href="https://github.com/bitcoin/bitcoin/blob/master/src/amount.h" rel="nofollow noreferrer">https://github.com/bitcoin/bitcoin/blob/master/src/amount.h</a></p>

<bitcoin-core-development><open-source><source-code>
BTC Source code amount.h file
Ahmed Can Unbay
# BTC Source code amount.h file

(Asked by: username_0 on 2018-01-25)

I have question about the source code, under `src/amount.h` I see the max coin supply being 21.000.000 (million) under the variable called `MAX_MONEY`. I want to ask what other variables mean,

`CAmount COIN`

`CAmount CENT`

And I want to know how they're used. As an interest in forking coins, I am analyzing source code and I would like to see how these numbers affect the blockchain.

Here is the link.

<https://github.com/bitcoin/bitcoin/blob/master/src/amount.h>

**Tags:** bitcoin-core-development, open-source, source-code


---

## 1 answers

### Answer by username_1 on 2018-01-25. Score: 4 | Accepted answer

> I see the max coin supply being 21.000.000 (million) under the variable called `MAX_MONEY`.

`MAX_MONEY` is not what controls the maximum coin supply. It is just a variable for use elsewhere that estimates the coin supply. The actual coin supply is regulated by the halving interval and the starting generation amount.

> `CAmount COIN`
>
> `CAmount CENT`

The base unit in Bitcoin is actually a satoshi, which is 1/100000000th of a Bitcoin. So `COIN` and `CENT` are used as multiplier values to convert units in Bitcoin (for `COIN`) and bitcent (1/100th of a Bitcoin) (for `CENT`) to the actual value that would be found in transactions which is in satoshis.

> **Comments:**
> **username_0**: when I am forking the coin, where do I set a max coin limit then? Also when i first launch i want to be able to sell ICOs, meaning i want small amount of coins for myself, which code does it? where do I set wallet addresses for myself (devs), I want to learn all these @AndrewChow  
> **username_1**: To change the coin limit, you need to change the subsidy halving interval here: https://github.com/bitcoin/bitcoin/blob/master/src/chainparams.cpp#L77 and change the initial subsidy value here: https://github.com/bitcoin/bitcoin/blob/master/src/validation.cpp#L1138. As for the other things you want, they are not part of Bitcoin Core so there isn't anything you can change to add those. You will need to figure out how to add them yourself.  

---

