<100 subscribers
Hello, everyone! I hope everyone had a fun reading time with Proof of Stake (Part 1). Today, your Charlotte come back with Part 2 in which we will discuss about Slashing Penalties, Nothing at stake problem in Proof of Stake mechanism along with its advantages and disadvantages.
Letβs dive in.
As we know, in Proof of Stake, validator has to deposit their coins to become a validator/forger. Their coins now also act as collateral. This collateral will be locked and during that locked time, it cannot be moved. The penalty charged for dishonest validation, inactivity or any fraudulent event is called a Slashing Penalty. The purpose of Slashing Penalty is (i) to make it expensive for an attack to the network and (ii) to make validators/forgers behave responsibly.
(i) If the network finds the fraudulent block, the validator will lose the stake and the right to participate forging in the future. Therefore, as long as the stake and reward are still high, it will prevent the validator from validation the malicious transactions.
(ii) To fully receive the reward, the entire process of validation and signing block must happen within 12-second slot. Over this time period, the reward will decrease. If he/her miss the slot, he/she will lose his/her reward.
As we discussed in PoW, the miners can only mine one chain which is a longest chain. It is very costly if they mine in the wrong chain because in PoW, it requires ancomputational power to mine the block. If they choose the wrong block to mine, they will lose their reward.
On the contrast, it costs a validator nothing to validate transactions on both at the same time. It does not require any high-power computational devices to do so. Moreover, it is in their financial self-interest to do so because they will win the reward on whichever chain ends up "a longest chain". This problem in PoS is called "Nothing at a stake".
Let's take an example so that we can understand the problem better. Veronica, our attacker, attempts to execute a double spend attack. She will send her 10ETH to an exchange in chain A. This transaction is validated because chain A is now still a valid chain. After transaction is signed, Veronica now switch to chain B. She now only validate and add blocks only on chain B. With the hypothesis that other validators still validate on both chains at the same time, chain B now has more attesters and eventually will become the longest chain. It means that her transaction sending 10ETH to an exchange on chain A is invalid. From chain B, now she can send another 10ETH to another person with another purpose. This transaction now on chain B is validated and become valid. It costs Veronica only 1% of stake in the network to do so.
Therefore, we have two approaches for solving this problem:
(i) Punishment to validators for choosing to forge/validate two different versions of the same block.
(ii) The network contain a validation software that will not allow for forging all chains, so the validator has to choose the "true" chain to forge.
(i) It is clear that PoS is much energy efficiency than PoW which requires a high-power computational device for the mining. It means that PoS is environmental friendly. Less electricity, less energy.
(ii) Because it does not require an expensive and strong computer to validate transactions, PoS attracts more forgers which can make network more secure and stable. The pseudo random selection also makes system more decentralized and secure.
(iii) However, as we discussed above, "nothing at a stake" problem makes PoS less reliable and security than PoW. Blockchains which use PoS mechanism should have their own constrains to solve this problem in order to secure network better.
Until now, two main consensus mechanisms Proof of Work and Proof of Stake has been discussed. I hope you get the idea how the mechanism works. If you like the posts and would like to have more familiar contents in the future, please subscribe or leave a comment.
As always, thank you so much for your interest into math, technologies and science. I will come back for more interesting things.
Charlotte.
Charlotte