What is L2 and why is it needed?
Ethereum 1.0 found its killer application in the DeFi ecosystem. But, with growing adoption — scalability, robustness, and economic viability of the infrastructure layer are becoming critical to the long term success of not only Ethereum but also PlotX like dApps built on it.
If users need to pay $80 in gas fees simply to withdraw a $60 reward then there’s no point in pressing that ‘Withdraw’ button. And while it is true that this is only the case when the Ethereum network is clogged due to network’s current limitations and temporarily increased usage, it doesn’t affect the fact that it still happens.
So, it is clear that both Ethereum and the projects built on top of it need scalability solutions to meet the demands of an ever-growing DeFi community.
In general, there are two major ways of handling scalability: (i) scaling the base layer itself — Layer 1 or (ii) scaling the network by offloading some of the work to another layer — Layer 2.
The first option, scaling the base Ethereum layer in the form of the Ethereum 2.0 upgrade, will drastically help the applications built on Ethereum’s current foundation, like PlotX, to scale up their services to meet the demands of the ever-growing DeFi community.
While this update might be a great solution for projects that want to stay on the base Ethereum layer, the phased roll out over the next two years might be a bit too drawn out to meet the ever-growing demand for their applications. And the immediate solution will be Layer 2.
So, what exactly is layer 2?
Layer 2 scaling is an umbrella term for solutions that help with increasing the capabilities of the base Ethereum blockchain by handling transactions off the main Ethereum blockchain and on a secondary chain. The two main capabilities that are improved with L2 scaling are (i) transaction speed, and (ii) transaction throughput. It doesn’t require any changes in base Ethereum layer and can be just built on top of it using existing its components, like smart contracts.
Ethereum can currently process around 15 transactions per second (TPS) on its base layer. With the help of layer 2, it can drastically increase this number; from 15 TPS to a couple of thousand TPS.
This not only helps in the processing time of transactions but also brings down the gas fees required for each transaction taking place on layer 2, thus drastically increasing the economic viability of the network as well.
Additionally, the concept of layers isn’t even an Ethereum-specific concept. Other blockchains already use it extensively. For example, Bitcoin!
How is it done?
When talking about scaling solutions, there are multiple choices available. Some offer to increase the Ethereum network throughput in the near to medium term, while others aim for medium to long term solutions. Some are application-specific, while others are a little more general-purpose.
So, to understand the differences between all these solutions a little better, let’s explore some of the most popular types of layer 2 scaling solutions, and maybe ponder upon which one would be best suited for a project like PlotX:
- When it comes to scaling solutions, Channels are one of the first widely discussed solutions. They allow participants to exchange transactions off-chain x number of times, while only submitting two transactions to the base layer. The most popular types of channels are state channels and their subtypes — payment channels.
Although channels have the potential to easily process thousands of TPS, some of their downsides are that while using channels, participants have to lock-up their funds in a multisig contract, which practically means no support for open participation. Moreover, this scaling solution is application-specific and cannot be used to scale general-purpose smart contracts.
- Plasma is a layer 2 scaling solution that was proposed by Joseph Poon and Vitalik Buterin. It’s a framework for building scalable applications on Ethereum that leverages the use of smart contracts and Merkle trees to enable the creation of an unlimited number of child chains which are copies of the parent Ethereum chain.
Offloading transactions from the main chain to a child chain allows for fast and cheap transactions. But, on the other hand, one drawback is that users have to wait several days before they’re able to withdraw their funds from the child chains. Moreover, just like Channels, Plasma also doesn’t support general-purpose smart contracts execution.
- Sidechains are Ethereum compatible, independent blockchains with their own block parameters and consensus models. These sidechains are connected to the main Ethereum chain by a two-way bridge. Hence, contracts deployed to the Ethereum base layer can also be directly deployed to the sidechain.
- Rollups provide scaling by bundlings aka rolling, sidechain transactions into a single transaction, and generating a cryptographic proof, also known as SNARK (Succinct Non-interactive ARgument of Knowledge), that is submitted to the base layer. With rollups, all transaction state and executions are handled on sidechains. The main Ethereum chain only stores transaction data.
There are two types of rollups: (i) ZK Rollups, and (ii) Optimistic Rollups. ZK Rollups, although faster and more efficient than Optimistic Rollups, do not provide an easy way for the existing smart contracts to migrate to layer 2. Optimistic Rollups, on the other hand, run an EVM compatible virtual machine called Optimistic Virtual Machine (OVM) which allows for executing the same smart contracts that can be executed on Ethereum.
These are the most popular ways of layer 2 scaling that you’ll find most of the DeFi projects adopting when they migrate to L2.
As for which one of them will be finalized for PlotX… well, you’ll just have to wait a little to find that out.
Ethereum 2.0 will introduce proof-of-stake and sharding that will drastically increase the transaction speed and transaction throughput capabilities of the base layer. But does this mean that we won’t need layer 2 scaling once Ethereum 2.0 rolls out? Not really. This is because even with this massive new update, Ethereum will still not be able to handle the hundreds of thousands or even millions of TPS demand that it’ll eventually face due to increasing adoption.
At this point, one could argue that we should skip layer 2 scaling and just focus our efforts on scaling the base layer instead. But this would require highly specialized nodes to handle the increased workload, which would lead to higher centralization and therefore lowering security and censorship-resistant properties of the network.
Sticking to the fact that scalability should never come at the expense of security and decentralization, we are left with a combination of layer 1 and layer 2 scaling going forward into the future. And yes, that applies to PlotX as well.
Check out the PlotX Beta App (Live on the ETH Mainnet)
Get the latest updates from PlotX:
Join the tribe, become a PLOT Head!