Sidechains and L2 Scaling Solutions - #WFM 201
Sidechains, L2 Scaling Solutions, Rollups, State Channels, and more
It’s SXSW, and Elliot will be speaking at The Fortress Web3 Branding session on Sat, Mar 11 at 1pm. Please drop by and say hi if you’re around.
One more thing. Starting this week, we’re going to start providing an easy visual to illustrate how technical the article is going to be. In general, we’ll try to keep it at a 1 or 2. This week is a 4, so it’s basically super in the weeds at the nerd level and only for the most dedicated people (but not a 5 - which I hope we never write). If you’re a lay person, just read the summary.
TLDR Summary
Layer 1 blockchains are the base level of blockchain, such as Bitcoin and Ethereum. Bitcoin and Etherum both simultaneously try to achieve decentralization, security, and scalability, but lack in regards to scalability. Other layer 1 blockchains have been created largely with the goal of solving scalability.
Sidechains and layer 2s are a different kind of scaling solution. Rather than compete with incumbent L1 networks like Bitcoin and Ethereum, sidechains and L2 networks both supplement L1s, working in tandem with them. Sidechains are independent networks, connected through a two-way peg. Layer 2 scaling solutions are more directly connected to an L1, and they post state changes and transaction data back to Ethereum Mainnet through optimistic and zk-rollups. Layer 1, layer 2, and sidechains all try to solve blockchain scalability, but they do it in different ways.
Layer 2 Blockchain Networks: Scaling Solutions for Ethereum
By Harrison Smith, Head of Research @ Future Mints
Technical Level: 🛠️ 🛠️ 🛠️ 🛠️ (High - Nerds Only)
The blockchain trilemma (the difficulty for achieving optimal decentralization, security, and scalability simultaneously) is an issue that plagues even the top blockchains. Ethereum, the second-largest blockchain network in the world, has always prioritized decentralization and security over scalability, which in turn leads to high transaction fees and long transaction times.
Other L1 blockchain networks have been established largely with a common purpose: to solve scalability. As we discussed last week, this is often at the cost of decentralization or security.
Other scaling solutions try to solve the same problem in a different way. Layer 2 blockchain networks and sidechains are two solutions that work to augment and supplement Ethereum (or any other L1 network). Rather than competing with the L1 network, these solutions are built to be supplementary to L1s.
Although both sidechains and layer 2 scaling solutions both aim to solve scalability, there are some key differences between the two. A layer 2 solution is an extension of the main chain that builds upon its existing infrastructure, while a sidechain is a separate blockchain that is connected to the main chain.
Today, we’re going to dive deeper into this topic, explore the differences, and discuss the use-cases that have been developed across both sidechains and layer 2 scaling solutions.
Sidechains
Sidechains are separate and independent blockchain networks that connect with Ethereum. Compared to layered chains, sidechains are more independent and rely heavily on their own unique consensus algorithms to make transactions faster and more affordable. Oftentimes, this means that they don’t inherit the security properties of Ethereum.
Unlike layer 2 scaling solutions, sidechains do not post state changes and transaction data back to Ethereum Mainnet. To facilitate transfers back and forth between blockchains, sidechains use a two-way peg system. With a two-way peg, Ethereum can be locked on ETH mainnet, to unlock an equivalent amount of Ethereum on another chain. This allows digital assets to be seamlessly “transferred” back and forth between the mainnet and the sidechain.
The transfer of the assets is imaginary - they are not actually transferred, they are simply locked on the mainnet while the equivalent amount is unlocked in the sidechain. This is made possible through smart contract validation.
An example of a sidechain is the Liquid Network, which operates as a sidechain to Bitcoin. By using the features inherent in sidechains, the Liquid Network’s block discovery time is just one minute, far less than Bitcoin’s 10-minute block-time. The network also allows users to transact more privately, masking the amount and asset type being transferred.
Another example of a sidechain is Gnosis, a sidechain to Ethereum that revolves around xDai. Gnosis notably powers the POAP (proof of attendance protocol) that is commonly used throughout web3.
One of the most popular examples of sidechains is Polygon (formerly known as Matic Network). Since Polygon’s PoS chain uses Ethereum’s security, yet has its own consensus mechanism and a two-way peg, it is often described as both a sidechain and a layer 2 solution. Polygon’s PoS chain is most properly categorized as a sidechain, but the company Polygon has also developed l2 solutions.
Layer 2 Networks
Layer 2 networks are built on top of a L1 network, and often inherit the same level of security and decentralization provided from Ethereum. L2 blockchains’ roots stem back to a variety of earlier methods used to attempt scalability, including state channels and plasma.
The lightning network first utilized the concept of state channels. State channels are a type of layer 2 solution which allow for off-chain transactions between two parties. State channels rely on the security and consensus mechanism of the mainchain, and can be created with minimal overhead. State channels are primarily used for payment systems, particularly those between only two parties, and are generally limited in usability compared to modern sidechains and other L2 solutions, which generally have much broader capabilities.
We covered the lightning network and the implications it had on Bitcoin just over a month ago. The lightning network is the most dominant example of a state channel.
In 2017, Vitalik Buterin and Joseph Poon (the lightning network’s founder jointly proposed a scaling solution for Ethereum called Plasma.
Plasma aimed to increase the scalability of the Ethereum network by enabling the creation of child chains, or "Plasma chains", that can process transactions more quickly and cheaply than the main Ethereum blockchain.
The basic idea behind Plasma is to create a tree structure of Plasma chains, with each Plasma chain processing a subset of Ethereum transactions. Plasma chains are secured by a "parent" Plasma chain, which is in turn secured by the main Ethereum blockchain. This security model is achieved through a process called "commitment" where the parent Plasma chain periodically publishes a cryptographic hash of its state to the main Ethereum blockchain.
Like sidechains, a plasma chain is a separate blockchain that runs alongside the primary blockchain. Unlike sidechains, Plasma chains publish their “root” on Ethereum layer 1 and function based on the assumption that its consensus mechanism can fail. This design affords greater security but while rendering these chains unable to run complex operations.
The Plasma Group was formed, and the organization committed to the development of an L2 network as described in Vitalik’s writings. After a year of lackluster progress, the Plasma Group eventually ceased building the Plasma network.
Instead, the Plasma Group decided to reform and start anew, bearing a new name that mirrored their sentiment: Optimism.
Over the coming years, the idea of rollups came to life. Rollups bundle multiple transactions into a single transaction before sending it to the Ethereum mainnet. This allows for faster and cheaper transactions, while still benefiting from the security and decentralization of the Ethereum network.
Today, there are two main types of rollups: optimistic rollups and zk-rollups.
Optimistic rollups are off-chain scaling solutions built to operate on top of Ethereum. Each optimistic rollup is managed by a set of smart contracts deployed on the Ethereum network. Optimistic rollups process transactions off the main Ethereum chain, but post off-chain transactions (in batches) to an on-chain rollup contract. Like the Ethereum blockchain, this transaction record is immutable and forms the "optimistic rollup chain."
Optimistic rollups, such as Arbitrum and Optimism, are built to maximize scalability while minimizing trust assumptions. They use optimistic execution to achieve scalability, which means that transactions are executed off-chain first, and then verified on-chain at a later time. The rollup operator (which could be a single entity or a group of entities) publishes a batch of transactions to the main chain, and anyone can challenge any incorrect batch by submitting fraud proofs. Optimistic rollups are designed to be more decentralized and have lower costs compared to other layer 2 solutions, but they are slower and have higher transaction fees.
Coinbase’s new Base L2 chain is expected to be constructed on the OP stack.
Zk-rollups, such as Aztec and Immutable X, use zero-knowledge proofs to bundle transactions and prove the validity of a batch of transactions without revealing their content. This type of rollup allows for a higher degree of privacy and scalability compared to optimistic rollups, but requires more computation and higher transaction fees. In 2022, Vitalik argued that one day, all rollups will be ZK. He claims that ZK-rollups have fundamental advantages, despite being less developed than optimistic rollups.
While layer 1 blockchains are powerful tools, they struggle with scalability, and no layer 1 network has yet found a way to solve the blockchain trilemma. Rather than competing with Ethereum like L1s, sidechains and L2 solutions augment and supplement Ethereum.
Sidechains and layer 2 solutions offer a plethora of unique benefits, all aimed at once again solving scalability. As blockchain technology continues to evolve, we can expect to see more innovations in both sidechains and layer 2 scaling solutions. These solutions will play an important role in fighting the blockchain trilemma, working together with ETH rather than aiming to replace it.
In general, L1 solutions are thought to be the premier long term option, while L2 solutions are seen to be more practical in reality, right now.
With the continued development of layer 1 networks, sidechains, and layered networks, the future of blockchain technology is bright.
News of the Week
Lots of big news this week!
Amazon is reportedly planning to launch their own NFT marketplace on April 24th. There is yet to be an official announcement from the retailer with details, so for now, take the reports with a grain of salt.
Shares of crypto-friendly lender Silvergate Capital (SI) plunged 45% after a filing, said it needed more time to finish producing its annual report, citing the impact of recent events and questions about its ability to continue. Binance, Coinbase, OKX, and Paxos have all released statements regarding their exposure to Silvergate.
Yuga Labs’ latest NFT offering “Twelvefold” was auctioned off this week. The sale ended with 288 successful bidders spending over $16M in BTC.
Silicon Valley Bank (SVB) is experiencing a run on the bank. After announcing that they sold bonds for a $1.8B loss on Wed and then unsuccessfully trying to raise $2.25B, the bank’s stock has been halted and it’s down 60%+. Some of the biggest names in venture capital are saying that SVB may require a government bailout if a private buyer isn’t found and for founders to move their funds out of SVB.
The SEC was rebuked in federal court for basically the same reasons that many serious people in the crypto and blockchain industry are frustrated with regulators: No clear laws or regulations to follow and what seem to be arbitrary enforcement. “Judge Sarah Netburn, for the US District Court for the Southern District of New York, called the agency out for argumentative “hypocrisy,” writing that its vacillating arguments suggested the SEC was “adopting its litigation positions to further its desired goal, and not out of a faithful allegiance to the law.” Here’s hoping that this message is taken to heart and the SEC / US government finally begin to thoughtfully consider what regulation would look like so that we aren’t operating without any guidance or way to push back on regulation that is not enforced consistently.