in Lepen coin provided github source code they mention total supply is 500 Million
MAX_MONEY is not “total supply” but a limit imposed
per transaction.
As evidenced in the code:
gjh@ashpool:/tmp$ git clone https://github.com/LePenCoin/LePenCoin.git
gjh@ashpool:/tmp$ grep -rn MAX_MONEY LePenCoin/
LePenCoin/src/bitcoinrpc.cpp:99: if (dAmount <= 0.0 || dAmount > MAX_MONEY)
LePenCoin/src/main.cpp:499: if (txout.nValue > MAX_MONEY)
LePenCoin/src/main.cpp:550: return MAX_MONEY;
LePenCoin/src/main.cpp:555: nMinFee = MAX_MONEY;
LePenCoin/src/main.h:42:static const int64_t MAX_MONEY = 500000000 * COIN;
LePenCoin/src/main.h:48:inline bool MoneyRange(int64_t nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }
LePenCoin/src/test/data/tx_invalid.json:39:["MAX_MONEY + 1 output"],
LePenCoin/src/test/data/tx_invalid.json:43:["MAX_MONEY output + 1 output"],
LePenCoin/src/test/data/tx_valid.json:54:["MAX_MONEY output"],
LePenCoin/src/test/data/tx_valid.json:58:["MAX_MONEY output + 0 output"],
The GetProofOfWorkReward routine determines the total number of coins emitted:
// miner's coin base reward
int64_t GetProofOfWorkReward(int64_t nFees)
{
int64_t nSubsidy = 1 * COIN;
if(pindexBest->nHeight < 10000)
{
nSubsidy = 100000 * COIN;
}
if (fDebug && GetBoolArg("-printcreation"))
printf("GetProofOfWorkReward() : create=%s nSubsidy=%"PRId64"\n", FormatMoney(nSubsidy).c_str(), nSubsidy);
return nSubsidy + nFees;
}
i.e. 1000 * 100000 = 100000000 (+ (1 * forever))
This accords with the value shown by the block explorer.
Cheers
Graham