Post by Who on Aug 18, 2014 19:02:59 GMT
There has been a lot of discussion recently about the viability of POS (Proof of Stake) as a mechanism to secure the network. The main concern was highlighted by an exchange being hacked and a large percentage of POS coins being stolen. I should point out that the POS mechanism itself had nothing to do with enabling the actual theft. The main issue highlighted by this action was that a weak link was exploited in the crypto services using the coin and somebody got control of a very large number of coins. In a traditional POS only coin, this user obtained a lot of power to control the block chain. That is bad for POS, especially as this user clearly displayed malicious intent by hacking the exchange and stealing the coins in the first place.
I want to explain why I truly believe that the changes to the POS protocol we implemented in Netcoin make it far less susceptible to very large volumes controlling the network.
I'll start with a quick recap on how traditional POS works
The central idea behind POS is to find a way to bias the ability to sign blocks towards people who are demonstrating that they back the coin (have a stake in the coin) by holding large numbers of coins for considerable periods of time. The more coins you have, and the longer you hold them, the stronger your 'Stake Weight' grows as you compete with others on the network to sign transactions in POS blocks. Like Proof of Work (POW), its still a game of 'rolling dice' a small number of times to achieve a minimum score. The longer you hold coins, and the more NET you stake, the bigger the numbers on your particular 'dice', so you have a better chance of hitting the minimum than somebody with fewer coins, and/or somebody who obtained their coins only recently.
When you do hit the minimum score required to sign a stake block, the coins you stake are 'spent' back to yourself. In addition you earn (mint) a reward for signing the block. The age of the coins you staked resets to zero because you spent the old coins and received new ones. You start again with very low numbers on your 'staking dice' to try to win the next block. As time passes, your stake weight grows again, but in the meantime others get a chance to win stake blocks, and thus the power to sign blocks passes around the network, but always biased towards the people who have been holding more coins for long periods of time.
The problem is that a person with a huge proportion of the network coins will have such a strong stake-weight that their 'staking dice' will obtain very big numbers much faster than the average minion on the network. They will sign a large number of blocks, drive up the staking difficulty and potentially get to a position where they are making block chains with a massive staking weight backing them that will be preferred over the 'minions' chains by the protocol.
There is a mechanism built into POS coins that attempts to mitigate this risk. It is called block-splitting. The idea is that whenever somebody successfully signs a block using 'young' coins, they probably have a very high coin value being staked compared to the average minion in the network. They are potentially getting to wield too much staking power. In this situation they will sign the POS block, but then the coins and the associate reward will be divided into two separate future staking attempts, each with about half the staking power as the block that just signed. This in theory gives other people on the network a better chance to sign a future POS block.
When I looked into this in the source code I was surprised to see that while block splitting is done in the wallet, it is not actually enforced by the peers on the network. It works fine as 'voluntary policy' to try to acheive a network POS nirvana of fairness, but it is not a hard and fast rule. I can take a POS coins' source code, remove the lines that split the output into two, and my wallet and staking will still work on the network.
Meee and I thought about this for some time, then decided that what this code was actually trying to do was limit the amount of weight that could build up in order to stake a block.
We also spoke to users of other POS coins who told us that constant block splitting was breaking down their wallet balances into tiny fragments and the wallet software was grinding to a halt under the load of trying to process hundreds or even thousands in some cases of tiny coins.
The "Fair Weight" idea is born
It was from this point that we decided to take a different approach that we will call "Fair-Weight". We simply decided to cap the total number of coins that are allowed to count towards the stake weight of any single stake attempt to 100,000 NET. We would also ensure this rule was enforced by the protocol and applied by the peers when validating another users stake attempt.
The bottom line is this:
If in future a single user or entity manages to obtain tens of millions of NET by any means, their staking weight behaves as though they had just 100,000 NET.
In other words, everybody with 100,000 net or more is playing the staking game on a level playing field. You might try to remove this limit in the source code, and make a new wallet, but the network peers will still apply the limit and reject your attempt to stake.
This also means we do not need to implement the block-splitting mechanism that has dogged the performance of so many other POS coins.
Then you also have to remember, that regardless of what happens with POS block staking, there is a parallel POW mining mechanism that is also constantly competing with the POS mechanism to sign the current transactions.
As far as we know, this 'Fair Weight' idea has never been done before.
Removing block-splitting and enforcing a hard coin-value limit in stake-weight is a fundamental change from the original POS code, but it makes complete sense, and does exactly what block splitting was trying to achieve in the first place. It creates the level playing field on which all the premier league coin holders can play their staking game.
who (Netcoin developer)
Netcoin (NET)- Your Currency on Your Terms