McDonald's that has grown to a network of well over 38,000 locations in more than 120 countries, has become the premier example of...
In this complete guide, Vladimir Malakchi, CMO of 482.solutions, figures out which consensus algorithms are presented in the industry, considers their features, and also touches on their shortcomings dispelling several myths.
You probably know that each blockchain’s operation is based on a mechanism for achieving consensus. This algorithm is responsible for the safety and efficiency of the network. Moreover, the consensus mechanism ensures the reliability of the data recorded in the blockchain, which are not subject to change after entering the chain.
Algorithm not invented by Satoshi
The Proof of Work algorithm is a pioneer in the history of the cryptocurrency industry development. It is worth noting that the famous Proof of Work was developed at the end of the 20th century, but it is unlikely that its creators would have thought then that they would give impetus to the development of such a global technology.
Now you can experience a little shock – the proof of work technology has not been developed by the mysterious Satoshi Nakamoto. The idea belongs to the researchers Moni Naor and Cynthia Dwork, who suggested that in order to secure access to a network resource, the user needs to perform a certain task. Adam Beck used this idea in the Hashcash project in 1996, which task was to protect emails from spam. And only in 1999, this mechanism received the familiar name “Proof of Work”, which was implemented in the server protection system against DDoS attacks.
Basic Principles of Work
The algorithm is used in such networks as Bitcoin, Litecoin and Ethereum. PoW contributes to the development of the network through mining, but if previously it was considered its dignity, now it is a catastrophic blow to its popularity – miners earn less and less each month by paying fabulous electricity bills.
The Proof of Work workflow can be divided into four stages:
It is worth noting that for-profit ingenuity is not enough, more chances of the miner who purchased powerful equipment. And the reward for the disclosure of blocks is also distributed in accordance with the computational power of the node (hash rate).
Proof of Work Disadvantages
PoW is far from perfect (not surprisingly, it has so many alternatives).
The main reasons why developers are less likely to turn to this consensus algorithm are:
Finding a hash is becoming more difficult, which contributes to increasing the time to solve the problem. The only solution is to buy even more powerful equipment, which increases power consumption.
We have already figured out that the participant with the highest hash rate becomes the leader in the race for profitability from mining. But nothing prevents him from concentrating more than 50% of the hash rate, so the system will leave all the other miners with nothing.
Moreover, the network is vulnerable to double-spending: an attacker sells coins that he mined on the main blockchain while continuing to mine coins on the side chain. For example, he can create an unknown fork, mine coins on it, but not waste them. Thus, he will be able to create a chain longer than the main one, due to which other nodes of the main blockchain will be sure that the attacker has coins that he has already successfully sold.
Let’s add some positive: Bitcoin is unlikely to become a victim of this attack because too much power is involved in the extraction of these coins and it is almost impossible to capture 51% of the hash rate.
But, as for the other cryptocurrencies on Proof of Work, such a scenario is quite likely, so it’s time to discuss the Proof of Stake algorithm.
Your ASIC solves nothing here
Realizing all the problems of Proof of Work, bitcointalk.org users in 2011 voiced a completely new, and further revolutionary idea, where computing power is not a priority.
The Proof of Stake algorithm provides the right to vote in consensus by providing a certain amount of cryptocurrency as collateral – a share in the network. Whose amount is more, he gets a reward for generating blocks higher.
This algorithm was first shown in action in 2012, PeerCoin network validators proved by their example that it is possible. PoS can be found today in DASH, Neo, Stratis, ReddCoin, NavCoin, and MasternodeCoin cryptocurrencies.
In terms of reliability and safety, PoW has an advantage over PoS. However, PoS is much more energy efficient than its predecessor.
Mining is Not Mining?
The mining of coins at PoS is also considered to be mining, however, it is not the case. Coins of the network functioning on this algorithm have already been mined in advance, and the task of the network participants is only to confirm transactions. This process is called forging, and profit hunters are called forgers.
A user who wants to start PoS mining is required to keep a certain amount of cryptocurrency on the local active wallet balance, that is, to become a network node.
This approach reduces the likelihood of double-spending, which we wrote about above. If the user intentionally tries to double-spending – he says goodbye to his pledge.
It is worth noting that in order to make a good profit at PoS mining, you will also have to spend considerable sums that need to be kept on balance, but you were saved from useless computational work.
Basic Principles of Work
Proof of Stake Disadvantages
The main requirements for forger are: assets must be frozen, and the node must constantly communicate with the network. There are no difficulties with the assets – you can just get two wallets, one of which will serve to make your own transactions. But the unstable Internet can be a problem. If your cat gnawed the wire on your router, turned off the electricity, or the provider does its job in bad faith – coin mining stops. There is a way out, but it is paid. There are services for cloud PoS mining, which provide forging wallets. They are always online, but the amount you have to pay for them is even more electricity bills.
It is easy to guess that if you have 10 coins in your account, and another user has 1000, his income will be 100 times more. But, unfortunately, during the forging, a lot of other expenses arise commissions for charging interest or payment for sending messages, for example (this need arises during validation of blocks). Such expenses don’t depend on the state of your balance at all and lead to an increase in the profits of more affluent investors as a result. So, it is the path to network centralization.
In order to make changes to the network with this algorithm, it is necessary to make voting between users. The idea is excellent, but the snag is that the weight of the voice is directly related to the balance. Simply put, who has more coins, he is cooler. Experts suggest the emergence of such a situation when powerful nodes can agree among themselves and thus take control over the entire network.
Modified Proof of Stake
Delegated proof-of-stake is an alternative to PoW and PoS. The DPoS algorithm is the result of the Graphene project developers, which was introduced in 2014. The creators of the algorithm decided to divide the participants into those who have the right to vote on the network and who can validate transactions. As a result, coin holders are not transaction validators.
Anonymity is only in the background
Those who wish to confirm transactions and receive rewards for this need to say goodbye to their anonymity, since the conditions of the algorithm involve revealing their identity and confirming their full readiness to support the work of a full-fledged network node without interruption. Validators are also required to timely verify transactions and form new chain blocks.
Basic Principles of Work
Delegated Proof of Stake Disadvantages
The Leased Proof of Stake algorithm differs from DPoS in that the user who has a small number of coins has the opportunity to present them to another user who is aimed at the large “weight” of his node in the network. According to this mechanism, “weighty” users, after receiving the award, will pay rent for those coins that were provided to them by less well-off network members.
This consensus mechanism is used in the Waves network.
If we talk about disadvantages, then the Leased Proof of Stake doesn’t solve the problems of its “father” Proof of Stake because it is also subject to centralization and agreements between users, who can take control of the network with a strong desire.
The principle of this algorithm is also very similar to PoS. The only difference is that when choosing a validator, not only his sum on the balance but also activity in the network plays a role.
It means that the confirming node can be the user who not only stores the funds but also makes transactions in the network. The time spent by the participant in the network is also taken into account. On the basis of these conditions, a certain reputation of the participant is formed, which motivates all community to be active.
This kind of PoS consensus is used in the NEM blockchain.
The PoQ algorithm combines Pow and PoI capabilities. Such a blockchain consensus model was implemented in the DollarBit project. It should be noted that PoQ, as well as in PoI, takes into account user activity in the network. However, there is also the usual PoW mining.
DollarBit claims that their coin can compete with the old BTC and even get ahead of it since mining takes place with the help of computing power, but when determining the participation rate (Qp), which doesn`t depend on the number of assets on the balance.
PoA is designed for use in centralized networks and is decoded as a method of proof by authority. Such an algorithm can easily fit into the workflow of a company, where the main “authority” is defined. The bottom line is that only the network node is able to confirm the block if it has this right. With this approach, the possibility of acquiring control over the network by detractors is excluded. Even with 50% of the processing power to manipulate the process of generating blocks will not be possible as it is necessary to get an additional 50% share of coins.
The disadvantage is that PoA completely negates the basic idea of distributed networks – decentralization since a strictly limited circle of users can take an active part in the system.
The PoA algorithm can be seen in action in the NXT blockchain.
This representative of the consensus algorithms can also be found under the names Proof of Space or Proof of Storage. The Proof of Capacity mechanism means making a profit for confirming a block when providing free space on your hard disk. The more space the user provides, the higher the reward will be.
This method of cryptocurrency mining is quite popular since almost everyone has disk space. Moreover, any hard drives, for example, and Android OS devices, are suitable for PoC mining.
There is a drawback, and it is significant – hackers create and distribute malware over the network, which uses for mining a place on the hard drives of people who are not even aware of the existence of cryptography.
Mining on hard drives is presented in the BurstCoin cryptocurrency blockchain.
BFT is one of thepromising solution for networks that want to eliminate the problem of low bandwidth.
The BFT protocol has several varieties:
This kind of consensus preserves the integrity of the overall network, even with interference in multiple nodes. The bottom line is that master-nodes and nodes take part in the network development. They are responsible not only for confirming transactions and entering them into the blockchain but also for identifying “bad” nodes that are trying to compromise the system.
If we consider entering the transaction into the network step by step, then it will look like this: transaction enters the shared pool, from where it comes to the node, then the node sends the request to the master node, which grants permission to conduct the transaction.
In the case of DBFT, the decision is made not by one node, but by all the master nodes by reaching consensus, which eliminates fraud on the network. After a positive response from the master node, the node enters the transaction into the network.
PBFT is very similar to DBFT, but it is often used in private blockchains, where the load is not large, but there is a need to conduct multiple transactions.
When conducting a transaction, all nodes decide by voting whether to believe the validator or not. If 67% of participants are in favor of this transaction, consensus is reached.
But in the case of the Federated Byzantine Agreement (FBA), transactions are confirmed by a certain number of participants who are online at the time of the decision. Unlike PBFT and DBFT, nodes and master nodes are not preselected; with FBA, anyone can connect to the network.
In this article, we reviewed the most famous and popular algorithms, outlined their advantages and disadvantages, defined their principles of operation, and made sure that the correct mechanism for achieving consensus is an integral part of a distributed system that helps protect the network from attacks and also ensures its stable and honest work
The first protocol, Proof of Stake is far from perfect, of course, but it gave a great start in the huge potential development for reaching consensus.