Ethereum’s Layer 2 Solutions – What Are They and What Are Their Benefits?
Bware Labs Team
Along with the switch to the Proof-of-Stake mechanism, Ethereum promised to be able to process between 20,000 and 100,000 transactions per second. But this promise will become a fact in a few years, as currently, Ethereum can only reach around 30 transactions per second.
Faced with the blockchain trilemma, Ethereum has prioritized decentralization and security. Layer 2 platforms came to solve the speed issue but also brought huge gains in reduced costs.
Here’s all you need to know about Ethereum’s Layer 2 solutions and the benefits they provide.
What are Ethereum’s Layer 2 Solutions
Ethereum’s Layer 2 refers to solutions built on top of Layer 1, aiming to ensure a large number of users will still use Ethereum. Technically, Ethereum goes from a monolithic system to a modular multi-layer approach, delegating some of the workload to other layers on the network.
Layer 2 solutions reduce the transactional burden and lower the gas fees. Apart from this, users will enjoy the same security measures and decentralization as Layer 1 (Ethereum mainnet), and all their transactions are irreversibly recorded on the mainnet once they reach “complete” status.
Examples of Ethereum Layer 2 solutions include Immutable X, Polygon, Optimism, Arbitrum, Shiden, or Polkadot.
How Layer 2 Works
To use a Layer 2 network, you need to have access to assets on Ethereum and link them to a Layer 2 chain. The entire process can be summed up in two steps:
- Nodes that form Layer 2 blockchain process submit bundles of transactions and send them to Ethereum.
- Ethereum checks these transactions while handling security, decentralization, and data storage.
Several Layer 2 networks can run simultaneously on top of Ethereum, generating a larger number of transactions running per second, making Layer 1 less congested and more scalable.
The outcome is that builders and developers can deploy more dApps and DeFi protocols with significantly lower gas fees, enjoying an overall user experience exactly as if they’d use Layer 1.
Types of Layer 2 Solutions
Channels
Channels allow you to create a peer-to-peer channel between two parties, where you can send an unlimited number of transactions back and forth until you settle and submit two transactions to the mainchain Layer 1; the first of the two transactions opens and the second one closes the connection between Layer 1 and Layer 2.
Popular types of channels are:
- state channels – used for general state updates
- payment channels – used for virtual payments, and state channels deal with general state updates
The downside of these channels is that they can only be used for transactions, not smart contracts.
Plasma Chains
Plasma chains, sometimes referred to as “child chains” are essentially a bunch of Merkle trees that always have to interact with the mainchain to batch back transactions via smart contracts. Each child chain has its own validation and consensus mechanism, nodes, block size, and block time.
Guided by smart contracts’ rules, participants can move digital assets between the mainchain and child chains. Users have the option to leave the plasma chain and move to the mainchain if they suspect fraud.
Compared to channels, plasma chains offer the benefit of sending assets to anyone instead of limiting a transaction between two parties only. The disadvantage of plasma chains is that users can wait even up to 2 weeks to withdraw their funds; this long period is due to verifications to check fraudulent transactions.
Sidechains
Sidechains are secondary blockchains that only use parts of Layer 1. They’re known as hybrid scaling solutions because they only borrow information from the main blockchain. Besides that, sidechains use their own VMs (virtual machines) and consensus mechanisms to execute smart contracts or validate transactions. That means Ethereum’s security does not protect them, but they ensure their own security properties. For this reason, sidechains are considered a bit centralized since they trade security in favor of speed.
Rollups
Rollups are regular smart contracts that post transactions on Ethereum’s mainchain, but execute all the transactions’ activity on a sidechain. Yet, the mainchain and sidechain are synced together, so they always run and communicate in parallel.
The name “rollup” comes from how they perform, as they roll up many transactions into a single one, using an EVM inside the rollup layer. This way, they check transactions and incentivize the correct ones.
There are two types of rollups: optimistic rollups and Zero Knowledge (ZK) rollups.
The Benefits of Layer 2 Solutions
Layer 2 solutions bring advantages like:
- Higher scalability and performance: by not processing transactions on the mainnet but on third-party networks instead, they reduce Layer 1’s workload and burden of processing a large number of transactions
- Bigger throughput: many Layer 2 platforms can run simultaneously on top of Ethereum, thus generating an increased number of transactions/second
- Lower transactions cost: transactions are compressed into one package before they’re sent to the mainnet, reducing gas fees
- Freedom to implement any solution: many Layer 2 solutions are built for specific applications or use cases, designed to optimize certain features. For instance, ImmutableX is dedicated to game developers, while Loopring enables simpler ways for developers to build DeFi products.
Conclusion
Today, Layer 2 networks are the common answer to Ethereum’s scalability problem.
While many are still in the development or testing phase, Ethereum’s Layer 2 solutions promise widespread adoption and a multichain world supported by security, decentralization, and scalability altogether.
If you’re interested in starting to build on Layer 2 blockchains, use Blast API as a gateway to Polygon, Optimism, or Shiden.