Minting with capped maximum stake

Maybe we’ll try with some fixed numbers to see

Assume each minter has only one unspent output, he has almost none incentive to mint in 30-90 days period so we can way he’ll start after 3 months, let’s give him another 3 months to mint for a reward, that’s half year turnaround time.

blocks monthly 6×24×30 = 4320, quarterly 12960, half year 77760
Current stake per ‘ideal’ minter 21458952 / 77760 = 276

Hmmm, quite small, I don’t have time now, play with some numbers and see what will happen, treat big stakeholders as a group of smaller stakeholders.

Well, this is where the discussion exceeds my math abilities… but I believe that the actual “ideal” stake would be much higher than 276 because a stake that small will have to complete against a larger stake as many as 4-5 times over the same 6 month period. For example, two individuals receive 300 and 30,000 PPC respectively. Forty days later the 2nd individual mints a coinstake while the 1st continues building on his 9,000 coin-age. By day 70, the 1st individual has now 21,000 coin-days but still can’t compete against the 2nd individual who has started minting again with a “fresh” 900,000 coin-days. What’s worse, the first individual maxes out his coin-age at a mere 27,000 just 30 days later! I say this exceeds my math abilities however, because I’m not sure how to accurately account for the extra time the 1st stakeholder gets to attempt mining a block, not to mention the effect of all the other larger stakeholders competing for the next block.

Actually, now that I think about it, maybe it’s not such a bad thing for the whales to stay out of the pool for long periods at a time because it seems to open the floor for a more equal distribution of “lucky” nodes submitting blocks.

This should be a testable assumption. Look at blocks solved in the last year and filter them out so that we’re only looking at those that were proof-of-stake. Next, take that list and filter to show only blocks that had a large amount of coindays destroyed.

It isn’t going to be a perfect list, unfortunately. There’s a separate analysis that would need to be done by cross referencing it against the list of top addresses that solve blocks with stake, but it is probably a starting place for conversation.

I’m afraid that there is no such thing as an “ideal stake” at all, but we have some boundaries!
We certainly need at least 62430=4320 “stake units”, that’s the minimum, thus
Max stake unit: 21458952 / 4320 = 4967
Min stake unit: 1

There is no reason imo to accept stakes greater than 1/4320(0,02314%) of moneysupply.

The capping of reward is also very interesting possibility. I started with technical analysis to find out at what age should the reward be capped. And I found out quite unfortunate thing: the reward capping will not help much.

The analysis: I downloaded current balances of all 405 wallets with more than 10,000 PPC from here. They represent 78% of all coins today. Each of these wallets can find a block in less than day if their coins are matured. Even with optimal POS difficulty 180[sup]*[/sup], all of them can find a block in less than 14 days. We can assume, that if the reward is capped at 90 days, all of these wallets can wait until day 90 (worst case day 76) and mint only then. In such case, every wallet will create 4–5 blocks per year, which in total is 405 x (4 or 5) = 1620 - 2025 blocks. There is 144 x 365.26 = 52597 blocks per year, so with 90 days reward cap, the top 405 wallets will produce 3% or 3.8% of all blocks, while they should create 78% of all blocks!! Increase in minting of 3% will not boost POS difficulty much. The reward-capping age we would need would be in order of few days, but this doesn’t go together with the initial days with zero probability (30 days today), which are necessary for another security reasons.

I think to solve the problem, it must simply not be possible to put too much coinage into a single block. There is more ways how to achieve that (none of which should involve too much technical complication or other obstacles for the rich wallets). Few ideas:

[ul][li]Do not consume all coinage, use only some part and return the rest to the stake. [/li]
[li]Do not accept stakes bigger than ~ 1000 PPC[sup]**[/sup] at all. If the wallet is configured to mint, let it automatically split the stakes for users with big stakes who want to mint.[/li]
[li]Do not use coinage at all. (I.e. constant per-block reward).[/li]
[li]Probably many more.[/li][/ul]

This was the main message. If you want to explore on your own, I give you this Google docs sheet with list of all list addresses. (Change anything, I have a copy.) To simulate all network, I assumed that there is 1112 addresses with 3279 PPC, 2795 addresses with 313 PPC and 4337 addresses with 38 PPC. (According to bitinfocharts.com I posted above. For example there is 1112 addresses with ballance 1,000 PPC - 10,000 PPC, so I used average balance for all of them.) If you do not want to dig too deep into the mathematics, just look at the yellow fields. Change the “Reward cap [days]” and then tweak the “POS difficulty” until “Blocks” is around 100%. (Because this is what would happen with POS difficulty in praxis).

[sup]* Optimal POS difficulty is achieved if all wallets mint all the time, not considering the coin maturing process. According to this document, number of minting coins can be calculated as

PPCminting = 4294901760 x POSdiff / (60 x 600)

The number 4294901760 is, as explained in the document, relating base POS difficulty 1 to probability per second, 60 is the maximum coinage weight of every Peercoin the attacker uses (alpha’ in the original equation) and 600 is the number of seconds between blocks (T in the original equation). From this follows that

Optimal POS difficulty = 60 x 600 x money supply / 4294901760 = 177.6 ~ 180

** This should be, of course, proportional to money supply, because the necessary size of a stake changes with inflation. So it should, more precisely, be something like:

Maximum allowed stake = Money supply / 21200[/sup]

Wow, thanks for this great analysis and important insights. I’m looking forward to exploring the data you collected when I get home from work!

Here I post an analysis of what would capping of the max coinage consumed per block do with existing block rewards in the blockchain. The capped distributions were created so that the stakes above the threshold were replaced by block with the cap size in such amount the total number of coins was conserved. So there is more blocks than in the red (real) distribution. I rescaled them so that the X-axis ends at the same point. The scaling factor is the increase in difficulty.

Conclusion: It helps (particularly it may help the security in future), but it is not 10x or 20x increase I expected. The POS difficulty 180 I am advertising is probably very unrealistic optimal estimate based on very special distribution of coins that is not real. I will have to investigate further, but is seems we are not doing so badly with security today as I have thought.

I don’t understand the figure. What is the x axis? Take the 10PPC curve, what does it mean?

I don’t understand the figure. What is the x axis? Take the 10PPC curve, what does it mean?[/quote]

Sorry for poor explanation, I will try better. When I did this analysis, there was 85703 POS blocks. Take them and sort them according to the reward for minter. You will get the red line - rewards today. It is a distribution, the lowest rewards around 0.01 are to the left, the biggest rewards are around 1000 PPC and they are on the right. (There is a logarithmic scale on Y axis to cover whole range of rewards.)

No imagine we introduce the cap on maximum allowed POS reward to 10 PPC (=maximum consumed coinage per block 365000 coindays). If someone solves block that should get 1000 PPC reward, he gets 10 PPC reward and keeps the rest of his coinage. (According to my proposal from the beginning of this thread.) Eventually, he would create 100 blocks with 10 PPC reward instead of a single block with 1000 PPC reward. Like this, you would have more blocks, of course, since many new 10 PPC blocks appear replacing the bigger blocks. In this case, there would be 92557 blocks.

Under such conditions, the POS difficulty would increase to compensate shorter time between blocks. I simulated this by rescaling the X-axis of the distribution of rewards of those 92557 blocks back to original 85703. This is the blue curve denoted “capped at 10 PPC”. The difficulty increase by this protocol is 92557/85703 = 1.08, which is 8% increase. Is it clearer?