According to CoinMarketCap, Ethereum is the second-largest cryptocurrency by market cap, right behind Bitcoin. Vitalik Buterin’s brainchild positioned itself as one of the leaders in the crypto & blockchain sphere, but despite being ground-breaking, it is far from perfect.
In fact, both Bitcoin and Ethereum networks are facing several issues, with the two most important being scalability and security. On top of that, many Ethereum users saw sustainability as a possible threat. Teams working on Ethereum took into account these downsides and decided to make a comprehensive upgrade to the Ethereum public mainnet.
This upgrade was initially named Serenity.
However, it’s now most commonly referred to as Ethereum 2.0 or simply ETH2. It was officially released on December 1, 2020, and brought about several new features and upgrades to existing ones.
It wasn’t an easy process, as various teams have been working for years on these upgrades. Although ETH2 is officially out, it’s still far away from being complete. Here’s a short timeline of planned upgrades:
- 2020 — The Beacon Chain (Staking introduced)
- 2021 — Shard chains (Sharding introduced)
- 2022 — The docking takes place; Mainnet Ethereum docks (merges) with the Beacon Chain, and the entire network ends traditional mining processes that require a lot of energy, switching entirely to PoS.
We’ll cover all the novelties that came with ETH2 in this comprehensive guide to the latest Ethereum upgrade. By the end of this article, you’ll learn:
- How Proof-of-Stake works and saves the planet from pollution;
- How sharding aims to speed up Ethereum’s blockchain and help it process up to 100,000 transactions per second;
- How docking will gave birth to a new era of decentralized finance;
- How eWASM will make app development easier and convenient.
In other words, you’ll understand how every upgrade introduced with ETH2 affects the popular network and what that means to the DeFi sphere and the entire world.
Proof-of-Stake Replaces Proof-of-Work
One of the major changes that took place with the introduction of ETH2 is a switch to Proof-of-Stake as a consensus algorithm. To learn why this is such a big deal, we first need to discuss Ethereum’s initial consensus protocol.
Proof-of-Work: How Does It Work and Why Was it Replaced?
Since its inception, Ethereum has used Proof-of-Work (PoW) as the default consensus mechanism. In other words, PoW is a protocol that helps with achieving consensus on the network.
To do that, PoW relies on the so-called miners. Miners own computers with immense computing power, which are part of the blockchain network. They compete with each other to solve complex mathematical puzzles and get rewarded.
Simply put, PoW uses computing power for validating transactions.
There are two major disadvantages of PoW:
- It consumes too much energy. — When thousands of powerful computers are involved in the process, a lot of energy goes to waste. This is not good for the environment. According to this Digicomist’s chart, Ethereum consumed 20+ TW/h in 2018, when it was traded the most. For example, the entire country of Ireland recorded 26 TWh annual energy consumption in 2017. The good news is that this improved with Ethereum over time, while Bitcoin’s PoW consensus has been consuming 70+ TWh for the past two years during high traffic periods. Convert that to related emissions, and you get BTC and ETH as huge polluters.
- Security issues. — Even though Bitcoin and Ethereum are massive networks where 51% attacks are almost impossible to happen, other small networks could become victims to such a strike giving the attacker enough mining power to set the rules.
Luckily, PoW wasn’t the only consensus algorithm out there, so the team working on the Ethereum network wanted to use a more secure and environment-friendly alternative called Proof-of-Stake.
Proof-of-Stake: How It Solves Many Issues on the Ethereum Network
With an increasing number of users and huge transaction volume, Ethereum needed a more efficient consensus, and Proof-of-Stake seemed like a perfect option. That’s why Serenity’s primary goal was to replace PoW with PoS.
PoS doesn’t need miners. In fact, there’s no need to spend computer power at all.
The simplest way to explain PoS is that economic incentives play an essential role in this model. Users who want to take part in the network’s operation will stake ETH and get the role of a validator.
Every validator will have a task to validate transactions, which is what miners do in PoW systems. They will receive incentives for their work in terms of transaction fees and block rewards, just like “miners” would receive ETH in the first version of Ethereum.
The PoS consensus was introduced to the Ethereum network via the Beacon Chain. You can think of it as a cornerstone for further upgrades on the network. In other words, it will help with expanding ETH2, setting up the stage for shard chains and more.
Here’s Ethereum’s presentation page for the Beacon Chain.
How to Become an ETH2 Validator?
Everyone who wants to become part of the consensus system governing Ethereum 2.0 will have to deposit a total of 32 ETH into their official Ethereum 2.0 deposit contract, which was created by the Ethereum Foundation.
However, 32 ETH can be a lot of money, depending on the current value of ETH. Therefore, you can stake even less if you want, but you’ll have to use a staking pool, where you can join forces with other stakeholders to have a bigger impact on the network. Some of these pools allow staking as little as 0.01 ETH.
There are already all kinds of staking services that can help you become a validator by depositing your ETH in a staking pool.
At this moment, you’re probably wondering how much you’ll earn by being a validator.
The answer mainly depends on the number of ETH staked in the system. If there’s less than a million ETH staked, the annual rewards can be over 18%. This will decrease with more ETH being staked into the system. Once there’s more than 100 million ETH in the system, the annual incentive will be 1.81% or even less.
There’s an excellent overview of things you should take into account before staking on Ethereum’s dedicated staking page.
Keeping the System Honest with Slashing
Once someone becomes a validator, how can you make sure that they won’t validate fraudulent transactions?
If something like that happens, validators get punished via a mechanism known as slashing.
Since validators staked part of their ETH wealth to gain that status, they will have to give up part of the stake as a punishment for their fraudulent behavior. The confiscated amount is then either burned or distributed to other stakeholders on the network.
The biggest amount they have to let go of is 32 ETH, which is how much they needed to become validators in the first place.
Lowering the Possibility of 51% Attack
We listed 51% attacks as one of the critical security issues with Proof-of-Work. The attack is far more challenging to accomplish with PoS systems, especially big ones such as Ethereum.
First, let’s explain how a 51% attack works.
For a consensus to be achieved on a decentralized system, the majority of nodes must agree on the current state of the network. To get the majority, you need 51% of nodes to agree. If someone happens to control the majority, they will be able to successfully pull off a 51% attack and command the network’s rules.
To make one such attack on a huge PoS-based network, the attacker would need to invest a tremendous amount of money to gain at least 51% of nodes. However, this is hardly profitable in the case of ETH2 considering the size of the network. There’s a nice blog post on Good Audience explaining 51% attacks in detail if you’re interested in learning about this issue in depth.
Proof-of-Stake: The Three Major Benefits
Proof-of-Stake was a major change on the Ethereum network, and its creators believe it was inevitable from the very start, as it solves three major problems of Ethereum 1.0. Let’s take a look at how PoS made the network better.
- It’s more sustainable — PoS doesn’t require miners to solve complex math problems using thousands-of-dollars-worth rigs and polluting the planet along the way. No more energy-intensive operations are required to take part in the network.
- Increased security — 51% attacks are much more difficult with a PoS consensus system, as attackers will need a lot of money to pull it off. It’s still theoretically possible but highly unlikely to happen.
- It’s scalable — PoS unlocks the possibilities for sharding, which would be difficult to achieve if Ethereum retained the PoW model.
Now, you’re probably not familiar with sharding, and that’s because we didn’t mention it before. Sharding is, in fact, the second biggest upgrade to the Ethereum network after PoS, and that’s why it needs a section of its own.
Let’s explore it.
Sharding: A Solution to Scalability
In ETH2, sharding will help with the network’s capacity to process transactions and store data. PoW blockchains, including Bitcoin and ETH1.0 are prone to congestions whenever there’s a lot of traffic. Transactions become much slower, as the network cannot scale appropriately, following the increased number of users.
The solution to this is sharding. Although it is yet to be implemented, Vitalik Buterin already promised much better transaction times. Here’s the comparison:
- Ethereum 1.0 — 15 TPS (transactions per second)
- Ethereum 2.0 — 100,000 TPS
Before we start discussing the topic, let’s focus on the scalability issue that PoW model-based networks face.
Proof-of-Work Scalability Issues & Possible Solutions
When Bitcoin was created, Proof-of-Work was a perfect consensus mechanism. Since there weren’t that many Bitcoin transactions at first, all worked quite well.
The first issue started when the number of transactions started increasing. For both BTC and ETH, this happened for the first time in 2017, when the bull run made both cryptocurrencies reach their peak in value. It resulted in slow transactions and increased gas fees on the ETH network. The same thing happened in 2020 when DeFi as a concept became popular.
The talk about scalability was inevitable both times, as the network failed to provide the best possible service, overburdened with the number of transactions.
We’ll not get too technical (there will be time for that when we start explaining sharding). Instead, we’ll just point out that the inability to create new blocks fast and meet the increasing volume of transactions meant that it was difficult for both Bitcoin and Ethereum to scale adequately.
The two possible solutions for staying on PoW and increasing scalability are:
- Increase block size — The original block size was just 1 MB, but it eventually increased to meet the demand. One of the solutions is to keep increasing the block size. However, this is just a temporary solution, meaning the block size would have to increase every time the number of transactions increases. This would require more network bandwidth and possibly lead to more centralization, giving an edge to those with faster connections.
- Off-chain scaling — Once the number of transactions becomes too big for on-chain transactions, different payment channels can be created without actually being part of the blockchain. While this seems like a reasonable solution, it kind of questions the existence of blockchain in the first place.
The only valid long-term solution was to introduce Proof-of-Stake and try to find an adequate process that would make transactions much faster.
What Is Sharding?
It is a process that aims to solve blockchain scalability problems long-term. Even though the concept of sharding is not new, its use in the blockchain sphere is pretty fresh but showed huge potential.
Sharding is actually a pretty common process used by computer scientists around the globe. Essentially, it allows splitting a database into instances, which are called shards. All of them contain part of the entire set of data from their “parent” database.
But why would someone “shard” a database? Well, if an app gets a sudden increase in traffic, it will need to scale without compromising the integrity and security of data, and sharding seems to be the most efficient way to do it. Check out this article if you want to learn more about sharding.
However, please take into account that the entire thing will look a bit different on Ethereum, as sharding will be applied to a decentralized network.
Sharding on ETH2
Every shard made on the Ethereum network will be a separate new chain. At first, there will be a total of 64 new shards, and they will immediately help with Ethereum’s scalability issue.
Simply put, the entire load of the network will be spread with the help of shards.
What matters here is that every node on Ethereum will store just one shard. Therefore, it won’t store the entire data, only a portion of it, which means powerful hardware won’t be necessary (which also affects the sustainability issue).
The most important reason for making nodes easier to run is attracting more network participants, achieving a higher decentralization level, and increasing network security.
However, the shards won’t be able to process transactions and smart contracts at first — just extra data. This may seem unusual as it appears that the entire network loses its purpose, but the answer lies in Layer 2 scaling.
Layer 2 Scaling
There are two ways to scale blockchains:
- Layer 1 Scaling — Scaling the base layer (introducing PoS and sharding with ETH2)
- Layer 2 Scaling — Scaling the network (transport some of its load to a different layer)
Right now, all the biggest blockchains use Layer 1, starting with Bitcoin. What Ethereum is doing is creating an additional layer on top of its base layer, which is often referred to as Layer 2.
The main advantage of such an approach is that you don’t have to change anything in the base layer. Moreover, you can use some of its existing elements, including smart contract, to build Layer 2. This also enhances the security of the entire blockchain.
Instead of just scaling the base layer by changing the consensus model and adding sharding, Ethereum’s developers decided to use the mixed approach and use the possibilities of Layer 2 as well to maximize scaling.
By adopting such an approach, the devs want to avoid lowering security and increasing the centralization potential of the network.
What exactly Is Layer 2 Scaling?
This is an umbrella term incorporating all solutions that take transactions off the chain and improve Layer 1’s operations. Some of these solutions, such as channels, are already in use in Ethereum. Other Layer 2 scaling solutions are plasma, sidechains, and rollups. If you’re interested in them, make sure to read Ethereum’s official guide on Layer 2 scaling.
In this article, we’re going to focus on rollups, but to explain them, we’ll have to touch upon the notion of sidechains.
Sidechains & Rollups
Essentially, a sidechain is an independent blockchain that’s compatible with Ethereum.
Even though they have block parameters and consensus models of their own, they are still using the identical Ethereum Virtual Machine (EVM) to achieve interoperability with the Ethereum base-layer blockchain.
If a smart contract is deployed on Ethereum, it can be further deployed to one of its side chains. In other words, transactions take place on sidechains and are recorded there. But are they recorded on Ethereum?
In a way, they are, with the help of the so-called rollups. Their purpose is to roll up all transactions that took place on a sidechain into a single transaction. Rollups then generate a SNARK (succinct non-interactive argument of knowledge) which is stored on Level 1.
Therefore, it’s safe to say that the base Ethereum layer only stores the data about transactions, whereas transactions themselves take place on sidechains.
And that’s the key part: since only data is stored (no transactions or smart contracts), it’s stored inside shards on the base layer. That’s how sharding turned out to be a smart move to scale the base layer.
Most importantly, that’s how Ethereum 2.0 plans to reach the number of 100,000 TPS — the mix of sharding and Layer 2 solutions (sidechains and rollups).
To learn more about this, check out Buterin’s post you can find at Fellowship of Ethereum Magicians called A rollup-centric Ethereum roadmap.
Even though shards can only accept data at the moment, Ethereum developers left the doors open to the idea of possible upgrades to them. Simply put, upgraded shards may be able to process transactions and smart contracts as well.
Whether they will opt to do it mainly depends on whether the rollup-centric solution will work in the future.
The Beacon Chain coordinates the PoS system. Essentially, every validator (staker) will be randomly assigned to validate a shard. Randomness plays a key role in the validating process, as it doesn’t allow some stakers to take over certain shards, keeping the network truly decentralized.
Docking: The Last Step to ETH2
The Beacon Chain was introduced on top of the current Ethereum chain that still relies on the Proof-of-Work model, featuring miners for validation. The final goal of ETH2 is to completely end PoW in any form on the network, and that can only be done during the so-called docking procedure.
Just like a ship is brought into a dock, the Ethereum mainnet will be docked to the ETH2 and become a shard itself, adapting to the PoS system and getting rid of PoW.
EVM to eWASM Transition
Right now, Ethereum uses the so-called Ethereum Virtual Machine (EVM). Basically, the EVM is an execution environment that is present on all nodes and helps with using smart contracts on the chain.
However, EVM’s design needs improvement, as it confuses even the best programmers in the world. That’s why Ethereum WebAssembly (eWASM) was proposed as a replacement, and it will be introduced as part of Ethereum 2.0. Some of the benefits of eWASM are:
- Smart contracts will execute at a near-native speed
- Programmers will be able to develop smart contracts in some of the traditional languages, including Rust, C, and C++
- Huge developer community and big toolchain.
Final Overview: The Ethereum 2.0 Timeline
Hopefully, you now understand the disruptive power of ETH2 and all the technologies it features. However, not all of them are going to be introduced at the same time. We already mentioned some loose dates in the introduction, but we’ll focus on Ethereum’s point of view in the conclusion.
Instead of discussing years, we’ll focus on phases that ETH2 devs created as part of the roadmap leading to full ETH2 integration.
- Phase 0: Launching the Beacon Chain — This took place on December 1, 2020, after the predetermined number of 16,384 validators was reached (November 24).
- Phase 1: Sharding — The Data Sharding phase is expected to take place in 2021.
- Phase 1.5: Docking — The ETH mainnet becomes one of the ETH2 shards. This is also expected to happen in 2021/2022.
- Phase 2 — How Phase 2 would look like depends on whether the data sharding + rollups combo would be sufficient. If it isn’t, the devs will have to come up with a solution for full sharding (upgraded shards that can process transactions and smart contracts in addition to just storing data).
The ETH2 now seems more real than ever, and it aims to make Ethereum more scalable, secure, and decentralized. Although Phase 0 is successfully launched, the entire transition is far from over. Buterin even tweeted what he imagines the roadmap would look like, so if you feel like going into the nuts and bolts of the entire process, make sure to check it out.