We have been trying to catch up since the advent of web 3.0 and blockchain technology, but everything keeps evolving and leaving us behind. Just yesterday we were looking at blockchain protocols on layer one and today, developers are already exploring layer two as a solution to scalability on a global level of blockchain usage because with every technology comes the need for continuous improvement and adaptation.
Feeling left out whilst wondering what layer two is all about- the need and idea behind it, plus the protocols and their respective use, pros and cons? Grab a seat as we delve into the rise of layer two protocols.
What Are Layer Two Protocols?
Don’t fret; we were not about to drag you down this road without us looking at what layer two protocol is really about.
Off-chain blockchain protocols, also known as second-layer solutions or layer two protocols, are designed to improve transaction speeds on blockchain platforms.
They lift the scalability limitations and difficulties in operation without compromising security and decentralization of the network like existing layer one protocols. You can liken these protocols to the way Bitcoin Profit solves the security issues of many crypto platforms.
Still Don’t Understand Why Layer-Two Is Coming to Play?
There has been so much going on with the decentralized world as developers keep building on the Ethereum blockchain. Ethereum has been changing the decentralized world through many projects- DeFi, NFTs, gaming, and the metaverse.
With tons of things going on out there, system congestion and clogging came on naturally, spiraling the cost of the transaction out of control.
Developers are exploring solutions to fix this, such as sharding. But an immediate fix to this arising issue is layer two, a scaling solution that takes transactions off the mainnet of Ethereum- layer one.
Layer Two Projects and Technologies
According to the industry website- L2 Beat- there is more than 5 billion USD now locked on layer two protocols which is a rise from the September value of just 1 billion USD, as activities on Ethereum move primarily to the layer two protocols.
It is worth noting here that, there has been a number of different layer two technologies around as far back as 2019 with a steady climb in adoption since last year, 2021.
Some layer two technologies brought about to achieve second-layer scalability solutions are;
A Nested blockchain is a blockchain atop another blockchain. As the name implies it is nested. Designed in such a way that a chain can function on top of the other, it consists of the main chain and secondary chains.
The main/primary chain assigns tasks and is responsible to monitor that all transactions follow parameters. Secondary chains perform tasks, the transactions.
Unlike in Nested blockchains, in state channels, the transactions can be performed without involving the primary chain.
This brings about fast processing rates as miners spend minimal time and validations are done with mechanisms of smart contracts.
In state channels, layer 1 blockchains are not needed to validate transactions, but upon completion, the results are stored on the primary layer.
Designed to handle large amounts of transactions, Sidechains are side blockchains linked to the primary chain.
In the blockchain, a side chain assists the primary chain to validate various transactions, giving the primary chain enough time to handle security.
Unlike state channels, Sidechains store transaction data on the public ledger.
Optimistic rollup is one of the two different approaches to Rollups (the other being zero-knowledge rollup). Rollups are currently the preferred layer two solution for scaling Ethereum.
By using rollups, one can reduce gas fees by up to 100 times compared to layer 1.
Optimistic rollup being the most popular rollup approach is a type of layer 2 offchain scaling technology built to run on top of Ethereum’s base layer.
Expected to scale up about 100 times better than Ethereum blockchain layer 1, optimistic rollups are designed for interoperability between layer 1 and layer 2.
Unlike Sidechains, optimistic rollups publish transaction results on-chain but store the transaction data off-chain.
The Rise in Layer Two Protocols
The recent rise in layer two protocols can be attributed to the launch of Arbitrum and Optimism, in September 2022, the protocols witnessed a new all-time high based on transaction counts.
When combined, these networks account for about 40 percent of total Ethereum transactions according to data from Tomas Tunguz. Other top layer two protocols of Ethereum are dYdX, Loopring, DeversiFi, Boba Network, ZKSwap V2, zkSync, Metis Andromeda, ImmutableX, StarkNet, Polygon, etc.
In the following sections, we will be looking at Arbitrum and Optimism as two of the largest Layer 2 scaling solutions built on optimistic rollup technology with a universal purpose.
Arbitrum is a layer two protocol for the Ethereum blockchain that uses the scaling technology of optimistic rollups. Arbitrum achieves a throughput of up to 40,000 per second at a gas cost that is significantly lower than that of the Ethereum mainnet.
From our earlier description of optimistic rollup technology, only a small amount of data is needed for computation and storage as transactions are not performed on the Ethereum mainnet. This brings about lesser gas fees and Ethereum is less clogged.
According to Arbiscan, Arbitrum boasts over 720,000 unique addresses as of June 2022 and is growing fast. Daily, between 50,000 and 100,000 transactions are processed and Arbitrum has about 1.5 billion USD in total value locked.
Arbitrum is built by Offchain Labs, a team of researchers, engineers, and Ethereum enthusiasts. Said to be built for Ethereum developers by Ethereum developers.
There are more than 80 DApps currently running on Arbitrum with some of the best like Dopex, Sperax USD, Beefy Finance, and Jones DAO. Some of the best decentralized exchanges (DEX) on Arbitrum are SushiSwap, GMX, Curve, Balancer, and Uniswap.
How to Use Arbitrum
The following steps are a simple guide to how you can use Arbitrum:
- First, connect to the official Arbitrum Bridge.
- Then transfer ETH to Arbitrum.
- Add the Arbitrum network to your wallet.
- Finally, access the DApps on Arbitrum through the Arbitrum One Portal.
Led by Optimism Foundation, a nonprofit organization dedicated to growing the ecosystem, Optimism is a layer 2 blockchain on top of Ethereum. Just like Arbitrum, Optimism uses the optimistic rollup technology to scale up transactions on the Ethereum mainnet. Optimism is fast, stable and scalable.
Alongside Arbitrum, Optimism is one of the biggest scaling solutions for Ethereum with about 300 million USD in TVL- total value locked.
It is home to more than 30 Protocols with the biggest ones being a derivative exchange- Synthetix, SNX; a decentralized exchange- Uniswap, UNI; an automated market maker, AMM- Velodrome, VELO. Optimism is designed to be simple, pragmatic, sustainable, and optimistic.
These four design constituents influence Optimism as a whole.
How to Use Optimism
The Optimism network is easy to use as per its design.
The function itself features a wallet with a friendly and intuitive user interface.
Users can transfer Ethereum and other coins. Once the currency is transferred, it can be used as part of transactions conducted on Layer 2.
Here are the simple steps to using Optimism:
- First, visit the Optimism website.
- Then connect your wallet from the allowed list of wallet providers. MetaMask is the most commonly used wallet for Ethereum transactions.
- You can then make a deposit. Once received, the network will begin depositing your digital assets to Optimistic Ethereum
- You will need to confirm the transaction, including the gas fee, when conducting the operation.
- And, you are done! These should take just a few minutes.
Optimism Smart Contracts
The smart contracts in the Optimism layer two protocol can be separated into the following key components:
- Chain Contracts on layer one, which hold the ordering of layer two transactions, and commitments to the associated layer two state roots.
- Verification Contracts on layer one implement the process for challenging a transaction result.
- Bridge Contracts facilitate message passing between layer one and layer two.
- Predeploys which is a set of essential layer two contracts that are deployed and available in the genesis state of the system. These contracts are similar to Ethereum’s precompiles, however, they are written in Solidity.
Arbitrum vs Optimism
The first obvious similarity between these layer 2 scaling solutions is their use of optimistic rollup technology, but this does not deter them from having fundamental differences.
Arbitrum and Optimism both use fraud proofs which are ideal for scaling solutions because they are deployed only when invalid blocks are detected, instead of with every transaction.
This saves the computational resources of the network. They both allow tokens to move between layer 1 and layer 2. Their transactions are finalized the moment the block is created, instead of undergoing a series of conformations resulting in a high throughput network.
The technical differences between these protocols are irrelevant to the average user. Major difference is the fact that Arbitrum has no governance token whereas Optimism issued theirs in May 2022.
Although both protocols are EVM compatible, Optimism uses Ethereum’s EVM while Arbitrum uses its own- Arbitrum Virtual Machine. This gives Arbitrum the edge to back all EVM-compiled languages while Optimism has only a Solidity compiler.
Launched the same year, Arbitrum has more live projects, a bigger ecosystem, and higher TVL- total value locked than Optimism.
Optimism uses single-round fraud proofs (executes transaction proof in one round on the layer one chain), whereas Artibrum uses multi-round fraud proofs executed off-chain (executes transaction proof in several rounds off-chain).
Multi-round fraud proofing is the more advanced of the two, with it being cheaper and more efficient than single-round proofing.
Arbitrum is not DAO governed, with the protocol run solely by Offchain Labs whereas Optimism is a DAO.
While Optimism lays out its development roadmap until 2024, Arbitrum does not have any of its future plans publicly available.
Pros and Cons of Layer Two Protocols
Just like every system and design, layer 2 protocols have pros as well as cons.
Here are the importance of layer two protocols to the blockchain ecosystem:
- Better Security
A layer 2 protocol builds on and complements the active base layer without tampering with the original blockchain design, thereby not compromising its security.
- Better Scalability
As scaling is the biggest issue of the blockchain and the main reason for a second layer, this offchain scaling solution increases the throughput- transaction per second rate of the network.
This is great for scalability and ensures a good expression regardless of network load.
- Higher Transaction Speed
Just as seen with scalability, layer two protocols can be used for faster and better computations. As transactions can be done offchain, this reduces workload and increases speed as tasks are split between chains.
- Lower Transaction Fee
As blockchain relies on middlemen- miners, to validate transactions. Transaction fees spiral as more users join the network, this is because mining activities require heavy computing powers and miners select transactions with higher fees as they have limited computing power to meet the influx of users.
Layer 2 protocols aim to reduce the computing powers needed to process transactions, thereby enabling miners to process more transactions and users to pay lower fees.
In spite of their advantages, layer 2 protocols have significant drawbacks to the blockchain network. The benefits of any system come with a cost, and here is that of layer two protocols: For optimistic rollup protocols like Arbitrum, there could be a long withdrawal time in case of challenging transactions.
The liquidity of a blockchain network can suffer with the addition of a second layer.
Also, there could be onboarding issues, especially for new users.
Layer two protocols are designed to solve the blockchain scalability problem: keeping transaction fees low while the intake of users increases.
It can be deduced that protocols and working principles of Layer 2 show how important they are to the blockchain technology and cryptocurrency ecosystem.
Amidst pros and cons, the rise of layer two protocols is an innovative approach for resolving the scalability of the blockchain without affecting or compromising its security and decentralization. As the use of blockchain technology grows, it is safe to say that Layer two protocols are an important part of this evolving ecosystem.
And hopefully, this article has brought you up to speed with the trending technology.