Wednesday, August 3, 2022

What is consensus mechanism?


Once you start getting into the cryptocurrency space, you inevitably hear terms like Proof of Work (PoW), Proof of Stake (PoS), and Proof of History (PoH).

To a new investor, this might sound like complicated terms you don't need to know. However, these protocols are critical to how popular cryptocurrencies like Bitcoin and Ethereum work. In fact, it is these protocols that help cryptocurrencies remain decentralised by validating blockchain transactions without the need for a third party.

Ultimately, the more you know about the difference between PoW vs PoS vs PoH, the better. Cryptocurrencies are an emerging asset class with incredible opportunities. However, understanding the technology behind the scenes is critical so you can make an informed investment decision.

What is a consensus mechanism?

A consensus mechanism, also known as a consensus algorithm, is how nodes in a network come to a consensus on which blockchain transactions are valid.

Remember, a blockchain is basically a digital ledger of information that is distributed to everyone in the network. This means that each node has the same description of the blockchain state and previous transactions. In order to update this ledger and maintain its universal consistency, nodes in the network must agree on which new blocks are valid and should be added to the chain.

To reach consensus, at least 51% of nodes on a network must agree that a block is valid and should be added to the ledger.

This is a simple explanation of what consensus mechanisms are and how they are used in cryptocurrencies. However, different cryptocurrencies have different consensus mechanisms, which have significant implications for energy usage, security, and scalability.

What is Proof of Work (PoW)?

Proof-of-Work is probably familiar to most junior cryptocurrency investors as it is the consensus mechanism used by Bitcoin and Ethereum. This is also a mechanism at play when you hear people talking about Ethereum and Bitcoin mining.


How does PoW work?

With proof-of-work, blocks with transactions must be verified by network participants before being added to the chain. To validate blocks, validators use computing power to solve complex cryptographic puzzles. When a participant successfully validates a block, the block is added to the chain and the participant receives bitcoin as a reward.

This process of using computing power to solve complex problems in exchange for block rewards is mining. In the case of Bitcoin, as the total amount of BTC in circulation increases, the mining reward for completing a block is halved every four years or so. Currently, miners can get 6.25 BTC for successfully validating a block.

Proof of work is very energy-intensive. The computing power (known as hash power) to mine cryptocurrencies such as Bitcoin is enormous. This has led to increased energy expenditures worldwide. This also affects the global GPU market, as miners buy expensive computer hardware to mine more efficiently.

Energy consumption is a downside of proof-of-work. Furthermore, PoW follows a "longest chain" rule, i.e. the longest chain in the blockchain is considered a valid chain by users. This means that PoW cryptocurrencies are more vulnerable to a 51% attack, which occurs when an entity reaches 51% of total computing power, builds the longest chain with fraudulent blocks, and double spends their cryptocurrency.

Finally, PoW has been criticized for its lack of scalability. For example, Bitcoin miners validate blocks on average every 10 minutes, while PoS and PoH validate transactions much faster. Clearly, this is why Bitcoin and Ethereum are not ideal for doing a lot of day-to-day transactions, especially when you factor in costs like ETH gas fees.

Pros and Cons of Proof of Work (PoW)

Advantage

  • Security: The chance of a 51% attack is impossible on a mature cryptocurrency with a large and diverse hashrate.

  • Rewarding Miners: PoW allows miners to be rewarded for validating blockchain transactions, thereby incentivizing people to help validate blocks and keep things running smoothly.

Disadvantage

  • Barriers to entry: Today, global mining operations hold most of the computing power in cryptocurrencies such as Bitcoin and Ethereum. Being an independent miner is expensive in terms of hardware and electricity costs.

  • Energy consumption: Cryptocurrency mining is often criticized for its impact on the environment. In fact, Bitcoin mining uses more electricity than some countries!

  • Validation time: Validating blocks with PoW takes a few minutes for Bitcoin. This means that cryptocurrencies like Bitcoin are more of a store of value and less useful for making multiple quick transactions.

What is Proof of Stake (PoS)?

Proof-of-Stake is the main alternative to Proof of Work, the consensus mechanism that cryptocurrencies like Algorand, Cardano, Solana, and Tezos use to verify transactions.

To improve scalability and security, Ethereum also switched from PoW to PoS in its Ethereum 2.0 upgrade.


How does PoS work?

With Proof-of-Stake, depositors act like cryptocurrency miners, only locking up the cryptocurrency they own as validator nodes. The likelihood of validating a new block and getting a block reward depends on the amount of cryptocurrency you stake. This means that the more cryptocurrencies and stakes you hold, the better your chances of being selected to validate blocks.

The main difference between Proof of Stake and Proof of Work is that PoS does not require nearly as much energy to validate blocks. This is because the founders use smart contracts to lock up funds and do not need to use mining to solve energy-intensive cryptographic problems.

PoS is also more scalable than PoW because PoS allows more transactions per second (TPS). While it takes around 10 minutes to verify a Bitcoin transaction, Cardano has a TPS of around 257. The founder of Ethereum, Vitalik Buterin, believes that the upgrade of ETH 2.0 will promote the TPS of ETH to reach 100,000.

Finally, you can make the argument that PoS is a fairer consensus mechanism because it truly rewards stakeholders. With PoW, large entities take up a large percentage of computing power, and mining is expensive. But with PoS, even novice investors can stake their cryptocurrencies independently or through staking pools to earn rewards.

Additionally, PoS provides protection as an additional layer of security. The odds of a 51% attack on PoS cryptocurrencies are impossible for mature coins. This is because the attacker must own 51% of the cryptocurrencies being staked. Not only is this very expensive, but attacking a cryptocurrency and potentially lowering its price is counterproductive when you are an important stakeholder.

Pros and Cons of Proof of Stake (PoS)

Advantage

  • Efficiency: PoS is more energy efficient than PoW because validators do not need computational power to solve complex cryptographic problems.

  • Scalability: The PoS network achieves consensus before blocks are actually added, so it can process many more transactions per second than PoW.

  • Safety: You have to be a stakeholder to participate in the staking, and this self-governing system naturally increases safety.

Disadvantage

  • The Nothing-At-Stake problem: In theory, if a PoS cryptocurrency forks, stakers can focus on validating one chain rather than validating multiple chains simultaneously. This has the potential to facilitate a double spend attack, as an attacker can buy something on one fork with their cryptocurrency, send the same cryptocurrency to the second fork, and then spend their staking power on the second fork a fork. If the second fork becomes the longest chain, it is accepted by the network, and the transaction for the first fork is returned.

  • Concentration of wealth: Another potential problem with PoS is that the largest stakeholder gets the most rewards. This "rich get richer" situation isn't a problem by default. However, this creates and propels those who control a large supply of various cryptocurrencies into giants.

What is Proof of History (PoH)?

Proof of History is a consensus mechanism, and Solana, one of the largest cryptocurrencies by market capitalization, is used with PoS to help solve the general timing problem of blockchains and increase network speed.

The advantage of Solana is that it is extremely efficient. It processes transactions much faster than cryptocurrencies such as Bitcoin and Ethereum due to the use of PoH and other innovations.

How does PoH work?

In Solana's white paper, founder Anatoly Yakovenko explains how PoH utilizes a verifiable clock to create a ledger so that nodes in the network know the passage of time recorded without having to rely on other nodes.

In short, with PoH, nodes have their own internal clocks to verify events and the passage of time. The proof uses a verifiable delay function (VDF) to hash incoming events while recording when the event occurred. When other nodes look at the sequence of hashes, they can immediately know the order in which events occurred without the need to verify time with other nodes.

Since many authors discussing PoH are engineers/programmers/cryptologists, it can be very confusing to read. But the following Solana video itself is a short and to the point explanation to help anyone get a better grasp of how PoH works.

Solana has several other technological innovations to improve efficiency. For example, it uses the Turbine protocol, which compresses data into smaller sizes to reduce bandwidth requirements and improve TPS. It also uses Sealevel, which allows smart contracts to run in parallel.

Thanks to all these improvements, Solana can achieve over 60,000 TPS. Fast transaction speeds and incredibly low fees are why Solana is often called the "Ethereum killer" by its advocates.

But despite Solana's efficiency, there were some bumps along the way. On September 14, 2021, Solana's network crashed and went offline for 17 hours. The crash was caused by a bot attack that basically hit the network with over 400,000 transactions per second, crashing validators and bringing the network to a standstill.

The crash cost Solana around $20 billion in market value. Although Solana's price has recovered, this shows that Solana is still in its infancy and may experience more growing pains.

Pros and Cons of Proof of History (PoH)

Advantage

  • Low Fees: Solana has significantly lower fees than other cryptocurrencies like Ethereum. This makes it more feasible for recurring spending or transferring money.

  • Scalability: More transactions per second increases the scalability of cryptocurrencies.

Disadvantage

  • Centralization concerns: Solana currently has less than 1,200 validators validating transactions on its network.

  • Fewer Decentralized Applications (DAPPs): Solana is often called the Ethereum killer, and according to its website, there are over 350 DAPPs built on Solana. By comparison, there are nearly 3,000 DAPPs on Ethereum, and this is where DeFi currently needs more development time and innovation.

What do these mean for investors?

Terms like Proof-of-Work, Proof-of-Stake, and Proof-of-History may seem like pure jargon. But as with any asset type, it's important to understand what you're actually investing in and why it might be valuable in the first place. For cryptocurrencies, this means understanding the underlying technology behind different projects.

Furthermore, innovations like PoS and PoH have created new opportunities beyond buying cryptocurrencies on exchanges. For example, by staking, you can earn passive rewards with your cryptocurrency. You can also investigate lending-based platforms like BlockFi and Celsius that let you deposit your cryptocurrency to earn interest.

In conclusion, Proof of Work and Bitcoin lay the foundation for the consensus mechanism of cryptocurrencies. But the field is still developing rapidly, and investors should at least consider the long-term viability of token verification technology before choosing to invest.


No comments:

Post a Comment

What's happening at FTX?

When it came to trading the digital currency known as bitcoin, FTX was a major player on the global stage. Over the weekend, FTX's issue...