As a part of the crypto space, you must have heard of Proof-of-Stake and Proof-of-Work consensus mechanisms. So what are these 2 mechanisms, what do they do and how do they work? Let's find out in this article!
Basically, Proof-of-Work is used to determine how blockchain reach consensus. In other words, how can the network determine if a transaction is valid or if someone is trying to cheat, such as the same amount but spending it twice?
Cryptography uses mathematical equations that are so difficult that only powerful computers can solve them. No two equations are the same, and when it is solved, the network is lazy to know that the transaction has been validated.
So many, so much blockchain different copied the code Bitcoin original, so it also uses the Proof-of-Work mechanism. While Proof-of-Work is a great invention, very cool. But it's not perfect! Not only does it require a significant amount of electricity, but it also limits the number of transactions that can be verified at the same time.
So, other consensus mechanisms were created, one of the brightest ones being Proof-of-Stake. Proof-of-Stake was first created in 2012 by two developers Scott Nadal and Sunny King. At the time of their debut, the two argued that Bitcoin and Proof-of-Work requires about $150,000 in daily electricity costs.
To date, this amount has grown to millions of dollars. I will go into more detail below.
Besides me, the first blockchain project to use the Proof-of-Stake mechanism is Peercoin. The original intention was a more fair and equitable mining system, scalable and less dependent transactions.
Therefore, the 2nd most popular cryptocurrency Ethereum, is in the process of moving from Proof-of-Work to Proof-of-Stake. It is not clear when Ethereum can transform completely, but the development team is trying to achieve this as quickly as possible.
Here are the basics. The next part is to look at which mechanism blockchains are adopting.
Blockchain application PoW VS PoS
First, we will talk about The first blockchain to adopt Proof-of-Work, it's Bitcoin. Every time a transaction is sent, it takes about 10 minutes for the network to confirm. Furthermore, the Bitcoin blockchain can only process about 7 transactions per day.
This has resulted in a significant increase in transaction fees compared to when the project first started in 2009. For example, Bitcoin fees are only a tiny fraction of a USD cent. However, as the chart below shows, this number increased to 40 USD per transaction at the peak of December 2017!
Although fees have since been reduced, it is still too high to be a global payment system. The biggest reason for this is the limitation of Proof-of-Work.
Second largest cryptocurrency, Ethereum, which also uses Proof-of-Work. Interestingly, the development team has changed a few things from the original code, allowing transaction processing in just 16 seconds. While still not the fastest, it is a huge improvement over Bitcoin's 10 minutes.
However, Ethereum also suffers from the scaling problem that Proof-of-Work poses to Bitcoin. The Ethereum blockchain can handle up to 15 transactions, much lower than the network's needs. Although the Ethereum blockchain has yet to adopt Proof-of-Stake, it is expected that the day this becomes a reality, the number of transactions will increase to thousands per second.
Like Ethereum, other blockchains also use a variation of Proof-of-Work by changing the algorithm that supports the transaction validation process. Those are Bitcoin Cash and Litecoin.
On the other hand, some cryptocurrencies use the Proof-of-Stake mechanism. One of them is DASH, which allows users to send and receive money in seconds.
Another famous blockchain that uses the Proof-of-Stake model is ANCHOR. Smart contract protocol (smart contract) of China has had an incredible journey since its initial launch in 2016 when the value increased by 100,000%.
Now you know which blockchain uses Proof-of-Work and which blockchain uses Proof-of-Stake. The next section will show how transactions are authenticated by these two mechanisms. Let's get started with Proof-of-Work!
How does Proof-of-Work verify transactions?
As you know Bitcoin, Ethereum and many other blockchains use Proof-of-Work mechanism. I will use Bitcoin for the example below. However, this verification process is similar for other Proof-of-Work blockchains.
NS Bitcoin transaction it takes 10 minutes for valid verification. So that means during those 10 minutes, something called a "block" is created.
Each block contains different transactions within it, each of which must be independently verified. In order for the Bitcoin network to perform authentication without a third party, a cryptographic algorithm, also known as Proof-of-Work, must be solved.
Once solved, not only is the transaction verified as valid, but it is also updated to the public blockchain for all to see. Surely you are wondering who would buy hardware and spend so much electricity just to help users confirm Bitcoin transactions?
The answer is simple, it's because they will get Bitcoins for this work. But not all decoders receive the reward. There are thousands of devices competing to be the first to solve the cryptographic algorithm. Whoever gets to the finish line first gets the prize.
One of the biggest problems of Proof-of-Work is that it is not a fair system because those with the most powerful and expensive equipment will always have the best chance of winning the reward.
Then, because of the way the cryptographic algorithm is created, the only way to solve it is to try until you find the right answer. I will describe it simply as follows:
- The answer to the Proof-of-Work problem is 5+7
- The answer is 12
- Whoever gives the correct answer first gets a reward.
- Miner 1 and Miner 2 compete to solve this problem.
- 1st attempt: 5 + 7 = 10 => false
- Second try: 5 + 7 = 13 => false
- 3rd attempt: 5 + 7 = 9 => false
- 1st attempt: 5 + 7 = 17 => false
- Second try: 5 + 7 = 8 => wrong
- 3rd attempt: 5 + 7 = 12 => true
So, miner B gave the correct answer to the encryption problem on the 3rd attempt and received a reward for this. In fact, the computer can try millions of different tests per second and this requires a large amount of power.
In general, the more powerful the hardware or the more hardware devices there are, the better the chances of solving the puzzle first. And so it's not a fair mechanism.
Although most Proof-of-Work models operate according to the example, there are some blockchains that use a slightly different process. However, we only need to understand in the simplest way.
So you already know how Proof-of-Work blockchains like Bitcoin, Ethereum work. Next we will learn how Proof-of-Stake works.
How does Proof-of-Stake verify transactions?
The Proof-of-Stake mechanism uses a different process to confirm transactions and reach consensus. The system still uses the cryptographic algorithm, but the goal of the mechanism is different.
Nếu Proof-of-Work thưởng cho người giải được phương trình phức tạp thì với Proof-of-Stake, một người bất kỳ có thể khai thác hoặc xác nhận các giao dịch bằng cách khóa một số tiền nhất định để làm ‘tiền cọc’ trong hệ thống. ‘Tiền cọc’ càng nhiều thì càng khai thác được nhiều.
Tuy nhiên, những người ‘cọc’ tiền vào blockchain không đào coin về mặt kỹ thuật và họ không nhận được phần thưởng từ việc tạo khối. Nếu Bitcoin sử dụng cơ chế Proof-of-Work và trao phần thưởng cho mỗi khối được xác minh, thì những người đóng hóp vào hệ thống Proof-of-Stake chỉ đơn giản là nhận được phí giao dịch.
Let's find out how Proof-of-Stake verifies transactions.
First, to validate a transaction, users have to put their coins into a specific wallet. This wallet will freeze the progress and use it to verify the network. Most Proof-of-Stake blockchains require a minimum amount of progress in order to function. This requires the project to have a large investment before starting.
For example, to validate DASH transactions, you will have to lock a minimum of 1000 DASH into the system. If calculated at the time DASH reached ATH in December 2017 when trading more than 1500 USD, the value of 1000 DASH is about 1.5 million USD.
- You lock coins to receive rewards from Proof-of-Stake.
- The blockchain has a total of 1000 coins in circulation.
- Bạn mua và ‘cọc’ 100 coin.
- Điều này nghĩa là bạn ‘cọc’ 10% tổng số tiền đang lưu hành.
- So you will get 10% total reward.
- Proof-of-Work requires ALL miners to try to solve a complex problem, but only the fastest one gets the reward.
- Proof-of-Stake trao giải thưởng dựa trên số tiền mà một người ‘cọc’ vào hệ thống.
Điều kiện quan trọng nhất của cơ chế Proof-of-Stake là những người tham gia phải giữ an toàn cho mạng lưới. Nếu có một kẻ tấn công mạng hoặc gửi các giao dịch độc hại thì họ sẽ mất toàn bộ số ‘tiền cọc’.
You now understand how consensus mechanisms work and confirm transactions. Next, I will explain why Proof-of-Stake is more optimal than Proof-of-Work.
Why is Proof-of-Stake better than Proof-of-Work?
Centralization - Centralization
Remember that with Proof-of-Work, the owner of the most powerful hardware will have the most chances of getting rewarded.
Điều này khiến cho các nhóm tổ chức mua hàng nghìn thiết bị (được gọi là ASIC) để tạo ra sức mạnh khai thác cao nhất. Họ được gọi là ‘nhóm khai thác’ và gộp tài nguyên lại để có nhiều cơ hội thắng được phần thưởng.
As a result, there are 4 mining pools that control over 20% of total Bitcoin mining capacity (most are located in China because of cheap electricity).
This mechanism is not fair because it does not allow an individual to receive a reward from mining. In contrast, Proof-of-Stake prevents a group of people from joining forces to dominate the network for profit. Those who contribute to the network will all receive rewards in proportion to the amount they invest.
It was mentioned at the beginning of the article that Proof-of-Work blockchains like Bitcoin use a huge amount of electricity. The reason is that the total number of transactions that miners have to verify is very large.
A recent report shows that the total amount of electricity needed to keep the Bitcoin network running is more than the electricity of 159 countries combined.
Not only is this bad for the environment, but it also causes cryptocurrency to be rejected because electricity bills are paid in fiat!
Meanwhile, Proof-of-Stake does not need to solve difficult algorithms, meaning electricity costs will be significantly lower.
51% Attack describes a case where a group of people or individuals holds more than 50% total mining power. If this were to happen on the Bitcoin blockchain, that group of people or individuals could change a block in the chain to their advantage.
For example, the 51% attack that happened recently in the Verge blockchain. A hacker stole 35 million XVG. At that time, the value of this coin amounted to 1.75 million USD.
The Proof-of-Stake mechanism can completely neutralize the 51% attack. To do this, the hacker must own at least 51% of the total number of cryptocurrencies circulating on that blockchain. And there is no other way to own but buy.
Nếu người đó quyết định mua một lượng tiền lớn như vậy, thì giá trị thực của đồng tiền đó sẽ tăng lên theo thời gian. Kết quả là họ sẽ chi tiêu nhiều hơn số tiền thu được từ cuộc tấn công. Không những vậy, khi những người khác trong mạng lưới phát hiện ra điều này, kẻ xấu sẽ mất tất cả tiền ‘cọc’.
Now, you understand why Proof-of-Stake is better than Proof-of-Work. Next will discuss whether there are any disadvantages to using Proof-of-Stake.
Disadvantages of Proof-of-Stake
The first issue to discuss is that Proof-of-Stake helps the rich get richer. The more coins you buy and lock, the more coins you will receive.
That is, if you meet the minimum wagering requirement (which most others don't) you're guaranteed a very good return on investment. Those who own more will receive more, and the rich will get richer.
Proof-of-Work also won't fix this as miners will have to buy a lot of expensive ASIC equipment.
The second problem is that Proof-of-Stake allows anyone to verify transactions on multiple blockchains, which Proof-of-Work does not. This allows the hacker to perform a double-spend attack.
That is, when one person transfers money to another, but before the transaction is confirmed, they once again use that money to make another transaction. Usually, this behavior will be suppressed when other miners detect it. Furthermore, Proof-of-Work only allows devices to mine on a blockchain, frauds will not be accepted.
But Proof-of-Stake, participants do not lose any money to mine on multiple chains, so the person will make 2 transactions on the same amount.
In fact, Proof-of-Stake and Proof-of-Work have always been controversial topics. However, it is still possible to see which mechanism is preferred by Ethereum being changed from Proof-of-Work to Proof-of-Stake.
Proof-of-Work is a mechanism for mining Bitcoin, Ethereum, DASH and some other cryptocurrencies. However, this mechanism has many limitations in terms of power consumption, resource concentration from mining pools, and the threat of 51% attack.
Proof-of-Stake solved some of those problems. However, as blockchain technology becomes more advanced, more optimal consensus algorithms will appear. All have their own advantages and disadvantages.