Casper - Ethereum: how it works

A brief guide on the protocol, which is designed to reduce (and ultimately eliminate) the profitability of the extraction of ether.

What is Casper?

Casper is the long-awaited Ethereum network update, which will allow adding blocks verified using the algorithm to the blockchain Proof-of-Stake.

To some extent, Casper (a famous ghost from children's cartoons) is a descendant of GHOST (English ghost), or Greedy Heaviest Observed Subtree. Introduced into the Ethereum ecosystem in 2013, the GHOST protocol prevents centralization. During network operation, so-called abandoned blocks, orphaned blocks (successfully checked blocks that are not in the current chain) are periodically created; in the Ethereum community, they are often called "uncles", emphasizing the difference from the parent and child blocks.

Such blocks successfully passed the test, but the network rejected them due to the fact that another, longer chain became dominant. The fastest and most powerful miners have an advantage in solving blocks and creating the longest chains. In the end, their dominance would lead to excessive centralization of the network. To avoid this, Ethereum rewards the generation of abandoned blocks, encouraging the participation in the construction of the network of all miners, not just the richest.

Consensus algorithms

Blockchains store important information, so adding new blocks with minimal potential for frauds is the primary task of any algorithm. Algorithms of consensus determine exactly how new blocks are included in the chain. The most common are Proof-of-Work (PoW) and Proof-of-Stake (PoS).

As part of PoW, miners add blocks to the chain, solving a complex math problem and competing with each other. Obviously, with this method of mining, the advantage for miners with the most powerful equipment. This undermines the decentralization of the network and makes it vulnerable.

PoS uses game theory concepts to encourage good behavior and minimize bad behavior. In this case, the miners do not compete with each other, but put a certain amount on the blocks offered for inclusion. If a miner will try to cheat and the block will be rejected, he will lose the staked funds.

The PoW method consumes huge amounts of electricity. Miners buy the most powerful equipment to increase the chances of winning. The PoS method significantly reduces equipment requirements and electricity consumption.

Work validators

At its core, the Casper protocol represents the POS algorithm for Ethereum. The validator deposits the smart contract, starts the node and supports the network. The Casper the Friendly Finality Gadget (CFFG) method is responsible for adding blocks to the chain. Validators are rewarded for their efforts, but lose a bet in case of problems.

Casper identifies violations, establishes unscrupulous validators and punishes them. It also allows new validators to enter the system, and existing ones to log out. Security is an integral part of Casper.

Casper is in the form of an independent module and is linked to the bid mechanism. Currently, Ethereum's bid mechanism is based on PoW. Thus, the first generation of the Casper protocol is associated with the existing PoW algorithm. The result is a hybrid system PoW / PoS. In the future, developers may opt out of PoW in favor of a different approach. They can be an algorithm based on Round-robin (cyclic algorithm of load distribution by the brute force method).

Security questions

From a security point of view, there is one nuance. Casper will be helpless if the basic mechanism of the block proposal is compromised. As long as Casper receives adequate and “true” messages from the proposal mechanism, it will work as usual.

The security of the POS algorithm is based on the concept of rewards and punishments from game theory. Validators guarantee the safety and correctness of blocks with the size of their deposits. If a dishonest validator has to spend 100 ethers to steal 5, he will abandon this idea. On the other hand, he may well go for theft if he can get 100 ethers by spending the entire 5. In this case, the loss will be perceived as the usual costs of "business".

Casper Features

As a network mechanism, Casper must ensure the integrity of the chain and must constantly maintain its operability.

The fundamental features of Casper are information unambiguity and stability. Unambiguity prevents conflicting information from appearing in the blockchain (a contradiction is possible only if the rules are violated by at least 1 / 3 validators). Sustainability ensures the ability to complete a new unit, provided that at least 2 / 3 validators follow the protocol.

In standard PoW protocols, the longest string is always preferred. In this sense, Casper is more complex. There are borderline cases where choosing the longest chain will damage the network. Therefore, the Casper software logic takes into account the root nodes of the tree of control points and selects the longest chain that satisfies the conditions.

More

Casper is based on game theory, and the development of the protocol is associated with a large amount of research and mathematical calculations. In many ways, this is a complex system. 15 November 2017, Vitaly Buterin and Virgil Griffith published its technical details.

Apparently, an earlier (without reference to a specific date) document with the same name contains completely different information. Its author is Buterin himself, and he posted on his personal website. This document discusses potential security issues that Casper solves.

Also 1 August 2015 in the Ethereum blog was published description from Vlad Zamfira.

Conclusion

At the moment, the PoW consensus algorithm has succeeded. Blocks are successfully added to the chain, users trust the result. However, the process is slow, consumes large amounts of electricity and requires huge expenditures on equipment. Casper's approach is based on game theory, eliminates many of the problems of PoW, and provides similar security.

The new protocol may encounter unforeseen difficulties, but its existence as a separate module simplifies problem solving and code improvement. Casper is an innovative solution based on research and mathematical modeling, which will certainly cause a wave of new ideas and suggestions.

Rate this article
Blockchain media