Bitcoin Forum
May 04, 2024, 04:50:32 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: 42 and Descendents Have Unlimited Coin Supply Hardcoded [Fixed]  (Read 2741 times)
tx42 (OP)
Hero Member
*****
Offline Offline

Activity: 742
Merit: 500



View Profile
February 02, 2014, 06:45:39 AM
Last edit: June 15, 2014, 11:42:43 PM by tx42
 #1

42 Has Fixed This Problem

Introduction

With a market capitalization ranking of 61[1], the coin "42"[2] is advertised as the "Highest Priced Crypto Coin Ever"[3]. This high price is attributed to the coin's rarity, which is advertised to be limited to 42 total coins. Unfortunately, it looks like 42 coin and descendents thereof (like 8 coin) do not cap the money supply at the advertised number of coin. In fact, unlike most cryptocoins, the money supply of 42 appears to be unlimited.

Money Generation

In bitcoin and most descendents the money supply is capped algorithmically in the function that calculates the mining subsidy. This function is called GetBlockValue() in the source file "main.cpp". In the bitcoin code base, the source for this function is:

Code:
int64_t GetBlockValue(int nHeight, int64_t nFees)
{
    int64_t nSubsidy = 50 * COIN;

    // Subsidy is cut in half every 210,000 blocks which will occur approximately every 4 years.
    nSubsidy >>= (nHeight / Params().SubsidyHalvingInterval());

    return nSubsidy + nFees;
}

Here, the subsidy is halved for each "halving interval", measured in blocks (although the calculation is obfuscated somewhat for the sake of computational efficiency). It can be proven[4] that if all halving intervals are the same length (210,000), then the maximum amount of bitcoin ever produced will be

    21,000,000 = 2 * 50 * 210,000

42 (and probably several descendants, such as 8) uses a GetBlockValue() function like the following, taken from the 42 code base:

Code:
int64 static GetBlockValue(int nHeight, int64 nFees)
{
    int64 nSubsidy = 0.000042 * COIN;
    if(nHeight < 419)
    {
       nSubsidy = 0.0000001 * COIN;
}
    if(nHeight == 1)
    {
       nSubsidy = 0.42 * COIN;
}
    if(nHeight == 420) // yay its 420 :) Time for a smoke
    {
       nSubsidy = 0.00042 * COIN;
}
    if(nHeight == 4242)
    {
       nSubsidy = 0.00042 * COIN;
}
    if(nHeight == 42424)
    {
       nSubsidy = 0.00042 * COIN;
}
    if(nHeight == 424242)
    {
       nSubsidy = 0.00042 * COIN;
}
    if(nHeight == 4242424)
    {
       nSubsidy = 0.00042 * COIN;
}
    return nSubsidy + nFees;
}

Except in a few cases (blocks 1-420, 4242, 42424, ...) all blocks will have the same reward of 0.000042 coin (ignoring fees). Notice that the 42 version of GetBlockValue() has no halving interval and makes no attempt to curtail coin generation at the advertised maximum of 42 coin. Without a geometrically decreasing reward value, the money supply will grow indefinitely.

For 42, the advertised coin maximum of 42 coin will be produced before block 1,000,000 (42 / 0.000042), or in about 1.33 years. But the existing 42 code makes no provision to stop coin production at that time.

MAX_MONEY

One part of the code for most cryptocoins that may be confusing to developers is the MAX_MONEY constant in the source file called "main.h". MAX_MONEY has two uses in the 42 code: (1) as a sentinel return value (which won't be discussed) and (2) to check some transaction values to ensure that they make sense. For the latter purpose, MAX_MONEY is used in the inline function called MoneyRange() in the "main.h" file:

Code:
inline bool MoneyRange(int64 nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }

This function simply checks to ensure that a value is not negative and does not exceed MAX_MONEY. Nowhere in the 42 codebase is MAX_MONEY checked against a sum of the balances of all accounts, which would require the computationally expensive task of either (1) calculating every account balance in the block chain and then adding them up, or (2) summing the coinbase (money generating) transactions over all blocks. The running total of money supply is not explicitly kept in the block chain.

The MoneyRange() function is used a few times in the 42 code. An arbitrary example is checking the the sanity of a transaction, as in the CTransaction::CheckTransaction() function within "main.cpp":

Code:
if (!MoneyRange(nValueOut))
            return DoS(100, error("CTransaction::CheckTransaction() : txout total out of range"));

Nowhere in the code for 42 does is MoneyRange() used to validate the total money supply of 42.



Notes:

[1] http://coinmarketcap.com/
[2] My screen name, tx42, is unrelated to 42 coin.
[3] http://www.42coin.org/
[4] http://en.wikipedia.org/wiki/1/2_%2B_1/4_%2B_1/8_%2B_1/16_%2B_%E2%8B%AF


█    █     ██    ███     ███    ████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████     ███     ███    ██     █    █
..EARN FREE BREAKOUT COINS SIG CAMPAIGN LIVE !!
█    █     ██    ███     ███    ████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████     ███     ███    ██     █    █
1714841432
Hero Member
*
Offline Offline

Posts: 1714841432

View Profile Personal Message (Offline)

Ignore
1714841432
Reply with quote  #2

1714841432
Report to moderator
1714841432
Hero Member
*
Offline Offline

Posts: 1714841432

View Profile Personal Message (Offline)

Ignore
1714841432
Reply with quote  #2

1714841432
Report to moderator
1714841432
Hero Member
*
Offline Offline

Posts: 1714841432

View Profile Personal Message (Offline)

Ignore
1714841432
Reply with quote  #2

1714841432
Report to moderator
"Your bitcoin is secured in a way that is physically impossible for others to access, no matter for what reason, no matter how good the excuse, no matter a majority of miners, no matter what." -- Greg Maxwell
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
maco
Sr. Member
****
Offline Offline

Activity: 294
Merit: 250



View Profile
February 03, 2014, 07:32:34 AM
 #2

Thanks for your indepth callaboration. I do like it when others in the community give us input to make the coin a better coin in the long run.

We have ran multiple tests and even tho that person created an indepth thread, the supply of 42.00 coins has ended as advertised.  There was already a few people with similar mentions like yourself...  To re-validate its only 42..   Hendo has pushed an update with some new additions, one that will make sure that after BLOCK 990382 (it has been hard coded) to not generate anymore coins.

990382 = LAST BLOCK in the history of 42 to ever be mined.
We added this last block to add confidence in the community that this
will certainly be the case and you can run a test net to try it yourself.

Many developers have jumped in to look at the source, and has verified and validated MAX MONEY is in fact,
the valid core code for 42.00 coins ever to exist, and Hendo will make the final update with the LAST BLOCK of 990382 and finalize it all.

Here is the link to the new update: https://bitcointalk.org/index.php?topic=399658.msg4906613#msg4906613

Please feel free to give us your input as we are looking to get more peer review in from the community!
dagi
Sr. Member
****
Offline Offline

Activity: 374
Merit: 250



View Profile WWW
February 04, 2014, 11:32:01 AM
 #3

66 Coin
Code:
int64 static GetBlockValue(int nHeight, int64 nFees)
{
    int64 nSubsidy = 0.000066 * COIN;
    if(nHeight == 1)
    {
       nSubsidy = 3 * COIN;
}
    else if(nHeight < 667)
    {
       nSubsidy = 0.00000066 * COIN;
}
    return nSubsidy + nFees;
}
Smiley
maco
Sr. Member
****
Offline Offline

Activity: 294
Merit: 250



View Profile
February 10, 2014, 10:02:23 AM
 #4

Why no response? Because the update fixed it... Hehh!
tx42 (OP)
Hero Member
*****
Offline Offline

Activity: 742
Merit: 500



View Profile
June 15, 2014, 11:43:30 PM
 #5

Why no response? Because the update fixed it... Hehh!

Sorry, I forgot about this post. Yes, fixed in 42.

█    █     ██    ███     ███    ████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████     ███     ███    ██     █    █
..EARN FREE BREAKOUT COINS SIG CAMPAIGN LIVE !!
█    █     ██    ███     ███    ████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████     ███     ███    ██     █    █
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!