Blockchain Blog 15: Blockchain Consensus Protocols
Blockchain is the core technology of many cryptocurrencies. Blockchain as a distributed ledger technology has received extensive research attention. In addition to cryptography and P2P (peer-to-peer) technology, consensus protocols are also a fundamental part of blockchain technology. A good consensus protocol can guarantee the fault tolerance and security of the blockchain systems.
Blockchain first appeared in Nakamoto’s Bitcoin white paper that describes a new decentralized cryptocurrency. Bitcoin takes blockchain technology to the extreme and attracts people’s wide attention. Afterward, many cryptocurrencies and projects based on the blockchain spring up. Blockchain thus has become a hot topic. Interestingly, the technology adopted by the blockchain is not new. Blockchain simply combines cryptography, distributed system technology, peer-to-peer networking technology, and other well-known technologies. Besides, blockchain also provides a secure framework for cryptocurrencies, in which anyone cannot tamper with the content of transactions and all the nodes participate in transactions anonymously. For this reason, blockchain technology can be widely used in various fields, e.g., financial field, medical systems, supply chain, and Internet of Things (IoT).
However, in the process of applying the blockchain technology, there will be many challenges and issues, among which how to design an appropriate consensus protocol is a big issue. The consensus of blockchain is that all nodes maintain the same distributed ledger. In traditional software architecture, the consensus is hardly a problem due to the existence of the center server, hence the other nodes only need to be aligned with the server. However, in a distributed network such as blockchain, each node is both a host and a server, and it needs to exchange information with other nodes to reach a consensus. Sometimes some nodes will be down or offline, and there will also be some malicious nodes, which will seriously affect or destroy the process of consensus. Therefore, an excellent consensus protocol can tolerate the occurrence of these phenomena and minimize the harm so as not to affect the final consensus result. In addition, the consensus protocol adopted by the system also needs to be suitable for the blockchain type used by the system. There are three basic types of blockchain: public blockchain, consortium blockchain and private blockchain. Each type of blockchain has different application scenarios. The adopted consensus protocol thus needs to fit the demands of specific application scenario. In this paper, we introduce some main consensus protocols of blockchain and analyze their performance and application scenarios.
In distributed systems, there is no perfect consensus protocol. The consensus protocol needs to make a trade-off among consistency, availability and partition fault tolerance. Besides, the consensus protocol also needs to address Byzantine Generals Problem that there will be some malicious nodes deliberately undermining the consensus process. In this section, we make a detailed description of some popular blockchain consensus protocols that can effectively address the Byzantine Generals Problem.
PoW (Proof of Work):
PoW is adopted by Bitcoin, Ethereum, etc. PoW selects one node to create a new block in each round of consensus by computational power competition. In the competition, the participating nodes need to solve a cryptographic puzzle. The node that first addresses the puzzle can have a right to create a new block. It is very difficult to solve a PoW puzzle. Nodes need to keep adjusting the value of nonce to get the correct answer, which requires much computational power. It is feasible for a malicious attacker to overthrow one block in a chain, but as the valid blocks in the chain increase, the workload is also accumulated, therefore overthrowing a long chain requires a huge amount of computational power. PoW belongs to the probabilistic-finality consensus protocols since it guarantees eventual consistency.
Decentralized blockchain networks rely on systems called consensus mechanisms to process transactions and authenticate information. Cryptocurrencies such as Bitcoin and Ethereum utilize a consensus mechanism called Proof of Work (PoW), commonly known as mining. Proof of Work systems utilizes large amounts of processing power that is generated from mining to process transactions and prevent double spending. Some of the issues and major complaints of PoW systems are in regards to these extreme power requirements, which may not always come from renewable and environmentally friendly sources.
Downsides of Crypto Mining
Expensive initial investment: The high costs of computer hardware and other physical costs (facilities, management, etc.) act as a deterrent and barrier for entry into the crypto mining space. Many critique mining practices as a way to reserve power and control over processing transactions for a handful of people.
High energy costs: Some argue that mining processes (such as Bitcoin mining) have too extreme of energy costs. Some energy consumption trackers show that mining consumes about 77.78 terawatt-hours per year. This figure is comparable to the total energy consumption of entire countries such as the Netherlands
Carbon Footprint: Much criticism is relayed on crypto mining towards it’s reliance on electricity generated by fossil fuels. Many large crypto mining facilities are known to use coal and other ”unclean” sources of fuel. Studies in 2019 have estimated that Bitcoin mining generated between 22–23 million metric tons of carbon dioxide emissions per year.
PoS (Proof of Stake):
While PoW based blockchains have been running successfully for years, many experts find mining-based systems to be inefficient when it comes to network scalability and energy efficiency. New approaches to decentralized consensus mechanisms have led to the creation of Proof of Stake (PoS) or simply staking. PoS has a similar purpose to PoW systems where a network participant is selected to add the newest block of transactions to the blockchain and receive a reward. Instead of “mining” to solve puzzles for rewards, participants can choose to lock in (or ”stake”) their coins into the network (their stake in the network) and periodically receive rewards for helping secure the network and process transactions.
In PoS, selecting each round of nodes, that who creates a new block depends on the held stake rather than the computational power. Although nodes still need to solve a SHA256 puzzle:
PoS systems differ from PoW in that instead of using computing hardware to process transactions, participants use their own tokens as a “stake” in the network to have a chance to add a new block to the blockchain. Essentially cryptocurrencies are locked away to receive rewards. Participants are incentivized to stake their coins with reward offers from the network for successfully validating transactions. At regular intervals, the protocol will nominate a participant to validate the next block in the blockchain. Each PoS system handles the details regarding reward intervals differently. The chance of being nominated is relative to the number of coins staked, where the more coins a user stakes the higher the chance of them being selected and rewarded is. This acts as an incentive for users to stake large amounts of coins.
Hence, PoS is an energy-saving consensus protocol, which leverages a way of the internal currency incentive instead of consuming lots of computational power to reach a consensus. Note that Ethereum plans to transition from PoW to PoS.
Proof of Work vs Proof of Stake
A heated topic in the crypto space is the environmental consequences of blockchains that use the Proof of Work (PoW) consensus mechanism required for block production and validation.
Besides the high consumption of electricity, which exceeds that of Poland for Bitcoin and that of Austria for Ethereum on a yearly basis, these two blockchains also produce staggering amounts of electronic waste, with Bitcoin generating 25,060 tonnes yearly, comparable to the small IT equipment waste of the Netherlands. This is caused by the mining farms which very often replace the burned-out equipment. Data from Digiconomist.
Conversely, with its Proof of Stake (PoS) consensus mechanism, Cardano’s network doesn’t rely on processing power for block validation. What is required is a stable internet connection and enough staked ADA to produce blocks. There are also some SPOs who run their stake pools on a Raspberry Pi, consuming about 5 Watts of energy.
This is the reason why Cardano is often referred to as an eco-friendly blockchain ecosystem.
Benefits of Staking — Rewards
Staking coins in a PoS typically pays out rewards in the form of newly created coins of the same type. For example, staking Cardano (ADA) will reward newly created ADA tokens. The size of the block reward depends on a number of factors including:
The size of the pool: The larger the pool, the more likely it will be chosen to fill the slot of the epoch. The larger the pool, the more chances of being rewarded.
The staking pool terms: Different pools will have different incentives and reward structures. Some will reward higher percentage offers than others.
Staking and Risk
It is important to understand the requirements and agreements necessary for each project you wish to stake with as they may differ from one another.
Some projects have a lock-in or vesting period where the staked crypto cannot be moved for a period of time. This can be an issue as users will not be able to trade the staked tokens even if the price of the tokens change.
Only time will tell whether Cardano or some other blockchain will rule the crypto space, though what is more realistic is that we will have an internet of blockchains, and the developers behind Cardano are well aware of this. This is evidenced by their effort in creating an NFT bridge with Ethereum and an ERC-20 Converter. Interoperability and cooperation between blockchains are essential. In the end, the common goal is to create an economic system that can be accessed by anyone anywhere, allowing the unbanked to start building a financial reputation free from intermediaries, which has disappointed us repeatedly throughout history.
Read Next Part: Blockchain Blog 16: Crypto Exchanges
Entire Series: 28 Blogs on Blockchain and Cryptocurrency
- WazirX vs CoinDCX vs Bitbns | BlockFi vs CoinLoan vs Nexo
- LocalBitcoins Review | Cryptocurrency Savings Accounts
- What is Margin Trading | Dollar-Cost Averaging
- Uphold Card Review | Trust Wallet vs MetaMask
- Decentralized Exchanges | Bitbns FIP | Bingbon Review
- 10 Best Places to Buy Crypto with Credit Card
- Best Crypto Trading bots in Canada | Bybit vs Binance
- 5 Best Crypto Exchanges in UAE | SimpleSwap Review
- 7 Best Ways to buy Dogecoin | ZebPay Review
- Best Futures Trading Signals | Liquid Exchange Review
- Crypto Exchanges In South Africa | BitMEX Crypto Signals
- MoonXBT Copy Trading | Crypto Wallets in UAE
- Remitano Review | Guide to 1inch Protocol
- iTop VPN Review | Mandala Exchange Review
- 40 Best Telegram Channels | Hi Dollar Review
- Fold App Review | StealthEX Review | Stormgain Review
- Buy PancakeSwap (CAKE) | Coinswitch Kuber Review
- WazirX NFT Review | Bitsgap vs Pionex | Tangem Review
- How to Create a DApp on Ethereum using Solidity?