The Importance of Consensus in Cryptocurrency

in #cryptocurrency7 years ago (edited)

Consensus Agreement.jpg

When you swipe your card to pay $2.50 for a cup of coffee, do you ever worry about the coffee shop charging more than the $2.50 you’ve agreed to? Do you think the coffee shop worries about whether that $2.50 arrives in their bank account?

No, neither party worries; they don’t worry because they trust that their credit card company or bank will complete the transaction.

But what if there were no third parties to guarantee the transaction? What if it were just you and a coffee shop barista, or a grocery store cashier, or a cable company representative? Where does the trust come from in that transaction?

Cryptocurrencies like Bitcoin can create trust between any two parties, without the need of a third party like a bank. Except that you don’t have to actually place any trust in the world's cashiers, cable reps, or even banks. Instead, your trust comes from the Bitcoin network.

This may seem scary at first… you may ask how you can trust the Bitcoin network, when the network itself is made up of unknown people all around the world, whom you’ve never met and can’t possibly trust to handle something as important as money.

But your trust isn’t placed in these people; it’s placed in the network itself, because the network is programmed to make sure everyone agrees on what transactions take place. The network makes sure there is one agreed upon set of truth that everyone knows.

In cryptocurrency speak, consensus is how a decentralized network can agree on what happens – such as Eric paid Mary 2 Bitcoin - without any of the network members having to trust each other.

Complex mathematical algorithms and good ol’ incentives form the backbone of consensus, making it possible for a group of untrusted parties to agree with each other while simultaneously preventing members of the network from acting maliciously.

Still, there’s no one way to reach agreement on a decentralized network. There are several different kinds of consensus mechanisms, each with its own advantages and disadvantages.

Without getting too technical, here’s a cheatsheet to some of the more prominent ways cryptocurrency networks can reach consensus.

Proof of Work (PoW) - New Blocks Are Created by Using Computer Power

In Proof of Work, miners race to solve complex mathematical problems in order to create blocks. As each mathematical problem is solved, a new block is created, and the miner who solved the problem and created the new block is rewarded with the network’s native cryptocurrency.

Key incentives: The miner who creates the new block is rewarded with newly minted cryptocurrency as well as transaction fees for the transactions included in the block.

Also, as a PoW network’s native currency increases in value, more miners join the network, which in turn further secures the network and further distributes the blockchain (more copies of the chain around the world). This incentive creates a relationship where the more valuable an asset becomes, the more secure the network becomes.

Pros: We know from experience that a robust PoW blockchain, such as Bitcoin, can create a trustless and secure distributed network that is virtually impossible to attack.

Cons: Proof of Work uses massive amounts of energy, and it has lower throughput, meaning slower transactions.

Cryptos using PoW include Bitcoin, Ethereum (currently), Monero, and Dogecoin, among others.

Proof of Stake (PoS) - New Blocks Are Created By Token Owners

In Proof of Stake, there aren’t any miners solving complex mathematical equations to create new blocks. Instead, new blocks are forged by network participants who prove they have a stake, or level of ownership, in the network. They prove their stake by setting aside a certain number of the network’s tokens.

Key incentives: Block creators are incentivized to act benevolently because they must stake their own coins. If they validate fraudulent transactions, they lose their staked coins and can no longer validate transactions. However, if they correctly validate transactions, they are rewarded with newly minted coins, with transaction fees, or both.

Also, block creators are pseudo-randomly chosen to ensure high-stake participants are not continually forging new blocks, further democratizing block validation and dis-incentivizing malicious behavior.

Pros: PoS is more energy-efficient because it doesn’t require the massive computational power, it’s decentralized amongst network participants, and it can increase speed.

Cons: One person or persons could theoretically buy up over 50% of the tokens and then attempt malicious activity. However, this would drive the price up as the entity tries to buy more and more of the token, and it would also mean this entity is the top stake-holder and any malicious activity would result in a direct decrease in their investment.

Cryptos using PoS include Stratis, PIVX, and NAV Coin, among others.

Delegated Proof of Stake (DPoS) - Token Holders Vote on Delegates to Validate Blocks

In DPoS, token holders elect delegates to validate (create new) blocks, and voting power is proportional to the amount of tokens you own. Blocks are then validated by a randomly chosen elected delegate.

Key incentives: Most DPoS chains use anywhere from 20-100 elected validators, and these validators must not only have a stake in the network (own tokens), but many must also invest in hardware to ensure they can keep the network running at full speed.

As with PoS, validators are rewarded with newly minted tokens and/or transaction fees, and malicious activity can result in the loss of staked tokens and the ability to validate future transactions. Furthermore, DPoS validators must maintain good standing with the community to receive enough votes to remain a validator.

Pros: DPoS is far more energy efficient than PoW, allows for fast transactions, and is scalable.

Cons: It is inherently more centralized as only a limited number of elected delegates can forge new blocks.

Cryptos currently using DPoS include Lisk, Ark, and BitShares, among others.

Proof of Authority (PoA) - Validators Stake Their Identities

In Proof of Authority, all block validators must be registered and linked to their real-world identities. In effect, they stake their identity in return for being able to forge new blocks, and new block creation is randomly chosen amongst registered validators.

Key incentives: Validators receive the usual rewards, but with PoA acting fraudulently could not only ruin a validator's reputation but also land them in jail. On the flip side, some use cases may benefit from using PoA blockchains as accountability is linked to real-world identity.

Pros: PoA is fast, efficient, and scalable. The incorporation of real-world identity makes a good fit for private networks.

Cons: PoA lacks decentralization, and since all validators are known a PoA chain could be shut down by regulators (not suitable for public networks).

PoA is currently used by the POA Network and the Ethereum test networks, Kovan and Rinkeby, among others.

Conclusion

While there are several options to ensure all participants of a network can come to agreement, the main takeaway here should be that consensus is what allows us to trust a decentralized network without having to trust any individual members, and the creation of such a trustless network opens up doors to a whole new wave of innovation.

For Further Reading:

This is not an exhaustive list, but it should serve as a useful introduction to consensus mechanisms. Many blockchains use combinations or aspects of PoW, monetary staking, identity staking, and voting.

If you’d like to learn more, first learn about the Byzantine Generals problem (see Figure 1 after following the link) to understand from a game theory perspective why consensus mechanisms are needed. Then, you might want to check out DAGs (used by Nano and Iota), the Federated Byzantine Agreement consensus method (used by Stellar Lumens), and Delegated Byzantine Fault Tolerance (used by NEO).

Coin Marketplace

STEEM 0.27
TRX 0.21
JST 0.038
BTC 97098.91
ETH 3707.46
USDT 1.00
SBD 3.89