Bitcoin Forum

Alternate cryptocurrencies => Altcoin Discussion => Topic started by: laxori666 on April 16, 2014, 08:59:26 PM



Title: Why did PeerCoin change COIN from 100,000,000 to 1,000,000?
Post by: laxori666 on April 16, 2014, 08:59:26 PM
I've gotten interested in PeerCoin recently and have been poking around the source code. I've found something unusual...

June 19th, 2012 (https://github.com/ppcoin/ppcoin/blob/28a498d5a6794bce952fe8a1938720b73946c1d8/src/util.h#L39):
Code:
static const int64 COIN = 100000000;
static const int64 CENT = 1000000;

July 22nd, 2012 (https://github.com/ppcoin/ppcoin/blob/0561bbd1c69263dceb24ffacf850788e6e961a13/src/util.h#L40) to today:
Code:
static const int64 COIN = 1000000;
static const int64 CENT = 10000;

As of today, COIN is still 1 million in PeerCoin, while it's still 100 million in BitCoin. What gives? Some unit tests for PeerCoin even fail because of this (e.g. FormatMoney(COIN/10000000) predictably returns "0.00" instead of "0.0000001") . I haven't seen mention anywhere of PeerCoins only being divisible by 6 decimal places. The commit which changed this also sheds no insight.

Did Sunny decide to redefine 1 PeerCoin to be 1 million "satoshis" instead of 100 million "satoshis" at some point? If so, why?

EDIT: It looks like the coin was released in August (https://bitcointalk.org/index.php?topic=101820.0), so the change was made before the coin was released. I guess PeerCoins are only divisible by 6 decimal places? What's the rationale behind this decision?


Title: Re: Why did PeerCoin change COIN from 100,000,000 to 1,000,000?
Post by: laxori666 on April 17, 2014, 05:18:00 PM
The two decimal places are the needed room for proof of stake rewards (~1%).
I don't follow. Which two decimal places? There's two fewer decimal places in PeerCoin than in BitCoin. CENT has four decimal places. So if you stake 1 cent you can get 1 hundredth of a cent, but if you stake 1 hundredth of a cent you can still get 1 ten-thousandth of a cent. It seems arbitrary.


Title: Re: Why did PeerCoin change COIN from 100,000,000 to 1,000,000?
Post by: HashEngineering on April 18, 2014, 02:56:39 AM
The two decimal places are the needed room for proof of stake rewards (~1%).
Since there are only 6 zeros beyond the decimal, the other 2 are not there to store the proof of stake rewards.

Quark is another coin that does not use 8, but rather 5 zeros beyond the decimal.

The reasoning may be arbitrary.  However, a 64 bit integer can hold a maximum value of 18446744073709551616.

If there are 8 zeros allowed, then the max number of coins can be:
184,467,440,737.09551616 (184 billion)

If there are 6 zeros allowed then the max number of coins can be:
18,446,744,073,709.551616 (18 trillion)