A comparison of two blockchain consensus algorithms
Intro
The (PoW) proof of work consensus is the most used algorithm in blockchain technology. Two of the most known crypto, Ether and Bitcoin, use this algorithm. In future roadmap plans, Ether will transition over to (PoS) proof of stake algorithm, which has spiked a big debate in the crypto universe. Crypto enthusiasts are eager to know which of these algorithms is better than the other.
In this article, we will be talking about proof of work, proof of stake, and the differences between them. Finally, we will conclude on a note which is better and in what aspects.
Importance of blockchain consensus
The two primary points of blockchain are decentralization and immutable records. Blockchain is a distributed database on computers called nodes. Each node has the same record, making it almost impossible to maliciously change the database as all other nodes have a copy.
All nodes contain complete ledgers which are open to everyone. This open ledger nature of blockchain makes it virtually difficult to add any wrong entries. There are so many nodes that even if someone wanted to maliciously add a wrong entry, they would have to update all the nodes, which is not possible without going through the correct procedure.
Block records, called ‘blocks,’ are associated through a protocol program, and no existing block can be modified or deleted. Adding a new block is the only method to update the blockchain, which can be done without any central entity.
If a node defines the predefined standards and creates a block other than the node, then a dispute can arise in the community. The community can choose a hard fork and take away the state of the network, but frequent hard forks negatively impact the network stability.
Another concern is overpowering other nodes via (DDoS) distributed denial of service. Such false nodes can trigger wrong actions like double payments.
Here the consensus mechanism comes in, which is necessary to protect against such malicious attacks.
PoW Algorithm
PoW was first conceptualized by Cynthia Dwork and Moni Naor in 1993. One of the most famous implementations of PoW is Bitcoin.
The transactions in Bitcoin are grouped in a memory pool called mempool while a block is created every 10 minutes. Each transaction in the mempool requires verification, and here miners come in. The process of verifying transactions is called mining.
The Bitcoin user provides the transaction details to the miner, who will verify and add to the block. To do this, the miner needs to know the cryptographic hash value of the last recorded block. To find this hash, each miner competes in a race to solve complex algorithms, and the first one to solve it is rewarded with the hash value of the last block and some fraction of bitcoin as an incentive.
After finding the hash of the last recorded block, the miner announces it to the network for the other nodes to verify and creates a new block with the transactions in the mempool post verification. Other nodes can verify this faster as they can see proof of the massive crunching done.
To carry out a DDoS attack, the attacker would need 51% of total computing power, which is extremely expensive and not worth it. This way, PoW makes blockchain very safe and secure.
As complex mathematical problems get harder and harder, the miner has to continuously upgrade their hardware, which strains electrical energy. Yet, centralized mining rigs are dominating this space which goes against the decentralized nature of Bitcoin.
PoS Algorithm
In proof of stake, the set of nodes stake their own cryptocurrencies to validate the transactions. They are called stakers. The transaction validation responsibility is directly proportional to the amount of stake and the duration of stake.
All the cryptocurrencies in this network are already created, eliminating the need to solve advanced mathematical problems. This transaction validation process is called forging. The pros include no requirement to constantly upgrade hardware and no soaring electrical bills.
Unlike PoW, there is no need for the entire network to be involved in the validation process, which improves scalability. Sharding is another technology implemented due to PoS. Sharding is a concept from database management. It means storing horizontal portions of the Bitcoin network in a separate group of nodes. No single node can see the entire network, and this is why Sharding can’t be implemented in PoW.
Final Words: PoW vs PoS
PoW is the most used algorithm used in many cryptocurrencies. The wide use of PoW proves its reliability, especially against DDoS attacks, but it does come with cons. The surging electrical bills, the continual need to upgrade hardware, and most importantly, the adverse effect on the environment. This makes it extremely secure now but unviable in the long run.
On the other hand, PoS provides a means of a more scalable blockchain with higher transaction throughput. Very few projects have adopted this, but eventually, all projects will shift to it unless a better protocol arrives. As of now, PoS is less secure than PoW.
If the expected implementation of PoS on Ether goes well, the rest of the crypto space will get confidence in the reliability of PoS to keep networks safe. This successful implementation will go in major favor of PoS. Only time will tell which of these algorithms succeed each other.
About SpiderDAO:
SpiderVPN provides a decentralized router-based VPN service for its users by using a dual-governance model which brings together hardware and software tools with on-chain elements. The team aims to build a new set of standards for Decentralized Autonomous Organisations to counteract the unfair distribution of voting power. Combining hardware safeguards and leveraging the Polkadot consensus mechanism, SpiderDAO establishes a whale-resistant mechanism whilst creating a highly scalable, interoperable and stable governance system
Reach SpiderDAO on: