Everything You Need to Know About Ethereum 2.0

Pujeet Manot
London Blockchain Labs
15 min readDec 10, 2020

What will you learn in this blog?

The conditions for the deposit contract have been met. More than 800,000 ETH have been staked on the network so far. The launch of Beacon Chain takes place on December 1, 2020, and many people still do not know what Ethereum 2.0 is or its technicalities.

This blog covers the various reasons behind the upgrade from Ethereum 1.0 to Ethereum 2.0, the different concepts of sharding and proof of stake, and how they will be relevant in Eth2.

Eth 2 has been divided into different phases. This blog describes all the phases and their relative purposes, with more focus given to Phase 0 — the Beacon Chain. Finally, we will understand the economics behind the new upgrade and finally the problem that many people might face when it comes to staking.

We hope you enjoy this blog.

Introduction

For all these years we have known Ethereum to be the best public, open-source platform that allows developers to build and deploy decentralized applications (Dapps) using smart contracts. The decentralized virtual machine of Ethereum — the Ethereum Virtual Machine — executes contracts that could be used to pay your rent, play games, and do all sorts of activities that are completed via centralized applications. This guide on Ethereum covers everything you need to know about it.

This blog has been written to explain to you what Ethereum 2.0 or Eth2 is and how it could completely change the way we see Ethereum or Ethereum 1.0, starting from its shift to a more environment-friendly consensus mechanism — Proof of Stake (PoS) to the much needed and awaited scalability issues. This upgrade would therefore ensure that the network becomes more sustainable.

The Proof of Work (PoW) consensus mechanism is highly supported in the Bitcoin community, but being a miner/node means that you need to have resources to buy high-end mining hardware and provide excessive processing power to validate each block. People who cannot afford it, will naturally not be able to be a part of the validation process in the network, making it inaccessible and not-so “decentralized”. Moving to PoS means that the network will become more environmentally friendly, and hopefully more decentralized.

The Ethereum network has been unable to take the weight of the new applications that get developed on its network — be it CryptoKitties or DeFi. It has faced scalability issues that led to the delay in transactions and a rise in high gas fees. The most recent Uniswap Token airdrop could confirm it. Sharding, which will be discussed later in the blog, could help in solving the scalability issues in the Ethereum network that could lead to more transactions and lower gas fees.

Why Eth2?

The launch of Ethereum in 2015 captured the imagination of the blockchain community by providing them with a platform that could redistribute power away from centralized organizations. Despite the success, many members of the community believed that the protocol needed a few key upgrades to unleash its full potential. The several smaller upgrades that have been implemented to improve the network’s performance over the years, has not been able to address the issue of scalability. With the rising number of Dapps and smart contracts on Ethereum, it is difficult to maintain a network to validate and add transactions to the blockchain quickly.

At the time of writing, there are 3,895 Dapps on all the smart contract development platforms like Ethereum, TRON, EOS, etc. out of which 1,805 are on Ethereum. This clearly shows the popularity of Ethereum as compared to all the other platforms used to develop smart contracts. Blockchain platforms like Solana and Polkadot have been announced over the past few years but none have been able to compete with Ethereum in terms of the number of Dapps on the platforms.

While Ethereum has given us new hope of having a decentralized internet, its 15 Transactions Per Second (TPS) highlights the network’s inability to scale and act as an alternative to the centralized services we use today. Keeping complex Dapps aside, Ethereum cannot even be used as an alternative to Visa which handles upwards of 10,000 TPS.

As clearly visible, the TPS has been rising over the years. As seen above, in 2017, when the market had realized the potential of Ethereum and Dapps were created on the network, many protocols got introduced which ultimately led to the rise in the number of transactions per day. A very common example of this is the high congestion in the Ethereum network due to the rise in demand for CryptoKitties in 2017. To avoid such issues in the future, it is essential that the network is upgraded and ready to take the load.

Thus, Ethereum 2.0 will help in maintaining Ethereum’s dominance as the leading smart contract development platform. This upgrade will be done keeping in mind that your ETH does not change in any way. All changes will take place in the backend. Ethereum 2.0 will ensure that the developers who have continued to support Ethereum all this while do not have to switch to other platforms and learn new languages to build smart contracts on those platforms.

Ethereum 2.0 or Serenity will be launched in phases in the coming years, with Phase 0 expected to roll out in December 2020. Before we discuss the different phases of Ethereum 2.0 and their respective purposes, let us understand what sharding is and why moving to Proof of Stake is relevant in the case of Ethereum.

Sharding

There are two major ways in which scaling takes place -

  • Vertical Scaling — where nodes are made more powerful
  • Horizontal Scaling — where more nodes are added.

In order to keep the network decentralized, we scale horizontally and in the case of Eth2, this is done through sharding. It is a method of the horizontal splitting of databases across multiple servers to help manage the smaller databases in a faster and more efficient manner. These smaller databases are termed as data shards.

In Ethereum 2.0 sharding involves the splitting of the blockchain mainnet into data shards that will run alongside each other to validate transactions simultaneously instead of validating them consecutively. Since more transactions are going to get validated every second, sharding will help in scaling the Ethereum network.

How transactions are recorded on Ethereum’s PoW blockchain

For those of you that are wondering why this was not implemented earlier, the answer is security. Splitting the network into smaller databases and making fewer validators responsible to validate transactions could compromise the security of the network in the situation where even one of the shards is overtaken by a group of malicious nodes (as in the case of Proof of Work).

The Proof of Stake consensus mechanism has been adopted to prevent such attacks from happening. The validators in the network get randomly chosen to ensure that it is mathematically impossible for an attacker controlling less than a third of all validators to attack a single shard.

Proof of Stake (PoS)

A shift to the PoS consensus mechanism would allow ETH holders to stake their tokens on the network to participate in the transaction validation process and earn rewards in return.

The contract for Eth2 must collect an initial 16,384 deposits of 32 ETH each, a total of 524,288 ETH or about $270 million (at $515/ETH) , to proceed with the Phase 0 launch of Ethereum 2.0. These funds will be locked in the contract as a security deposit of being given access to the network and its validation procedure. Any malicious activity from these validators will lead to a penalty being imposed on their stake. This is how we expect the security of the network to be maintained.

Since validation depends on the ETH staked in the network and not the computing power needed, as in the case of Proof of Work, no validator would want to act against the interest of the blockchain that would lead them to lose their funds and a possibility of a reduction in the price of each token if people start believing that the network is under attack.

Attacking the network also means that a validator would need to have a very high stake in the network. Having a high stake and performing an attack means that these attackers could even lose their whole funds, thus making such attacks expensive. This process is called slashing.

The only major drawback of PoS is that there could still be validators who stake a lot more than the others, thus having more influence in the network and getting more staking rewards. As more people stake on the network, the annual percentage rate (APR) keeps decreasing. This might not be that advantageous for those validators who stake less funds, thus making the entire process again “not-so decentralized”. Moreover, having a larger stake in the network also means that the network could be attacked.

Staking on Ethereum will work in a similar way as it works on any other PoS blockchain. You will validate only as many transactions as your stake in the network. For example, if you have staked 4 tokens in the network of 100 tokens, then you will only validate 4% of the new blocks and receive the rewards for those transactions recorded in the blocks.

Game Over for Miners?

At the time of writing, 805,728 ETH have been staked on the contract. ETH 2.0’s Beacon Chain genesis will therefore occur on December 1, 2020.

If everything goes as planned, there will be no use of miners or mining hardware in the Ethereum network in the coming future. Mining will still continue on the network until Phase 1.5 of Eth2. It is during this phase that the mainnet will become the shard and the consensus mechanism of the network will only be Proof of Stake.

Just like the DAO hack in 2016, which led to a hard fork called Ethereum Classic, this shift in consensus mechanism might not be accepted by the entirety of the network. This may lead to another hard fork.

Phase 0: The Beacon Chain

The Beacon Chain, scheduled to be launched on December 1, 2020, is an overarching chain that will ensure that the data on the shards has the most up-to-date data, reward validators for proposing new blocks and punish them for their malicious behavior. There will not be any shard chains operational as there is nothing that needs to be in sync. Its role initially will only be to bring all validators onboard.

The Beacon Chain

The Beacon chain will have Casper finality, a random number generator to shuffle validators, and simulate crosslinking in the non-existent shard chains. Eth1 will continue to receive upgrades and operate alongside the Beacon Chain.

As explained by Interdax in their Medium post, the first implementation of Casper will use Ethereum’s current PoW proposal mechanism to introduce new blocks onto the blockchain. If two blocks are proposed simultaneously, validators are only rewarded for betting on one chain, so it only makes sense to bet on the original chain, as this is the one that is most likely to succeed.

More importantly, Casper introduces a mechanism that will instantly confiscate the entire stake of any validator who tries to support an invalid chain by validating more than one block at a time. Should a validator maliciously attempt to compromise the network (i.e. validate incorrect data history), all or some of their 32 staked ETH will be slashed (more about penalties later). Users can submit evidence of voting on the wrong chain by miners to penalize incorrect votes. Casper, therefore, handles the nothing at stake problem by introducing a wrong-voting penalty to the protocol.

Slots and Epochs

The validators on the network will be responsible to validate transactions and also propose new shard blocks. If they are not chosen to propose a new block then they can make sure that everything in the proposed block looks right.

A minimum of 128 validators (called a committee) is needed to attest every shard block. Every shard block is to be proposed and validated by this committee in a time-frame known as a slot. Each slot is 12 seconds and an epoch contains 32 slots adding to 6.4 minutes. Once the validation process is complete for the epoch, the committee is broken up, and a new set of validators will be chosen using a pseudo-random process RANDAO. This is done so that malicious validators don’t have any control over the final outcome of new proposed blocks.

A new slot is added every 12 seconds. 32 slots make an epoch.

A slot is therefore a chance to add a block to the Beacon Chain. Every 12 seconds, one Beacon Chain block and 64 shard blocks (as the current Eth2 has plans for 64 PoS shards) are added when the system is running optimally. Slots are similar to block time but some slots can remain empty too.

Although real shards are not introduced until Phase 1, validators participate in the consensus of the assigned shard to vote for the shard’s head. The validator links the shard head to the beacon block for a slot and as mentioned earlier, they police each other and are rewarded for reporting other validators that make conflicting votes or propose multiple blocks.

Validators are shuffled into committees for each epoch to create attestations (or votes) for each of the 32 slots.

Phase 1: Shard Chains

Phase 1 will add a basic structure of sharding to Ethereum 2.0. This is necessary from a scalability point of view. This phase is expected to start with 64 PoS shards but they will not support accounts or smart contracts right away.

Along with shard chains, cross-references will also be introduced in Phase 1. Cross-references will allow to record and finalize the state of each shard on Beacon Chain. Ultimately, cross-references will serve as the basis for transactions between shards in later phases.

Phase 1.5: Mainnet to Shard

Everything until Phase 1.5 will be done on the Proof of Work blockchain. It is only when the mainnet becomes the shard in Phase 1.5 will the transition to PoS take place. We expect this transition to be seamless and to happen sometime in 2021.

Phase 2: Fully Formed Shards

The fully formed shard of Phase 2 is expected to be seen beyond 2021. Shards should be fully functional chains that will then be compatible with smart contracts and be able to communicate with each other more freely. Developers may even be able to design shards in their own ways.

Summary

Source: Interdax Blogs

Economics of Ethereum 2.0

The contract for Ethereum 2.0 specifies that a minimum of 32 ETH must be staked by 16,384 validators to get Phase 0 running. At the current price of $515, each validator has to spend $16,480. To avoid the delay in the launch of Phase 0 the condition of getting at least 524,288 ETH (worth around $270 million) from 16,384 validators in the one-way contract, at least a week before December 1, 2020, was met on November 24, 2020. The reason why such a high amount of 32 ETH has been demanded is to discourage attacks on the network.

Do note that both 32 (2⁵) and 16,384 (2¹⁴) are powers of 2 which will help in the easy calculation. Also, whoever is willing to stake more than 32 ETH, can do so but only in the multiples of 32 and as separate validators as each validator must hold 32 ETH.

As of November 1, 2020, the number of addresses holding 32+ ETH reached an ATH of 125,540.

For the required 524,288 ETH needed for the Phase 0 launch, the estimated APR is at 21.6%. As more and more people start staking ETH on the Network, the APR will keep diminishing but never be 0.

Rewards in the Beacon chain are expected to be distributed every 6 minutes — the amount of time needed to create a new block. Once the Bacon Chain has launched, any further changes related to rewards, etc. will be decided by the public developers of the network.

Unstaking of the 32 ETH will lead to a halt in earning any future rewards from the network. However, until Phase 1.5, the 32 ETH and any additional rewards earned as a validator cannot be transferred back to the original Ethereum blockchain. This is because each Ether transferred from Ethereum 1.0 to the Beacon Chain has been done using a one-way deposit contract. The ETH on Ethereum 1.0 will get burned and released on the new Beacon Chain.

Until Phase 1.5, both miners and validators will receive rewards for maintaining the network. The total emission level will therefore be higher in the early phases of Ethereum 2.0. Since mining is costlier due to hardware and electricity, miners are rewarded more as compared to the validators. Since the network will eventually be one, it is normal that the net returns from the network will be the same for both — the miner and the validator.

As soon as the entire network becomes one, and the only consensus mechanism used in the network is PoS and the rate at which Ether will be supplied will decrease (as only validators will be rewarded), we can expect a lower inflation rate in the network.

According to Myers’ calculations, the annual inflation rate on Ethereum 2.0 will initially range between 0.10% to 0.45% depending on the number of validators that are online and earning rewards. Under the current PoW based supply model of Ethereum, annual inflation is approximately 4.5%, at least 10 times the projected inflation rate of Ethereum 2.0.

Penalties on Eth2

There are 2 types of penalties in Eth2.

Inactivity Leaks

These happen if your validator node goes offline for 18 days, and the Beacon Chain is not finalizing, then your balance will be reduced by up to 60.8% slash in 18 days.

Slashing

Slashing happens if a validator behaves provably maliciously. A minimum penalty is 1 ETH is slashed from their stake and this goes up linearly in the number of people slashed at the same time as you.

So, what should one do if he is unable to keep his node online and does not want to lose his funds? You can simply unstake to prevent the loss of the rewards that you have earned in case you go offline.

Problems related to Ethereum 2.0

Although becoming a validator in a PoS mechanism is cheaper than being a miner in a PoW protocol, the fact that not many people own 32 ETH or are willing to stake at least 32 ETH (~ $16,480 at ~$515 per ETH) is also true. This leads to problems of fungibility. Another issue is facing technical issues on the network. Imagine staking 32 ETH and losing some or all of it because you did not deposit it correctly.

Users will also have to stake their ETH for a very long duration, something that many might not be willing to do. It is okay for people who have deep pockets, but this will again lead to the centralization of power in the network, where only rich people stake large amounts of ETH and earn rewards. A majority of the people who wanted to do it and had enough funds to take the risk of staking have staked so far. This is because of the risk associated with staking your tokens for a long period of time.

Conclusion

This blog mentions network congestion, scalability issues, and inefficient use of natural resources to be the primary reasons behind the shift from Ethereum 1.0 to Ethereum 2.0. While sharding has been considered to be the best way to scale the network, a change in consensus mechanism from Proof of Work to Proof of Stake will definitely be a more environmentally friendly way to validate transactions.

Each phase of Eth2 upgrade has its own purpose, starting from the onboarding of validators in Phase 0 and the creation of 64 PoS shards in Phase 1 to shift in consensus mechanism from PoW to PoS in Phase 1.5 and finally to fully formed shards in Phase 2.

We have also covered how the inflation rate in the network is going to decrease when everything moves to Ethereum 2.0 and how rewards will fall for all validators simply because of the reduced cost associated with the creation of a new block on the network.

Issues of technical knowledge and fungibility have prevented many from staking their ETH on the deposit contract. Several organizations have worked very hard during this short span to create Ethereum 2.0 staking ecosystems for anyone who would like to stake as low as 0.1 ETH or require some sort of liquidity till Phase 1.5 is achieved.

--

--