CONSENSUS
🛠️The main thing about the consensus mechanism is that it involves the interaction of people and measures of encouragement and punishment.
⚙️Consensus is the mechanism by which nodes are approved by the system. It approves which transactions have passed and which blocks have been added, as well as other basic features of the blockchain are approved.
☝🏽There are two main consensus mechanisms, and there are constant disputes about each of them. This is PoW and PoS — proof of work and share, respectively.
Why should one need to prove the fact of having done anything at all?
🖥️The basic idea is, there is a network, there are many computers that agree to approve this or that block but sometimes it happens that two blocks appear simultaneously and you need to determine their order, so something like a vote happens and the fundamental question is who will take part in this vote?
👤One person = one vote is not suitable as in this case some kind of authorized structure or body is needed to indicate who is a person.
It is necessary to decide who are the participants in this vote at all? And if this is not done, the following may happen: an attacker will come with a billion virtual computers, which means with a billion nodes and say, “I am now 99% of the entire network and I control everything”.
To prevent this from happening, PoS and PoW and other consensus mechanisms are essentially designed to assess the significance of each vote.
⚖️The mechanisms weigh how much influence your voice has in the consensus network in proportion to how many economic resources you have brought into the network and used in it.
1️⃣In PoW, you prove that you have economic investments in the form of computer power and prove it by the fact that computers work 24/7 through a hash algorithm and this is what solves the above problem. Since in order to control the network, you need to have more computers than you already have on the network. That is, to put more money into equipment and spend more on electricity than is already available in the entire network. It’s extremely expensive, so it’s just not real.
2️⃣In PoS, instead of using computers with hash algorithms 24/7, the person himself is the economic resource of the system being the holder of the coin. After all, every network has a base coin, so why not use it as a confirmation and measurement of your participation in the system?
📲To try to gain control over the network in PoS, you also need to have more than half of the entire network — this is very expensive, just like in PoW. But in PoS, it is much easier to recover from attacks and the attacks themselves are easier to withstand, since the network sees intruders and burns their coins. For example, on the DecimalChain network, with the DPoS consensus mechanism, which is a PoS upgrade, malicious nodes are automatically fined by the network by 1% or 5%, depending on the violation. In different blockchains, these are different penalties, but the essence is the same.
In PoW, it will be more difficult to figure out which of the miners is an attacker and who needs to be punished. We will either have to leave all the miners, or make a fork and thereby replace all of them.
👥Of course, PoW fans can cite a bunch of counterarguments, which is fine, because we have not yet encountered a global attack in practice and can only speculate. But one thing is obvious: both mechanisms are reliable and safe, and yet it is obvious that PoS is significantly less resource-intensive and much more environmentally friendly!