On May 8, developers released a planned improvement to Ethereum’s network – a new version of the code of Casper. Hybrid Casper Friendly Finality Gadget was introduced to move network away from mining-related problems, as “excessive energy consumption, issues with equal access to mining hardware, mining pool centralization, and an emerging market of ASICs”, the ultimate goal being to move the network from a PoW to a PoS system.
Let’s see what is known about “possibly the most significant” change to the network to date, according to Ethereum News.
Energy consumption and commissions
While 2017 was exciting due to the exponential price speculation of cryptocurrencies, it emerged that neither Bitcoin nor Ether in their present form would be able to become a fully fledged alternative to fiat currencies because of their very low transaction speeds.
An additional concern was the high amount of energy required to mine leading cryptocurrencies. Therefore, it should come as no surprise that among journalists and analysts, the latest trend has been comparing mining costs to the rate of the energy consumption in each country to determine where mining would be most profitable.
Image source: Powercompare.co.uk
To date, developers of leading cryptocurrencies have failed to solve the issues related to scalability. In particular, Ethereum scales poorly despite a huge number of miners. Hypothetically, it may seem that as more people mine the cryptocurrency, the more transactions the network can handle. The reality is that as all these miners simultaneously try to process one block, the complexity of production increases and the network bandwidth remains the same. This means that even if the number of miners grows a thousand times, one block will still be produced in ten seconds and the cost of electricity would noticeably increase.
A direct consequence of poor scalability is high commissions. Miners choose transactions with a higher commission, as they are hunting for a greater reward. This leads to thousands of low commission transactions which accumulate and await processing for several days to infinity, turning the blockchain into a universe of unprocessed requests — not to mention small payments which are impossible to process.
Moreover, in recent months a fundamentally new problem has emerged. The arrival of super powerful ASIC miners in the market has become a serious threat for decentralized networks, as they increase the chances that one of the mining pools will occupy a significant share of the hash and make the network centralized.
Attempts to solve these problems led to an epidemic of Bitcoin hard forks aimed at creating a «new Bitcoin» with higher transaction speed. They were followed by a wave of forks among the most popular cryptocurrencies, such as Ethereum, Monero, and Litecoin. This movement was assigned the name of «ASIC resistance» and has started to gather more and more supporters as the threat of ASIC mining dominance becomes more real.
So far, one of the reasonable approaches to solving this avalanche of problems was demonstrated by the Ethereum team, who decided to create a protocol combining the parameters of two algorithms — Proof-Of-Stake (PoS) and Proof-Of-Work (PoW).
This new protocol is called Casper — Friendly Finality Gadget (FFG) and it completely changes the principles of creating and distributing Ethereum blocks, while reducing the overall complexity of the whole blockchain.
Ethereum developers are sure that the root of all the problems faced by leading cryptocurrencies is the principle of PoW:
“Although effective in coming to a decentralized consensus, PoW consumes an incredible amount of energy, has no economic finality, and has no effective strategy in resisting cartels.”
Furthermore, the performance of the blockchain operating on the PoW algorithm is limited and can hardly provide several dozen transactions per second.
Image source: HowMuch
For these reasons, the Ethereum team plans to move from the PoW to the PoS algorithm. The difference between the two is that in the PoW case, users buy real computers that consume energy and calculate blocks at a rate proportional to costs. The subject of purchase in the PoS case is virtual coins inside the system, which are then converted into virtual computers calculating blocks. Under this approach, the probability of signing a block depends not on the processing power, but on the number of coins on the account of a user-validator. If the validator decides to participate in the confirmation of transactions, their funds are frozen with each confirmed block rewarded.
The Casper protocol would become an intermediate step in the transition from PoW to PoS, combining the possibilities of both principles:
“Through the use of Ether deposits, slashing conditions, and a modified fork choice, FFG allows the underlying PoW blockchain to be finalized. As network security is greatly shifted from PoW to PoS, PoW block rewards are reduced.”
In addition to the PoS algorithm introduced in Casper, there is another technological novelty being developed — sharding. The idea is that the nodes store only part of the distributed registry, and the underlying mathematics would ensure the system’s transparency and accountability in such a way that each node could rely on the information of others.
The founder of the Ethereum network, Vitalik Buterin, compared the elements of the sharding with islands belonging to the same archipelago:
“Imagine that Ethereum has been split into thousands of islands. Each island can do its own thing. Each of the islands has its own unique features and everyone belonging on that island, i.e. the accounts, can interact with each other and they can freely indulge in all its features. If they want to contact with other islands, they will have to use some sort of protocol.”
In other words, Ethereum’s main chain will be divided into separate chains, or shards, that associated with each other and the main block. The purpose of shards is to provide parallel processing of transactions. Each node can process its shard separately, while together nodes can work in parallel, increasing the network’s bandwidth and transaction speed by several times. At the same time, the task of scalability is solved.
Miners and validators: rescue rangers
The verification of transactions inside each shard will be performed by validators who are the main marshals of the Casper system along with the miners. The validators will ensure the legitimacy of operations with coins and act as a kind of escrow in the system, confirming transactions with their deposit. It should work the following way — if the validator has found a block that, in their opinion, should be included in blockchain, they will be able to approve it by placing a part of the deposit on this block. In the event that this block is added to blockchain, the validator will receive a reward proportional to the share that they invested. Otherwise, if they approve an incorrect or malicious block, they will lose their deposit.
Another task of validators is to create checkpoints every fifty blocks. This will ensure the completion of the blockchain and significantly increase the security of the network, since it excludes the possibility of returning transactions before the checkpoint. According to Ethereum developer Vlad Zamfir, economically any manipulation or an attempt to attack will be of no interest for validators:
“It’s as though your ASIC farm burned down if you participated in a 51 percent attack.”
The minimum deposit size the validator can make for confirmation is set at 1500 ETH which is a significant enough amount to lose and the more reason to think twice before taking part in any manipulation schemes.
The developers also provided a solution to the scalability problem which has been a critical condition for the further development of the network and Ethereum’s ability to compete with more advanced blockchain systems like Graphene.
The increase in processing speed has been reached by developers by means of participation of smaller amount of nodes and delegation of the major work to light clients. Therefore the transaction processing speed will be much higher than on a separate computer, and at the same time the entire network will be able to work on a large number of conventional laptops, while maintaining full decentralization.
Additionally, the network’s security is significantly shifted from the complexity of PoW to the completeness of PoS with the reward given to both validators and miners. At the same time, the reward for the miners for the production of ethers will decrease fivefold — from the current 3 ETH to 0.6 ETH. This will make the coin less attractive for ASIC miners and will reduce the risks of network centralization.
Validators will also become the recipients of rewards, however, in a smaller amount. Their total award is to be only 0.82 ETH per block, which is almost four times lower than the current amount. In the future, according to Vitalik Buterin, Ethereum developers will completely get rid of the PoW algorithm, leaving the reward only for validators in the amount of 0.22 ETH per block:
“Come up with an estimate for the annual rewards given out by the full Casper and sharding mechanisms. Currently, an expected value is 10 mln ETH staking at 5 percent interest, which is 500,000 ETH per year — approximately 0.22 ETH per block.”
At the same time, the efficiency of the network will increase significantly for two reasons. First of them is behind the PoS algorithm consensus which to be provided without mining, reducing energy costs and ensuring the necessary emission of ETH. Secondly, the generation time of the block will be reduced to a minimum, since it is easier to check who owns the largest share rather than to find out which of the miners has the greatest computing power.
At the Edcon conference in early May 2018, the creator of Ethereum Vitalik Buterin reported new details about the «friendly ghost». In particular, Casper, in addition to the reward system of validators, will provide a system of penalties. The main principle of the new reward system is the following — the greater the stake is, the lower the interest rate. For example, the owner of 2.5 mln ETH will receive an annual fee of 10 percent, and the owner of 10 mln ETH — only 5 percent.
Image source: HowMuch
The amount of penalties will depend on the severity of the validators’ faults and can reach 100 percent. In particular, the validators will be subject to fines in case of frequent absence from the network. The emergence of problems with the shard or disk on which the wallet is located will be punished with a fine of 2 percent of the deposit amount. For a group of validators whose shards are simultaneously out of order, penalties will be much higher and measured in double digits. At the same time Buterin notes that the main problem of this approach will be the risk of hacker attacks, because in this case, collective penalties can leave validators without any deposits.
The last news related to the «friendly ghost» came on May 8, when one of Ethereum developers Denny Ryan published the first version of Casper’s updated code on GitHub:
“v0.1.0 marks us more clearly tagging releases to help clients and external auditors more easily track the contract and changes.”
He also added that client developers can now start writing and testing software in their own languages.
What can we expect from Casper?
The launch of the Casper FFG is planned for the summer — autumn of 2018. Since the system will be incompatible with previous versions of Ethereum software, the update will be implemented through a hard fork.
As a scalability solution, Casper remains an important blockchain upgrade and solution for both developers and ordinary users. The Ethereum foundation spent three years to apply all the accumulated experience in making the network decentralized, efficient and competitive industry improving in the long run.
With the bandwidth increased, more transactions are expected to be processed at higher speeds, which means that big companies will be able to build complex structures and develop ecosystems based on the network. A loyal enthusiastic community behind the platform will help to contribute to its development and improve its functionality.
There is still a lot of work to be done on how a new reward system will work in practice and how validators will manage the protocols, but one thing is obvious — Casper is getting closer.