Saturday, December 20, 2014

PayCoin Goes Proof of Stake... Almost

PayCoin officially hit the one week mark this morning, which means that it has now moved on to being a Proof of Stake coin. Or has it? GAW posted on Hashtalk that they will be doing an extra 24 hours of Proof of Work in order to transition smoothly, but that's perhaps a bit disingenuous. This is not a "surprise", but rather the way it was always intended to happen. You see, the problem is that the source code actually sets the Proof of Work reward as follows:
int64 nSubsidy = 0;

if(nHeight == 1){
     nSubsidy = 12000000 * COIN;
}else if(nTime <= POW_START_TIME){
     nSubsidy = 0 * COIN;
}else if(nTime < POW_END_TIME - 86400){ // reward is 0 before ending PoW 1 day
     nSubsidy = 49 * COIN;
}

if(nHeight > 277 && nHeight < 400){
     nSubsidy = 0 * COIN;
}
For those of you that don't know any coding, basically that says that the reward is 12,000,000 XPY for the first block, 49 XPY for blocks up until the end time, and 0 XPY otherwise. There's also a clause setting blocks 277-400 to 0 XPY as a reward, but more importantly is the POW_END_TIME - 86400 statement, which sets the reward to 49 XPY if and only if we are one day before the end of the PoW stage. Why would they drop PoW rewards to 0 XPY one day early? Well, they don't actually, as POW_END_TIME is defined as 1419181200 (Sun 21 Dec 2014 12:00:00 PM EST) while POW_START_TIME is 1418403600 (Fri 12 Dec 2014 12:00:00 PM EST). So really the PoW stage is set to eight days and not seven. But there's a bit more going on than you might expect.

One problem is that the code defines a time block for the PoW stage rather than a set number of blocks. The original plan was to have 12.5 million XPY generated during PoW -- 12 million for the genesis block and 500K for PoW mining. But PoW mining doesn't happen exactly at a steady rate -- some blocks are found quickly, some take more time, and sometimes there are glitches that require a hard fork. What has happened now is that instead of 12.5 million XPY from PoW, there will only be 12,343,209 XPY.

My opinion is that GAW should have had a flexible end time, or more specifically the transition should have happened by block number rather than by an arbitrary time. If PoW had ended at block 10204 instead of an arbitrary time, then we would have ended up with almost exactly 12.5 million XPY from PoW. At a one minute target per block, it would have required around 170 hours, or 7'09 days. But that is not to be.

It's no surprise that this "error" works out in favor of GAW, as now their pre-allocated 12 million XPY represents 97.2% of all PoW coins instead of the 96% that it was supposed to be. It also means that right now, a whole lot of work is being done with zero rewards, and because no new XPY is being created the price has started to trend upward.

The real chaos of course begins when PoS actually starts. There are apparently five potential PoS reward rates: 5% for wallets, then depending on the current PrimeNodeRate Prime (and Orion?) Controllers can stake at 10, 20, 100, or 350 percent per year. As I understand it, the first six months will be at 350%, but digging through all the source code to figure that out would take a lot more time and effort than I currently want to expend. :-)

Anyway, in the near future we should see staking begin to happen, and most of that should occur with the HashStakers/Prime Controllers. I don't know quite what to expect from staking rewards in the block chain, because again I didn't dig through the code enough. Usually staking is based on the number of coins in a wallet combined with the coin age, but Prime/Orion Controllers have a bunch of special exceptions, along with a limit to how many XPY can be in the Controller I believe. One thing is certain, however: I expect the block rewards from staking to be a lot less than the 49 XPY rewards of PoW mining, which means the flow of new XPY into the market will be far lower. But I could be wrong, so keep an eye on the block explorer and I guess we'll see what happens.

No comments:

Post a Comment