Bitcoin Forum
May 07, 2024, 07:09:33 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Why did PeerCoin change COIN from 100,000,000 to 1,000,000?  (Read 1579 times)
laxori666 (OP)
Member
**
Offline Offline

Activity: 71
Merit: 10


View Profile
April 16, 2014, 08:59:26 PM
Last edit: April 16, 2014, 10:02:03 PM by laxori666
 #1

I've gotten interested in PeerCoin recently and have been poking around the source code. I've found something unusual...

June 19th, 2012:
Code:
static const int64 COIN = 100000000;
static const int64 CENT = 1000000;

July 22nd, 2012 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, 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?

Gib ShinyCoins: STGsZtHw4DRUby8aYCKjiGReFt3JU94YnT
1715065773
Hero Member
*
Offline Offline

Posts: 1715065773

View Profile Personal Message (Offline)

Ignore
1715065773
Reply with quote  #2

1715065773
Report to moderator
1715065773
Hero Member
*
Offline Offline

Posts: 1715065773

View Profile Personal Message (Offline)

Ignore
1715065773
Reply with quote  #2

1715065773
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
laxori666 (OP)
Member
**
Offline Offline

Activity: 71
Merit: 10


View Profile
April 17, 2014, 05:18:00 PM
 #2

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.

Gib ShinyCoins: STGsZtHw4DRUby8aYCKjiGReFt3JU94YnT
HashEngineering
Sr. Member
****
Offline Offline

Activity: 350
Merit: 250

Independent Cryptoveloper


View Profile WWW
April 18, 2014, 02:56:39 AM
 #3

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)







GRS:  FrFpTbfEAni5Ruf8mNdwVQazJVJaQyEM2Y
BTC:  128Ptecsv4j6NoxdBxdvGzBtipfaAarZMJ
https://bitcointalk.org/index.php?topic=336215 - Android Wallet Creation Service
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!