Are You an Ambitious Entrepreneur Aspiring to Launch a World-Class Web3 Project? GRAB your WEB3 EXPERT CONSULTATION!
Book a Session!

A New Era on Ethereum Starts With Casper

Casper Consensus Protocol on Ethereum

On May 8, 2018, the first version of PoS Casper came out on GitHub, making the first step toward the so-called switch from Proof of Work consensus protocol to Proof of Stake Casper. However, as stated by Vitalik Buterin and Virgil Griffith in Casper FFB (the Friendly Finality Gadget) white paper, it’s a hybrid consensus. PoW is not going to vanish — it’s just layered over by a mix of PoS and Benzitile fault-tolerant philosophy to enhance security. So, what is Casper PoS, and what does it bring to the Ethereum network? Let’s find out together.

Why Casper?

With the goal of becoming a worldwide adopted decentralized platform for DApps creation, the Ethereum team is getting rid of the pitfalls standing in its way:

  • scalability
  • centralization
  • costs
  • security
  • potential

Scalability

The blockchain is a distributed ledger by nature, which means all participants hold a copy of all blocks on their computers. As the number of blocks is constantly growing, this slows down the work of the platform. Miners get their rewards, but not immediately, developers wait for the smart contracts to be deployed, and ordinary users don’t get ETHs in their wallets as fast as they should.

In terms of the processing time, Proof of Stake is more effective: on the EOS blockchain, for example, 100,000 transactions are processed per second.

To speed up the platform, Vlad Zamfir suggested using sharding. The principle of sharding allows the processing of transactions concurrently, having shared them among the shard chains beforehand. Vlad points out that sharding can only be implemented on Proof-of-Stake protocol.

Several technologies have been designed to fix this: Plasma, Plasma Cash, and the Raiden Network. How, exactly, will the implementation of these three technologies manage scalability? You can find out in the Applicature blog.

Centralization

It is no secret that Bitcoin isn’t as decentralized as it seems to be. The hashrate is divided between three pools. Ethereum has faced the same issue:

hashrate distribution of mining poolsIn PoW, the pools with higher hashrates get an additional advantage: the mining gets cheaper. This problem will be fixed by implementing Casper on Ethereum.

This has certain implications on blockchain user comfort, as the consolidated mining pool has the ability to fend off a coordinated attack (51% attack). There is a really small probability that the pool will succeed, as the final decision is always on every single miner; but even the possibility that someone has to coordinate miners makes some users feel uncomfortable with its continued usage in more valuable spheres.

Costs

What inspires people to turn to PoS consensus the most is the fact that electrical expenses will no longer be a thing. From now on, a minimum stake of 32 ETH will include you in a validator queueing pool and allow validating blocks, depending on your stake percentage.

Security

One more concern hindering Ethereum-based governance programs is security. This is why Vitalik Buterin came up with the Casper protocol, which will ensure security on Ethereum with the help of each node.

Protection of the system from malicious users is ensured by the slashing instrument, which doesn’t allow double-spending. Validators are interested in keeping the network alive, as empty stakes and double-spending will cause them to lose their stakes irreversibly.

Potential

The final reason for turning to Casper is full implementation of Proof of Stake with empty-stake and double-spending prevention, high-level responsibility of validators, and fast transaction processing. All of these factors will make Ethereum a super-computer for DApps creation and for launching massive projects in the future.

PoW vs. PoS

The Ethereum blockchain, like the Bitcoin network, is supported by its users: miners. Both platforms use PoW as a consensus algorithm, so let’s review PoW, which Ethereum is going to change to PoS, and the differences between the two.

PoW:

  • In order to validate transactions and pack them in a block that will be added to the ledger, miners solve mathematical puzzles. However, they are only able to do this with GPU and ASIC processors.
  • As network complexity and the number of transactions is constantly growing, the need for electricity grows, as well, which is quite costly. In 2017, for example, Ethereum miners consumed the same amount of electricity as Cyprus and Cambodge.
  • After a packed block gets into the network, thousands of miners verify it. Later, it is added to the distributed ledger as part of the blockchain.

The obvious disadvantage of PoW is its drastic electricity consumption. Research performed by Digiconomist has shown that by 2020, miners on PoW-based platforms will consume as much electricity as the whole planet does now.

The need to gain more computational power is leading to the centralization of the blockchain, which itself is decentralized. A group of miners who together own more than 50% of the computational power operating on the blockchain can cause a 51 attack. As of 2018, 50% of the hash rate was split up between three pools. If they choose to collude, they could perform a 51% attack and destabilize the network.

PoS:

  • Instead of using computational power to mine the block, users deposit their stake (lock their coins). The bigger stake, the higher the possibility of mining the next block. Basically, this is the same costly approach as in PoW (the rich become richer); however, users do not use electricity.
  • The more stake you possess, the weightier your vote.
  • Miners get rewards if the block is verified by other users.
  • The network is protected from a 51% attack, as the nodes that colluded will suffer from it more than the network.

One of the main disadvantages of PoS is the situation of “nothing at stake,” which means that a node without coins finds an empty block in a sidechain without spending any computational power, but gets a reward for it. This could potentially lead to double-spending.

PoS vs. Casper

There are two projects that together enable a smooth transit from PoW to PoS consensus:

  • FFG (a finality-friendly gadget), also called Vitalik’s Casper. This is a hybrid consensus containing both PoW and PoS. The network will keep functioning by means of mining, but every fiftieth block will be a checkpoint with PoS implementation — a finalized block that is impossible to rewrite or change.
  • CBC (correct by construction), or “Ghost;” also called Vlad’s Casper. This version offers complete PoS use without miners. In CBC, validators choose the security level by themselves; for example, validator A may set four votes to validate the block, node B may set six nodes, and so on. With CBC, the finalization of the blockchain occurs gradually, unlike in FFG, where it occurs at a certain block.

An ordinary PoS consensus has structural and economic differences from Casper. In contrary to PoS, Casper has a protection from the “nothing at stake” problem, as validators deposit (block) their stake. If it turns out that a validator has verified an empty fork chain, he/she loses the deposit, plus an equal sum for enabling double-spending on the network.

Casper requires active participation from the validator. If a validator goes offline, he/she consequently loses a portion of their ETHs.

In FFG, there is the notion of “supermajority.” A block is only valid if two-thirds of the whole network has verified it. If a forked chain occurs, one-third of the validators will be sacked; but as a bonus, the validator who detected it gets 4% of the sum.

PoS Casper As Hybrid Protocol


In an interview with Vitalik Buterin by the Center for Intellectual Governance Innovation, he said that 70% of mining is done in China, and 70% of mining is done with hardware produced by a single manufacturer — which is, basically, run by several people who eventually own a major stake. For this and a bunch of other reasons, Vitalik claims PoS to be more efficient for network security.

One more thing: colluding on an attack is impossible when the network follows PoW. This is why detecting malicious nodes becomes incredibly hard. In the case of a PoS network, the system will track the nodes that verify suspicious transactions and will blame them for messing with the protocol. In such case, those nodes will lose their deposited stakes.

Let’s take a closer look at what Casper consists of and what if offers.

Ethereum Casper Protocol

Casper’s version 2.0 consists of three chains:

Casper Protocol Ethereum ChainsCurrently, Ethereum users mine blocks by solving an NP-class puzzle with the help of their computational power.

In order to become a validator in a new Beacon (PoS) chain, anyone in the network can deposit 32 ETH and start contributing to the security of the network.

The Beacon chain will play two basic roles in the updated Ethereum network: it will be the main chain on Ethereum following PoS consensus, and it will link up all shard chains. The decision of which blocks must be added to the main chain will be also made on the Beacon chain.

Shard chains will store and share transactions, and will play a role in the scaling solution on Ethereum.

Shard Chains

Theoretically, sharding implementation makes transaction processing faster. However, in reality, this tool is extremely difficult to apply due to a number of issues:

  • There is no mechanism for tracking which node processes a certain transaction.
  • An algorithm of trust between nodes hasn’t been developed, which contradicts the rules of the blockchain: the nodes have to come to a certain consensus in order to trust each other.
  • Sharding can find its implementation only on PoS-based blockchains.

Discussions on the sharding mechanism became popular when it was mentioned as one of the methods of beating the scalability issue. However, the Ethereum blockchain is the only one that is ready to implement this technology, even though it has become so difficult.

Exactly how sharding will become part of the Ethereum platform has not been revealed yet. However, you can find more precise details on how it works in this article about the Raiden Network.

Validators and Their Responsibilities

A future consensus protocol of Ethereum is a smart contract that implements and monitors a Proof of stake consensus protocol.

Who are validators, what is their commitment, and how does mining work with Casper? Let’s figure out the info one bit at a time.

Users who have made their deposits of 32 ETH and become validators have two voting responsibilities: propose and attest. The weight of each vote will be defined by the amount of stake the validator owns. The bigger stake, the higher the voting priority.

The Proposer Validator

In Casper 2.0, proposer validators play a crucial role: basically, their responsibility is to pack and suggest a block that contains cross-links to shard chains. This block will pass two rounds of voting by attester validators, and then will be included in the Beacon chain.

Finally, the proposer validator connects to a Beacon chain node and proposes a block by calling an RPC function.

The Attester Validator

Attesters are users who have the right to sign off on proposed blocks, or, in other words, vote for them. After the attester signs off on a block, he/she needs to validate it so the block is included in the ledger and heads the chain (becomes a valid block on the public blockchain).

A validated block means that the attester has already processed all transactions or events; he/she should also call for a fork-choice rule.

Implementing two rounds of voting, and penalizing maleficent validators will be a responsibility of Casper.

These two rounds of voting will build consensus on the Ethereum blockchain. Let’s take a look at exactly how this validation works:

An Ideal Validation

A proposer validator chooses a block to be verified, or chooses an attester validator to choose the block that should be verified. As soon as the chosen block gets its two-thirds of the votes, it is a prepared block which will be voted upon again in a commitment round (second round of voting). When the prepared block passes the second round of voting, it is finalized to the blockchain. This validation process will continue on any appending block on the Ethereum blockchain.

When voting, validators pay their two-thirds stake to submit their vote; however, if verified, the money is paid back. This incentivizes validators to choose the blocks that are most likely to be added to the blockchain.

Moreover, when validators vote, they reference their last prepared commitment block — these are the links of the blockchain.

Implementation

The first mention of Casper implementation on Ethereum goes back to 2017, which followed with a testing period in 2018. The most frequently-asked question is how the Casper team is going to transfer the whole network to another consensus.

Vitalik Buterin mentioned that the implementation process becomes possible with the help of decreased rewards for mining. This will cause a mining freeze and make users concentrate on staking in further work on Ethereum.

Possible Risks

When Casper implementation reaches its final point, it will kill the era of mining on Ethereum, the market for ASIC-processor users, and will drastically change the economy of the platform.
Despite slashing, which will protect the network from messing with the system, there is still the threat of Ethereum becoming centralized. After Casper implementation, only 200-300 nodes will enforce the network, which can form a “supermajority” and start dictating their own rules to the network.

POS is more effective than PoW in terms of resource usage, and is more stable against a 51% attack;, however, it doesn’t promise full decentralization.

On Bitcoin, the biggest pools call the tune; on Ethereum after Casper implementation, the power will be in the hands of those with the biggest stake. However, the necessary stake decreases to 32 ETH, which will increase the number of validators and prevent centralization.

Conclusion

Users of the Ethereum platform faced serious scalability issues when the CryptoKitties game gained popularity and the network had to process a huge number of transactions fast. This brought Ethereum’s creators to the point where the network needed to solve the issue, which ended at the idea of turning away from the current PoW consensus protocol and toward PoS. Vitalik Buterin and Vlad Zanfir started developing their own version of PoS, to implement it on Ethereum as the biggest platform for DApp creation.

As it was said before, Casper is a smart contract on Ethereum that monitors Proof of Stake consensus.

In order to transition the whole network from PoW to PoS, each fiftieth block will be a checkpoint with PoS implementation. Moreover, the reward for mining will be lower, so users of the network will concentrate on staking instead of mining.

All of the changes that Casper implementation brings will follow the ideology of Ethereum. As Vitalik Buterin says, Ethereum isn’t just a project for mining cryptocurrency (Ether); it is a platform for creating decentralized applications.

There is not much information revealed on Casper, even though the testing period has passed. Nevertheless, the Applicature consulting team is always ready to answer all of your questions on Casper and its advantages and disadvantages.

Insights from our Consulting Department

December 1, 2022
Applicature helps Kingaru with development, funding and token launch for Web3 immersive e-commerce
October 3, 2022
Dissecting Crypto Winter— Opportunities for Family Offices and Private Funds

Leave a Reply

Your email address will not be published. Required fields are marked *

+1-209-813-2474 |  25 Belle Avenue, San Rafael