Consensus mechanisms in Blockchain

consensus_post.jpg

Cryptocurrencies use distributed double-entry registers or blockchains – primarily to track balances on value transfer platforms (as with Bitcoin and most of cryptocurrencies), although this approach can be applied to any type of information (as in Ethereum’s smart contracts).

The fundamental condition is – the network must collectively agree the content and the modification of the register, which is distributed among all the participants of the network (it can not use a centralized register otherwise it would not be a blockchain).

For this reason it’s necessary to maintain a consensus in the network with regards to the information registered in the block. Being a peer-to-peer network, where all nodes are in some sense equal, it is a matter to find a validation mechanism that confirms if the new information entered by a node could be broadcasted to the network and saved forever in the blockchain.

PoW.jpg

1. PROOF OF WORK (POW)

Work execution confirmation – this is the first mechanism of distributed consensus building, created by the founder of Bitcoin, known under the pseudonym of Satoshi Nakamoto. His example was followed by many cryptocurrencies, including Ethereum.

In the case of PoW, all computers / machines on the network are assigned to maintain the security of the network, miners work on the calculation of a mathematical function called hash. This is a fairly simple task (for a computer), but it is constantly repetitive and therefore expensive in terms of computational power and therefore also of energy. Computers compete searching for a hash with special properties (determined by the previous block). The computer that finishes the calculation first receives confirmation that it has completed the necessary work and it can then add a new block of transactions to the blockchain. As a reward, the miner receives a tranche of freshly produced bitcoins (currently 12.5 BTC per block about every 10 minutes), in addition to commissions for conducting transactions paid by users for using the network (sending bitcoins).

PoW works according to the following principle: adding a tranche of new transactions to the blockchain is expensive, but to check whether the added transactions are valid is very simple, due to the transparency of the registry (check if the hash is correct has no costs). Miners collectively confirm the correctness of the entire blockchain and the transactions are not considered “confirmed” until new blocks are added. If an attacker attempts to force the registry to rewrite it, his transactions will be ignored by the rest of the network. The only way for an attacker to commit such fraud is to have an enormous amount of processing power, which allows him to rewrite blockchain up to the first block to confirm the execution of the job. This method is called a “51% attack” because its implementation requires more than half of the total network hash. The fact is that no miner can have such a high power. The attempt at such fraud is extremely expensive (since it requires the cost of equipment and electricity, and also leads to problems of reliability and subsequent evaluation of the currency so tampered with) and therefore extremely unlikely. This applies to Bitcoin and other coins with a big networks, unfortunately there were 51% attacks on smaller networks (eg Bitcoin Gold, Verge) where it was probably sufficient to hire few hours the computing power sufficient to complete the attack. Ultimately, the PoW approach is as secure as the network is large and decentralized.

PoS.jpg

2. PROOF OF STAKE (POS)

PoW is an expensive and energy-consuming method due to the processing power required. An entire industry has grown up around the creation of special equipment designed exclusively for mining (ASIC). The proof of stake (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 probability that the participant can add the block of successive transactions is determined by the power of hash (hashrate) of the miner. In PoS algorithms, this probability is determined by the number of coins held by the participant, who must therefore try to participate in the network with coins and not with hashing power. Each network node has a specific IP address, the more coins belong to this address, the more likely it is for this node to validate the next block. It is therefore a sort of lottery: the winner is determined by chance, but more coins (lottery tickets) he has and more are his chances to produce new blocks and collect the reward. An attacker who wants to execute a fraudulent transaction will need more than 50% of the coins to change the transactions up to the first block. Buying so many coins will cause prices to rise, which makes this attempt at attack very expensive.

The POS system was developed for the first time in Nxt. Being a less energy consuming system, even the reward of the block is generally lower than Bitcoin’s. Thus, POS systems are suitable for platforms with a fixed-emission and without an inflationary system (the block’s reward does not decrease). Member remuneration consists only of commissions for transactions. This is the approach used by most of the platforms, funded with crowdsale of tokens, allocated proportionally to the investors, where a further emission of coins does not appeal to investors as it tends to dilute their shares.

Currently, the Proof of Stake (POS) – is a well-established mechanism to reach consensus, but it’s not often used in its original form. Some advantages are provided by two of its two variants: LPoS and DPoS.

3. LEASED PROOF OF STAKE (LPOS)

In the classic PoS scheme, members of the network with very low balances probably will not be able to add new blocks to the blockchain – just as small miners with low hashrates rarely find blocks. It may take many years before a small participant is lucky enough to create a block. This means that many members of the network with a small balances have no active nodes and allow a limited number of larger participants to manage the network. As network security increases with the number of participants, it is important to encourage the participation of small members (increase the decentralization of the network).

The LPoS mechanism allows small participants to lease their coins to larger nodes. The small participants maintain full control of the coins they own and can transfer them or spend them at any time (ending the lease). The rented coins increase the “weight” of the larger network node, increasing the probability of receiving the reward of the new block (system used by the Waves platform). The system is similar to what happens with pool mining: if aminer has not enough power to do solo mining it joins a pool that wins the blocks and redistributes the rewards based on the hash contributed to the pool.

4. DELEGATED PROOF OF STAKE (DPOS)

BitShares and several other platforms use a slightly different approach. With DPoS, holders use their coins to select a list of nodes that will partecipate in creation of new blocks to add them to the blockchain. This involves all coin holders in the formation of the network, even though they may not receive direct remuneration, as in the case of LPoS. Coin holders can also vote to change some parameters of the network, which increases their influence on the network.

5. PROOF OF IMPORTANCE (POI)

Another mechanism for reaching consensus is the PoI. NEM has become the first cryptocurrency platform that implemented this method. In the case of the PoI, it does not count only the number of coins held by investor running the node. The NEM consensus building system is based on the idea that active behavior must be rewarded rather than a mere possession. The probability of creating a block depends on a number of factors, including balance, number of transactions entering and exiting the node and other features: a multi-factor reputation system rewards the “useful” member of the network.

There are infinite variations of this two basic approaches: PoW w PoS. Different coins like the Dash combine these two systems by rewarding both coin holders who keep the masternodes online and also rewards the miners.

In all cases, the goal of the consensus-building mechanism is to ensure network security, through an economic model: the attack on the network must be too expensive while its protection and decentralization must be incentivized.

Sort:  

thanks for the link to the original post on my site ))

Coin Marketplace

STEEM 0.20
TRX 0.18
JST 0.031
BTC 87237.56
ETH 3192.65
USDT 1.00
SBD 2.94