From "non-mainstream" to mainstream: PoS consensus evolution | PoS series (2)

Staking: New wave of mining under the PoS era | PoS series (1)

As we all know, the blockchain is essentially a distributed ledger technology. How to keep the consistency of the books at the same time for multiple nodes participating in the bookkeeping is one of the core issues of the blockchain. Different public chains will adopt different consensus mechanisms. To solve this problem, the commonality of the existing mainstream consensus mechanisms is that their goal is to be able to randomly select the blockers , so that they have the right to write and out of the block.

Let’s review the PoW mechanism first.

The PoW consensus mechanism represented by Bitcoin uses the unpredictability of the hash function calculation. This unpredictability requires the miner to constantly try to solve the given mathematical problem, and the correct probability of calculation is completely random. It provides a good guarantee for random blockout, and each blockper needs a lot of computational workload, which is also the origin of the PoW (workload proof) name. However, as more and more computing power is involved in mining, the computing power required to dig up new blocks is getting higher and higher, and its expensive mining equipment and large consumption of electricity are often criticized. Moreover, in order to recover the hardware and electricity costs, the miners usually sell the bitcoin that is dug out on the exchange immediately, so that the identity of the miners and the holders is not large, and the conflict of interests between them also affects the ecological development of the community. unfavorable.

The birth of the PoS mechanism

In the PoW mechanism, the probability of blockout is related to the magnitude of the calculated power. Later, the author tries to use the currency to replace the calculated power as the basis for the proof. The research all points to a problem: we can reach PoW without consuming material resources. Security level? In 2011, the concept of Proof of Stake was first proposed by a netizen named Quantum Mechanic at the famous bitcoin community Bitcointalk Forum. The article predictively proposes a number of solutions that are still in use today, such as the substitution of the weight of the currency, the entrusted equity, the reward distribution, and so on.

The first to apply the idea of ​​the PoS mechanism to the actual blockchain project is the Peercoin , which is designed by SunnyKing (the name of the web, its true mystery ) . Since 2011, Quantum Mechanic proposed PoS to SunnyKing in 2012. After more than a year of implementation in August, Peercoin's market value once reached the third place in the market value of all cryptocurrencies, second only to Bitcoin and Litecoin, but lacked investment support and lacked resources for further development. After that, the market value of Peercoin plummeted. In the following 2013-2015, cryptocurrencies using PoS mechanisms such as Nxt, Blackcoin, and Shadowcoin appeared one after another, but they all disappeared into view.

Summarize the problems of these projects. First, the technology of PoS has not yet developed comprehensively. These projects are in the early stage of exploration. The effect of the public chain operation is not up to expectations. Second, the incentive ratio of PoS miners is not set, 1%~2% per year. The increase rate cannot cover the operating cost of the miners. In addition to the rising price of the project when the project was launched, it attracted a large number of miners to enter the market. However, the price of the coins was stable and even suffered a bear market and plummeted. The miners could not see the profits leaving the market. The value has also fallen sharply.

Delegate: Solve random problems and increase staking ratio

The article mentioned at the beginning that the goal of the consensus mechanism is to randomly select the next blocker, and the early PoS mechanism does not solve this problem well. They often use a parameter in the blockchain that changes with the behavior of the person. (such as the hash value of the previous block) as a random seed, and then generate a pseudo-random number based on this random seed, which makes it possible for the random number to be predicted or even manipulated. In December 2013, BM (Daniel Larimer) first discussed in the forum that the currency holder could choose a blocker by equity vote to solve the random problem, because the majority of the voting results were indeed an unpredictable human behavior event. . This mechanism, which allows the holder to pledge and vote for tokens to the professional node in the form of token pledge, is called DPoS (Delegate Proof of Stake) . BM then applied it to the Bitshares project to build a graphene platform for the DPoS architecture. This graphene technology became the general underlying layer of the DPoS mechanism. The two subsequent projects of BM were Steemit, EOS, and LOOM. All projects are based on the graphene platform to build the DPoS public chain.

EOS, Tron and other DPoS public chains are all equipped with a fixed number of super nodes. Only the number of votes is ranked first and the super node is elected to have the right to block. Although the holder of the vote is theoretically a random process, it also breeds the canvassing. The phenomenon of bribery and other issues, while the voting state is determined, the super nodes of this type of DPoS public chain will rotate the block in a fixed order, rather than randomly. The degree of decentralization of this type of public chain is therefore highly controversial.

Another development direction of the DPoS mechanism is to retain the mechanism kernel that the guarantor pledges and delegates to the node, but does not limit the number of nodes, and at the same time, the node is still randomly selected according to the equity ratio each time the block is sent out. New projects like Tezos, Wanchain, and popular projects like Cosmos have become a requirement for their nodes to meet the public chain settings, but there are no restrictions on the number of nodes. Generally, a certain number of tokens are required to be pledge and the nodes are running. The computer configuration is fine. Due to the existence of the mechanism of entrustment/authorization, the holders who do not have sufficient tokens or lack of stable operating node conditions can also participate in mining and receive dividends through staking. Therefore, the mechanism of DPoS greatly improves the staking ratio of the whole network. The public chain has reached 80% or even 90%. Compared with the PoS public chain of the previous era, it has undoubtedly made great progress, which has greatly improved the safety of the public chain.

Most PoS public chains are aware of the incentive effect of staking dividends on the holders. Therefore, new projects often have strict distribution ratios and distribution rules built into the mechanism, such as Tezos and SunnyKing's latest fencing project V System. In the past, DPoS projects relied on nodes to promise a dividend payout ratio.

The application of academic "fun": BFT+PoS

The Byzantine Fault Tolerant Algorithm (BFT) is derived from the Byzantine General in 1982. It is essentially a problem of implementing distributed protocols in a compromised communication network . In the Internet era, only fault tolerance is needed. Therefore, the BFT algorithm has no effect. It was not known to the outside world, until Satoshi Nakamoto designed it in the blockchain program. The first application in the PoS public chain environment is the Tendermint algorithm proposed by Jae Kwon. Surprisingly, the BFT algorithm and the PoS mechanism seem to show excellent phase. BFT fault tolerance can bring considerable benefits to the distributed network. The ability to resist risks and the emphasis on network consistency make the block confirmation final deterministic, resulting in faster block confirmation speed and solving the fork problem. If pure PoS only solves energy consumption compared to PoW, then BFT+PoS further solves PoW's transaction confirmation, transaction fork, and low performance compared with pure PoS, and the leap is not negligible. After all, compared to the development time of the blockchain in just ten years, the security of the BFT algorithm has been studied for 30 years .

Although the BFT+PoS hybrid consensus mechanism was proposed in 2014, it was implemented late on mainstream projects. In 2018, EOS upgraded its consensus mechanism in the latest version of the white paper, from DPoS to BFT+DPoS, one month. After the Tezos class BFT + PoS mechanism is also online, and the EPC is most likely to choose the PoS mechanism – the CFFG algorithm led by Vitalik Buterin, also applied the idea of ​​BFT + PoS, and the creation of Tendermint's proponent Jae Kwon The main Cosmos network was also launched in 2019, and the GRANDPA consensus of another upcoming cross-chain project, Polkadot, was also confirmed as the BFT+PoS consensus. Although the implementation time is relatively late, but the project of applying BFT+PoS mechanism in the past two years has shown a blowout trend, and there are many popular star projects, so the BFT+PoS consensus mechanism is expected to become a popular mechanism in the next few years.

The way ahead: safer and more efficient

The performance of the public chain is mainly measured by three aspects: security, high efficiency and decentralization . EOS before the upgrade of the consensus mechanism is considered to sacrifice the degree of decentralization and improve the efficiency. Therefore, it is impossible to achieve high performance in three aspects. The "impossible triangle" theory, but after the consensus mechanism is upgraded to BFT+DPoS, and other BFT+PoS projects are launched, the degree of decentralization of the DPoS public chain is gradually improved, and the mechanism is gradually improved. The focus of the future development of the PoS mechanism will be to continue to improve safety and efficiency on the basis of ensuring decentralization.

The degree of security mainly includes two aspects, one is the degree of randomness chosen by the blocker, and the other is the degree of participation in block verification. Although the DPoS mechanism and the random number algorithm partially solve the random problem, the real random number generation is still a challenge that is almost impossible to complete. Therefore, the existing random selection nodes are still often suspected to be pseudo-random and have security risks. Cardano, the second-largest PoS public chain project with the market capitalization, is now working on solving the random number problem. The created Ouroboros consensus algorithm is considered to be the first equity certification agreement with scientific credentials for its security. The Algorand protocol proposed by Prof. Silvio Micali and the collaborators of the Department of Mechanical Engineering and Computer Science at MIT applied a new Byzantine consensus agreement, which proves that each round of voting certifiers is randomly selected and is more random than previous PoS consensus. Unpredictable, it is more difficult to manipulate. This is the development of the PoS consensus on randomness.

In the participation of block verification, most of the projects attract high-yield to attract the community to participate in staking, and some new projects have been specially designed in the system and mechanism, such as making voting more convenient and the dividend rules more detailed and transparent. Cosmos designed the annual net increase rate of 22% when the staking ratio of the whole network is less than 2/3, and the annual increase rate is 7% when it is higher than 2/3, which encourages the holders to participate in staking, and the total staking ratio of the whole network reaches 74. %, which guarantees the stable operation of Cosmos.

Cosmos token price and staking annual yield

Chart source: stakingrewards.com

In terms of performance, EOS can now do 500ms out of the block, and because it will not be forked, the block will be confirmed, instead of waiting for 6 blocks, such as bitcoin, to confirm the transaction, the performance is extremely Earth improvement. For the future cross-chain ecosystem, the current cross-chain projects Cosmos and Polkadot also use the BFT+PoS consensus as a cross-chain infrastructure. The PoS project undoubtedly has better performance than the PoW project, and with the continuous development of the BFT algorithm and network communication technology, the performance will be further improved.

Author: Rudy