Mechanisms to achieve consensus in the blockchain

Published on July 27, 2017

Mechanisms to achieve consensus in the blockchain

    Cryptocurrencies use distributed registers or blockchains to record information — first of all, about the balance of each address on value transfer platforms (for example, Bitcoin and most cryptocurrencies), although this approach can be applied to any information.


    The key condition is that the network should collectively coordinate the contents of the register: it is distributed among all participants in the chain, rather than transferring centralized account management to one subject - for example, a bank.

    This network needs to maintain a consensus around the information recorded on the blockchain. The way to achieve this consensus affects the security and economic parameters of the protocol. Here are five examples of his achievement.

    1. Proof of Work (Proof of Work, PoW)

    Confirmation of performance is the first distributed mechanism for reaching consensus, created by the creator of Bitcoin, known under the pseudonym Satoshi Nakamoto. His example was followed by many cryptocurrencies, including Ethereum.

    In the case of PoW, all the computers on the network that are charged with maintaining the security of the blockchain (in the case of Bitcoin, they are called miners), are working on calculating a mathematical function called a hash. This is a fairly simple task (for a computer), but constantly recurring and, therefore, expensive in terms of computation. Computers compete to find a hash with special properties. The computer that calculates it first will receive confirmation that it has completed the necessary work and will be able to add a new block of transactions to the blockchain. As a reward, he will receive a tranche of freshly extracted bitcoins (currently 12.5 BTC per block or approximately every 10 minutes), plus all the small transaction fees that users paid for sending coins.

    PoW works on the following principle: adding a tranche of new transactions to the blockchain is expensive, but checking if the transactions are valid is very easy, thanks to the transparency of the register. Miners collectively confirm the validity of the entire blockchain, and transactions are not considered fully “confirmed” until several new blocks are added to them. If an attacker attempts to use the coins in an illegal way, his transactions will be ignored by the rest of the network. The only way for an attacker to commit such a fraud is to have a huge amount of computational power that allows you to mine block by block, and again and again the first of the entire network to receive confirmation of the work done. This method is called "attack 51%", because to implement it, you need to have more than half of the total network hash. The reality is that not a single miner can have such a share of hash. In other words, attempting such a fraud is 1) extremely expensive (because it requires equipment and electricity, and also carries opportunity costs caused by not working in the actual version of the blockchain and receiving rewards) and 2) is extremely unlikely. Therefore, it is better for miners (that is, more profitable) to remain honest. caused by the lack of work in the actual version of the blockchain and the receipt of remuneration for it) and 2) is extremely unlikely. Therefore, it is better for miners (that is, more profitable) to remain honest. caused by the lack of work in the actual version of the blockchain and the receipt of remuneration for it) and 2) is extremely unlikely. Therefore, it is better for miners (that is, more profitable) to remain honest.

    2. Proof of Stake

    PoW is an expensive and energy-intensive method due to the required computing power. Around the creation of special equipment designed exclusively for mining, the whole industry has grown. Share confirmation (PoS) is an alternative method that does not require special equipment and has become very popular in recent years. In the case of PoW, the likelihood that a member will add the next block of transactions to a chain is determined by the level of the hash. In the case of PoS, this probability is determined by the number of participant coins. In other words, each network node is associated with a certain address, and the more coins it belongs to, the greater the likelihood that they will get the next block. It looks like a lottery: the winner is determined by chance, but the more coins (lottery tickets) he has, the more chances he has. An attacker who wants to commit a fraudulent transaction will need to own more than 50% of the coins in order to reliably process the necessary transactions; the purchase of such a quantity of coins will provoke a rise in prices for them and will make such an attempt prohibitively expensive.

    The PoS system was first developed by Nxt. Since it is not as energy-intensive as PoW, the cost of obtaining coins does not require such a reward as in the case of Bitcoin. Thus, PoS systems are well suited for platforms with a fixed number of coins and no inflation from the blocks created. The remuneration of participants consists only of the transaction fee. This approach is used by most crowdsale-financed platforms, where tokens are distributed on the basis of investment, and investors will not like the increase in the number of coins, as this will “dilute” their share.

    Currently, a share confirmation is a well-established mechanism for achieving consensus, but it is not often used in its original form. Certain advantages are offered by its two varieties, LPoS and DPoS.

    3. Leased share confirmation (Leased Proof of Stake, LPoS)

    In the case of classic PoS, network participants with a small balance are unlikely to be able to add blocks to the chain - just like small miners with low hash levels are unlikely to create a block in the Bitcoin chain. It may take many years before a small participant is lucky enough to create a block. This means that many network members with a small balance do not have nodes and allow a limited number of larger participants to manage the network. As the security of the network increases with the number of participants, it is important to encourage these small participants to take part in it.

    The LPoS mechanism allows participants to do this by renting their funds to large sites. The leased funds remain under the full control of their owner and can be transferred or spent at any time (after which the rent ends). Rented coins increase the "weight" of the network node, increasing its chances of adding a block of transactions to the blockchain. Any nodes received rewards are shared with landlords. This approach applies the Waves.

    4. Delegated confirmation of a share (Delegated Proof of Stake, DPoS)

    BitShares and a number of other platforms use a slightly different approach. With DPoS, coin owners use their tools to select a list of nodes that will be able to create blocks of new transactions and add them to the blockchain. This involves all coin owners in the network, although they may not receive a direct reward, as in the case of LPoS. Coin owners can also vote for changes in network parameters, which increases their impact on the network and its share in it.

    5. Proof of Importance (Proof of Importance, PoI)

    The latest type of consensus building mechanism is PoI. NEM was the first cryptocurrency platform for implementing this method. In the case of PoI, it’s not just the number of coins that is important. The NEM consensus building system is based on the idea that reward follows productive network activity, not just coin ownership. The probability of creating a block depends on a number of factors, including the available funds, reputation (determined by a separate special system) and the number of incoming and outgoing transactions from this address. This gives a more holistic picture of the “useful” member of the network.

    There are many variations of these basic approaches, and some platforms use a combination of PoW and PoS — the first is often used to distribute coins, and then the platform moves to the second method to maintain the network. Another approach is to use major nodes in combination with the mining of PoW, as is the case with DASH and Crown. They help to process transactions and receive a share of remuneration for the activities of miners.

    In all cases, the goal of the consensus approach is to secure the network, primarily through economic means: an attack on the network must be too expensive and its protection more beneficial.