This post analyzes the most successful second layer solutions on the market to scale the number of transactions per second on Ethereum.
As of March 2022, Ethereum remains a layer one blockchain under a proof-of-work consensus mechanism. Due to the rise and accelerated growth of decentralized applications (Dapps) in the decentralized finance (DeFi) and the Non Fungible Tokens (NFT) space. It has a limit of 13 transactions per second, pushing transaction fees into the hundreds of dollars per transaction and out of reach for retail users.
While Ethereum is still trying to address its congestion problem with the long-awaited transition from proof-of-work to proof-of-stake (The Merge) and fragmentation, developers released many Layer 2 scaling solutions. This article tries to make sense of the most prominent Layer 2 solutions.
Different flavors of Layer 2 solutions
Layer 2 networks enable scalability, higher transaction throughput of the Ethereum blockchain. At the same time, they maintain the integrity of the Layer 1 blockchain, allowing for greater decentralization, transparency and security while reducing carbon footprint, less power consumption, which equals a more affordable, faster, and convenient user experience.
There are three main categories of Layer 2 scaling solutions available for the Ethereum network:
Sidechains (Sidechains/parallel chains).
Rollups, Optimistic Rollups and ZK Rollups.
A sidechain is a separate blockchain that runs independently and parallels the main Ethereum network. Sidechains can forge valid blocks(e.g., proof of authority, delegated proof of stake, Byzantine fault tolerance).
Sidechains connect to the Ethereum mainnet via a bi-directional bridge. They are EVM-compliant, meaning that if you want to use your DAPP on a sidechain, it's just a matter of implementing Smart Contract code on the sidechain. The leading Layer 2 Sidechain solution for Ethereum is Polygon.
Polygon ($MATIC / $12.3 billion market cap)
Polygon, formerly known as Matic Network, is both a sidechain and a sister chain to Ethereum. Jayanti Kanani, Sandeep Nailwal, Anurag Arjun, and Mihailo Bjelic created Polygon in 2017. American billionaire entrepreneur Mark Cuban invested an undisclosed amount in the Mumbai-based Indian cryptocurrency platform.
The parallel chains use the same key pairs as the main Ethereum blockchain. The owner's address on Ethereum can also access any number of sister chains. Other sister chains include XDAI and Optimism. People use Polygon's native token ($MATIC) to pay gas, participation, and governance fees. Polygon uses a Proof of Stake consensus algorithm and has the potential to handle up to 65,000 transactions per second. Transaction fees range from $0.001 to $0.1.
As of January 2022, Polygon reached a milestone of 7,000 Dapps and the most transactions it got in a single day was 9,177,310 transactions on Wednesday, June 16, 2021. According to DeFi Llama, at the time of this publication, the total value locked (TVL) of Polygon is $4.07 billion. The top DeFi apps are AAVE ($AAVE), which currently holds 30.59% of the TVL, followed by Quickswap ($QUICK) and Curve ($CRV).
State channels allow participants to perform multiple transactions apart from the base chain while sending only two transactions on Ethereum's Layer 1 blockchain.
State channels require a part of the blockchain state to be blocked by a multiple-signature (MultiSig) or a Smart Contract, so all participants must agree to update the state. Participants build and sign transactions with each other off-chain. The mechanism keeps congestion low on the chain and allows quick validation between transactions.
Then, the final state is signed and sent back to the blockchain, closing the state channel and unlocking the state once all participants have reached a final agreement. The leading solution for Layer 2 scaling of state channels for Ethereum is Celer.
Celer ($CELR / $313 million capitalization)
The Celer Network is a full-stack platform. It supports dApps such as gaming, online auctions, insurance, prediction markets, and decentralized exchanges. Mo Dong (Ph.D. UIUC) in San Francisco, California, and three other PhDs from MIT, Princeton, and UC Berkeley funded the Celer Network.
Developers launched its main alpha network on July 7, 2019. Its utility token is called $CELR. The network organizes in layers:
cChannel (state channel network similar to Bitcoin's Lightning Network),
cRoute (the payment routing module),
cOS (development framework).
Using Celer off the base chain helps developers create, operate, and use highly adaptable Dapps. Celer's LTV is $443.93 million.
With Rollups, transaction execution takes place outside Layer 1. The data gets published to Layer 1, once achieved a consensus. As the system includes transaction data Layer 1 blocks, Ethereum's native security protects the rolled-up information.
Rollup technology can help scale the current transaction limits at layer one from 10 to 45 TPS, depending on the type of transaction and its complexity, to between 1000 to 4000 TPS and more if the space for data sent is acceptable by layer 1 is increased.
Rollups offer a promising path to greater scalability once Ethereum has transitioned to Proof of Stake and other pending upgrades, such as sharding, providing transaction capacity of up to 100,000 transactions per second. Two different security models define two different types of accumulations: Optimistic Rollups and ZK Rollups.
Optimistic rollups send batches of transactions to Ethereum. They are "optimistic" because they assume that transactions are valid by default. In the event of a transaction dispute, it uses the concept of proof of fraud to reverse transactions if necessary.
Optimistic rollups run parallel to the Ethereum chain at layer 2. They can offer scalability improvements because they do not perform any computation by default. Instead, they propose the new state to the main network after a transaction. An advantage of optimistic rollups is that they can execute smart contracts, whereas ZK cumulative packages are mainly limited to simple transactions.
Optimistic cumulative packages can offer up to 100x improvements in scalability, and 99% of layer 1 dApps can be reused and deployed without alterations.
A significant disadvantage of optimistic accumulations is the long time users have to wait to safely withdraw funds to Layer 1, in some cases up to a week. Still, some projects have found solutions to speed up this process. The best optimistic Layer 2 scaling solution for Ethereum is Optimism.
Optimism is an optimistic rollup-based layer 2 scalability solution for Ethereum that can support all Ethereum dApps. Instead of running computations and data storage on the Ethereum network, Optimism puts all transaction data on-chain and its computations off-chain, increasing Ethereum's transactions per second and reducing costs in transaction fees. Optimism does not have a token.
Benjamin Jones and Kevin Ho in New York, NY. created the optimism mechanism. They launched their mainnet (mainnet) on December 16, 2021. According to DeFi Llama, the network's total stored value (TVL) rounds $385.66 million.
Optimism can provide between 200 to 2000 transactions per second. It also allows network participants to take part in an auction for the ordering of transactions. These actors are named "sequencers" and "verifiers." Sequencers are nodes responsible for executing transactions at layer 2 and sending the transaction data and new state existing at layer 2 back to Ethereum layer 1. Verifiers are nodes responsible for testing frauds. Verifiers do this by comparing the new root state with the state sent by a sequencer.
Both sequencers and verifiers run L2gEth, a modified version of gEth, the most popular implementation of the Ethereum protocol, written in the goLang programming language.
Zero-knowledge rollups execute the off-chain computation and send a proof of validity to the layer 1 chain, accumulating hundreds of off-chain transfers and building a cryptographic proof. These proofs can come as a SNARK (non-interactive succinct knowledge argument) [PDF] or a STARK (scalable transparent knowledge argument) [PDF].
The SNARKs and STARKs are proofs of validity consensus algorithms and get published in Ethereum's layer 1. There is a ZK-rollup Smart Contract to maintain the state of all transfers in ZK Rollup layer 2. You can only update the state with proof of validity. No transaction data is needed, only the proof, making block validation faster and cheaper, as the process uses fewer data.
Zero-knowledge rollups, unlike optimistic rollups, do not assume that all participants are acting in good faith but rely on evidence to ensure that this is indeed the case. ZK-Rollups are computationally heavier than Optimistic Rollups, making the hardware requirements for ZK-Rollup computers more demanding.
The mechanism constantly checks the state, so ZK-Rollups do not have long periods to fall back to Layer 1, and users can enjoy instant liquidity. However, ZK-Rollups also have some drawbacks. Given the complexity of testing, it is more challenging to create zk-Rollups compatible Virtual Machines, making it difficult to launch and scale dApps without rewriting them. The best ZK-Rollup Layer 2 type scaling solution for Ethereum is Loopring.
Loopring ($LRC / $1.38 billion market cap).
Loopring is a decentralized token exchange protocol. Loopring operates as a public set of Smart Contracts responsible for trading and settlement, with a group of off-chain actors aggregating and communicating orders. Daniel Wang and Jay Zhou founded Loopring in Shanghai, China. Daniel Wang worked at Internet companies such as Google and JD.com.
Loopring ($LRC) launched in 2017, and Loopring's decentralized exchange went live in February 2021. Loopring's LTV is $364.21 million. Loopring has a high throughput of approximately 2000 transactions per second and guarantees the same level of security as the Ethereum blockchain. It makes use of zk-Rollups. Loopring is blockchain independent, and you can integrate any Smart Contract blockchain into it.
Loopring's decentralized exchange runs on its native utility token ($LRC), which is used for governance, incentivizing good behavior, and paying transaction fees on Loopring's decentralized exchange. 80% of transaction fees go to liquidity providers, and the system splits the remaining amount between insurers and the Loopring DAO.