CertiK Dry Goods Sharing | A comprehensive and detailed explanation of the proof-of-work mechanism (PoW) and the proof-of-stake mechanism (PoS)
Consensus mechanism is a vocabulary we often hear after understanding blockchain.
But if you chat with your friends and talk about PoW and PoS, then your friends may be like this:
On the one hand, as a consensus mechanism that can also guarantee the security of the blockchain network and has the function of verifying transactions, they can use transactions that comply with network rules to update the ledger, and miners can also obtain mining rewards through these two consensus mechanisms.
On the other hand, as different consensus mechanisms, it is reasonable to have their own efficiency and trade-offs.
Therefore, when Ethereum plans to transition from PoW to PoS, and Bitcoin produces different energy consumption due to the two mechanisms, the two argue for each other's advantages and disadvantages, and the debate intensifies.
secondary title
double spend
If a woman married a married man without her knowledge, the man would have launched a "double spend attack" - pretending to be unmarried and marrying two wives.
Double spending, aka double spending, is a major obstacle to a functional digital currency network.
For actual payment, there is a saying called "pay with one hand, deliver with one hand", but for digital currency, if the network environment it is in is not safe, then it is completely possible to "pretend to pay with one hand, and deliver with one hand". ".
For example, Zhang San wants to exchange a lollipop for Li Si’s apartment. If there is no consensus mechanism, no one can prove whether Li Si agrees to the transaction, and no one can prove whether the transaction is completed.
Fortunately, Adam Back with HashCash, Wei Dai with B-Money, Nick Szabo with Bit Gold -- Different approaches to this problem are provided.
Then in 2008, Satoshi Nakamoto extended the above achievements in the Bitcoin white paper and proposed a real solution: Proof of Work (PoW). In just 12 years, Bitcoin has become the leading digital currency, with assets reaching trillions. As the world's first trillion-dollar company, Apple, it took 42 years to reach this milestone.
secondary title
Proof of Work (PoW)
PoW is easy to explain, in fact, it is distributed according to work like our daily work.
It mathematically requires miners to support their decisions about the state of the network with verifiable work, thereby avoiding arbitrary and harmful updates.
secondary title
Advantages of PoW
The biggest advantage of PoW is its security, and it is also the basis for the decentralization of Bitcoin and other PoW chains.
Miners must invest real resources (in the form of computing hardware and electricity, etc.), so anyone needs to obtain more than half of the computing power of the network to achieve malicious attacks (51% attacks).
Although PoW is gradually unable to cover all needs in the face of increasingly severe energy depletion, it is still one of the main mechanisms to secure and secure transactions of trillions of dollars.
Through PoW, everyone can mine, and even before the emergence of professional miners, everyone can mine Bitcoin at home.
secondary title
Disadvantages of PoW
On the one hand, PoW cannot actually prevent 51% attacks, it just makes the cost of attacks very high, so small networks with low hash values have gradually become victims of such attacks.
On the other hand, the energy loss of PoW has always been the reason why it has been widely criticized.
A mine operates tens of thousands of mining equipment, which consumes a lot of electrical energy in the real world. The current world has entered a stage of harmony with nature, and the ESG (environmental, social and governance) effect of investment is the first consideration of many institutions.
There have been many headlines proclaiming that Bitcoin uses more energy per year than the entire country of Norway consumes in one year.
Interestingly, though, Christmas lights in December in the United States sometimes consume more electricity than countries like El Salvador and Indonesia use in a year.
secondary title
Proof of Stake (PoS)
PoS emerged as an alternative consensus mechanism to PoW because of the intensifying energy debate.
PoW stipulates that miners do not need to hold the tokens they mine, but PoS requires that the tokens must be held and pledged to the block network to obtain rewards based on the total amount. That is, the more tokens you hold and the longer the time, the more rewards you can get.
secondary title
Advantages of PoS
It is obvious that the problem of excessive energy consumption has been solved after mining does not exist.
Therefore, Ethereum quickly changed its mechanism from PoW to PoS, and it is estimated that this change will reduce the network energy consumption of Ethereum by 99%.
The sharding technology, which is an expansion solution that greatly increases the throughput of the Ethereum base chain, also requires the support of the PoS mechanism.
At the same time, a smartphone can meet the requirements of PoS, and does not require professional hardware like PoW, such as ASIC (application-specific integrated circuit), which will soon be eliminated and is very expensive.
secondary title
Disadvantages of PoS
Just like the miner with the highest computing power can package blocks the fastest to get rewards, in PoS, the verifier with the most pledged tokens can also get verification qualifications to get rewards the fastest. This will lead to "the rich get richer and the poor get poorer".
Therefore, PoS cannot solve the centralization problem in the PoW network.
Even more difficult to solve is the fork problem.
The PoS mechanism will inevitably lead to costless benefits, resulting in frequent forks. For PoW, even if a miner invests all his computing power in the new forked chain, it is difficult for new miners to join, because the income of a stable and large chain will be more considerable and safer.
write at the end
write at the end
Both consensus mechanisms are actually viable ways to verify transactions.
In comparison, PoW is perfect on the Bitcoin network. It uses real resources to support the issuance of Bitcoin through a mathematical consensus mechanism, while PoS is more economical and reduces energy consumption.
As the second largest digital currency, Ethereum chooses to change from the PoW mechanism to the PoS mechanism, which will be a major test of the consensus mechanism.
Blockchain networks have different application scenarios and goals, so different blockchain systems use different consensus algorithms to help further improve this field.
In the future, there may be a new consensus mechanism that combines the advantages of PoW and PoS. At that time, the blockchain will usher in another leap forward.


