Discover more from VeradiVerdict
Ethereum Scalability - L2s
VeradiVerdict - Issue #139
In early 2019, Pantera led the seed round of Offchain Labs, a company building Arbitrum, a scaling solution for decentralized applications on Ethereum using optimistic rollups. Look like Mark Cuban has even invested a bit more recently!
Last Friday, Arbitrum went live for developers, including support from the Uniswap community to deploy the exchange on their solution. Below you can read more about how Arbitrum works and how it compares to other Layer 2 solutions on Ethereum.
Ethereum’s massive popularity and transaction throughput has led to significant inefficiencies in the network, which is intentionally designed to prioritize security and trust over efficiency. This creates an awful user experience for crypto users on Ethereum dapps, who often must pay ridiculously high transaction fees and settle for absurdly slow transaction times. As a result, there is a growing demand for “layer two” (L2) solutions built on top of Ethereum, which find a way to efficiently package transaction data and periodically post it to the Ethereum network, resolving many of the original network’s inefficiencies.
Offchain Labs recently announced the deployment of Arbitrum One, the mainnet beta for its layer two (L2) scaling technology, Arbitrum, which is powered by optimistic roll-ups.
Arbitrum is structured around a Rollup chain, which executes all transactions submitted to the Arbitrum network, and logs their data in an inbox smart contract on Ethereum.
To reflect these transactions on Ethereum, a validator can aggregate data from multiple transactions in the inbox into a concise summary, called an “assertion,” which they then post to Ethereum. These assertions are optimistically assumed to be valid, unless challenged by another validator during a set waiting period; incorrect assertions or challenges are penalized via a loss of funds.
This mechanism effectively reduces the number of individual transactions that the Ethereum network must fully validate, allowing Arbitrum to offer significantly faster transaction speeds and lower transaction costs.
Arbitrum is also designed to be incredibly developer friendly, with full compatibility with the EVM and native support for third-party tooling like Etherscan, Hardhat, and Truffle. This, along with Arbitrum’s massive scalability improvements, make the protocol an extremely promising candidate for developers looking to build high throughput dapps.
Two competing technologies powering L2 protocols are sidechains and ZK rollups.
Sidechains (used by Polygon) are essentially a completely independent blockchain that periodically “syncs state” with Ethereum by posting their block header to Ethereum. Since these sidechains only receive a fraction of Ethereum’s transaction volume, they can offer significant improvements in cost-efficiency and speed. However, since sidechains operate completely independently from the underlying blockchain, they are susceptible to a wide array of attacks, often dissuading developers from building on them.
ZK rollups are similar to optimistic roll-ups in that they execute transactions off-chain (on a roll-up chain), log all transaction data, and periodically post assertions that aggregate several transactions to Ethereum. Unlike optimistic roll-ups, however, assertions are not optimistically assumed to be valid; validators must also post an accompanying proof of validity, which is a ZK-SNARK. Unfortunately, ZK-SNARKs remain underdeveloped, fail to generalize well, and can often be extremely slow to construct computationally. Nonetheless, their powerful security guarantees and recent advances in ZK-prover efficiency make them a promising long-term candidate for scaling Ethereum.
Optimistic roll-ups are somewhat of a middle ground between sidechains and ZK roll-ups, preserving many of the same security guarantees as ZK-STARKs through well-developed, usable infrastructure.
Within a week of launch, over 250 projects have requested to join the Arbitrum developer mainnet beta, demonstrating the insane demand for scaling infrastructure. Through this beta period, the Arbitrum team will maintain the ability to pause or upgrade the network if necessary, smoothing out any last-minute bugs or inefficiencies. After all projects have had the ability to build and test their applications on Arbitrum, the protocol plans to open up to end users and begin the transition towards being fully decentralized.
Ultimately, as crypto and DeFi continue to explode in popularity, Arbitrum presents one of the most promising scalability candidates for developers looking to build robust, user-friendly, and efficient dapps on Ethereum.
What is Arbitrum?
This past week, Offchain Labs deployed its Ethereum-scaling solution, Arbitrum, to the Ethereum mainnet. As a layer two protocol, Arbitrum uses optimistic rollups to efficiently and compactly package smart contract execution data onto Ethereum, enabling significantly faster transaction speeds and lower transaction costs.
What are Layer 2s?
Ethereum is undoubtedly one of the most popular blockchains for decentralized applications (dapps) today, with nearly 65 billion USD locked across its various DeFi protocols and over 100,000 daily active users across Ethereum-based dapps. Built to optimize for verifiability and security over speed, the Ethereum network struggles to process the massive volume of transactions it receives (nearly 1.5 million per day), leading to painfully slow transaction speeds and ridiculous gas fees. For context, Ethereum users can currently expect their transactions to settle in roughly 4 minutes with an average gas fee of $1. For more sizable transactions, like a Uniswap swap, gas can be closer to $8-9.
Ethereum gas fees in Gwei over the past year. (YCharts)
To better handle the high throughput of dapps and DeFi protocols, several projects have launched “layer two” (L2) solutions, built on top of Ethereum, which is called the “layer one” of the blockchain. At a high level, L2 protocols find a way to efficiently package transaction data and periodically post it to the Ethereum network. Validating each transaction directly on Ethereum can lead to incredible bloat and inefficiencies when transaction volumes are high; L2s are able to achieve massive performance improvements over vanilla Ethereum because they effectively reduce the computational load that each transaction takes on the network.
How does Arbitrum enhance efficiency on Ethereum?
The crux of Arbitrum’s L2 solution is the optimistic roll-up. In a roll-up, transaction validators aggregate several transactions together by executing them off-chain and then posting a concise account (called an “assertion”) of the transaction data and smart contract end states to the layer one blockchain.
Arbitrum specifically uses optimistic roll-ups, where assertions posted to Ethereum are optimistically “assumed” to be true and correct, unless challenged. Validators only post the assertion––and no accompanying proof of validity––to the Ethereum network. To incentivize honest validation, validators must also post a bond to Ethereum for some specified period of time. During this window, if another validator disputes the original validator’s assertion, they can officially “challenge” the assertion on Ethereum and post a bond of their own. If the original validator’s assertion was incorrect, the original validator loses their bond. If the challenger was incorrect, the challenger loses their bond. If an assertion makes it through the specified time window without any successful challenges, it becomes ‘accepted’ as true, merging with the final state of the Ethereum blockchain.
Assertion validation and challenging on Arbitrum. (Arbitrum Whitepaper)
By aggregating several transactions into a single interaction with Ethereum (posting a single assertion), Arbitrum greatly reduces the overall number of individual transactions that Ethereum must handle. All of these transactions are still technically “posted” to Ethereum (via the assertion), but the network no longer needs to independently validate each transaction (and fully execute each step of each transaction on each node). Additionally, since assertions are designed to be compact, they often take up less space on the Ethereum blockchain overall, which helps them be included in blocks sooner. Altogether, these efficiencies translate to significant improvements in transaction speed and costs, making it much easier for dapps to handle large numbers of users and transactions.
Architecturally, transactions on Arbitrum are submitted to the Arbitrum Rollup chain, which can be thought of a side-chain that handles off-Ethereum transaction execution. Data from these transactions is logged and then posted to an open inbox smart contract on Ethereum. Validators (who can be anyone, since Arbitrum is fully permissionless), then aggregate transaction data from the inbox into assertions which they post to Ethereum. External users can recover the current state of the Arbitrum roll-up chain by simply executing the transactions posted to the open inbox.
Arbitrum is also highly optimized for easy development, including full EVM compatibility, an integration with Etherscan, and native support for popular tooling like Hardhat and Truffle. This, along with Arbitrum’s massive scalability improvements, make the protocol an extremely promising candidate for dapp developers.
How does Arbitrum compare to other Layer 2s?
Given Ethereum’s massive popularity, several projects have launched L2 solutions to enhance scalability on the blockchain. Beyond optimistic roll-ups, two other popular technical primitives for L2 solutions are zk-roll-ups and sidechains.
Sidechains, which are used by Polygon (previously the Matic Network), are essentially a completely independent blockchain used to execute transactions, which occasionally interfaces with the layer one chain. Because they only handle a small fraction of the overall transaction volume of the layer one network, sidechains are significantly less likely to get “clogged” from high throughput and can thus offer lower transaction fees and faster transaction speeds. To ensure that the sidechain and layer one chain are consistent, sidechains periodically post their block header to the layer one chain, essentially aligning the “state” of both chains.
Sidechains achieve better efficiency by executing transactions off Ethereum, reducing the overall computational load on Ethereum. One unfortunate consequence of this is that sidechains often cannot offer the same security guarantees of the layer one chain, because fundamentally, it requires that the layer one chain does not validate each transaction/block on its own. This opens the potential for an Invalid State Transition attack, where a majority of the sidechain’s validators collude to artificially produce a block that steals funds from transaction participants and post the accompanying block header to Ethereum to complete the theft. Optimistic roll-ups protect against these kinds of attacks by logging all transaction data to the inbox on Ethereum. Anyone can execute the transactions in the inbox to confirm the state of the rollup chain or to verify or challenge a validator’s assertion. The key distinction between sidechains and optimistic roll-ups are that sidechains post a snapshot of the blockchain history to Ethereum, while optimistic roll-ups log the entire blockchain history to Ethereum.
ZK-roll-ups are similar in construction to optimistic roll-ups. Both execute transactions in a separate roll-up chain, and then log all data to Ethereum with periodic assertions that validate transactions in aggregate. The key difference is that in zk-roll-ups, validators must post a proof of validity along with their assertion to Ethereum; the protocol does not optimistically assume that these assertions are valid, unlike optimistic roll-ups. The qualifier “ZK” comes from the fact that the accompanying proof is a ZK-SNARK, or zero-knowledge succinct non-interactive argument of knowledge. The specifics of ZK-SNARKs go far beyond the scope of this post, but at a high level, ZK-SNARKs are a cryptographic primitive that allow users to prove that they have “knowledge” of some fact, without including any revealing information about that fact in the proof itself. The key benefit of ZK-SNARKs in the context of scaling is that they are extremely compact, which makes it feasible for the validator to post both the assertion and the associated proof to Ethereum. These proofs also guarantee that the state of the roll-up chain is always synced with Ethereum; since all assertions must be provably valid, there is no “challenge period” in which an invalid assertion may be stored in Ethereum (as there is with optimistic roll-ups).
Despite its compact construction and powerful security guarantees, the technology and abstractions for efficiently constructing and computing ZK-SNARKs remains fairly underdeveloped, making it difficult to work with and often highly use-case specific. Most existing implementations of ZK roll-ups can only handle specific kinds of transactions, like token transfers or atomic swaps. Additionally, they can be extremely slow to construct; for a block with ~1000 transactions, proof construction can take nearly 20 minutes on unspecialized hardware. As more specialized hardware (such as GPU provers) and cryptographic abstractions come out for ZK-SNARKS, ZK roll-ups may prove to be one of the most successful L2 scaling mechanisms. For instance, ZK-STARKs, a cousin of ZK-SNARKs that doesn’t require a trusted setup, have already been shown to construct proofs in a generalized way significantly faster (by orders of magnitude) than ZK-SNARKs. STARKs also have a slight security advantage over SNARKs, because they make fewer cryptographic assumptions and are thus harder to break; a quantum computer could theoretically break a SNARK, but not a ZK-SNARK. STARK proofs generally take up much more space on the blockchain, however, and require more computational power to verify, though approaches from classic data compression and block scaling are helping to mitigate this problem.
What’s next for Arbitrum?
The Arbitrum mainnet launched this past week is specifically called “Arbitrum One,” to identify it as the flagship chain powered by Arbitrum’s technology. As the Arbitrum ecosystem continues to grow and improve, other roll-up chains (which also use the Arbitrum technology, but with possible modifications) may pop up as well, specifically tailored for various use cases.
Arbitrum One is currently in a state of mainnet beta, where the Arbitrum team will have the ability to pause and upgrade the blockchain if necessary. This period allows developers to get a feel for security and efficiency with Arbitrum and identify any last-minute vulnerabilities or bugs before the blockchain experiences significant throughput. Currently, Arbitrum One is open to all developers that request access (over 250 projects already have) and will eventually open access to end users once all projects have had the ability to build and test their Dapps on Arbitrum. The team is targeting the end of this summer for the transition to full decentralization.
The recent explosion of interest in crypto has been a double-edged sword––bringing in new users and sources of liquidity, and along with them, substantial network clog, sluggish transaction times, and monstrous gas fees. With the current and ever-growing popularity of Ethereum, it’s more important than ever to build sustainable infrastructure that can efficiently and securely power larger scale dapps.
Arbitrum offers a powerful implementation for using optimistic roll-ups as an L2 scaling mechanism, greatly improving the cost- and time-efficiency of transactions on Ethereum, while preserving several key security guarantees. The sheer number of projects (250 and counting) already building on the developer mainnet is a testament to the demand for this kind of scaling infrastructure and the frustrations with the current L2 landscape. As the Ethereum ecosystem continues to bloom, Arbitrum’s L2 solution promises to power a new generation of highly-scalable, efficient dapps, that can offer a tangibly better (cheaper and speedier) experience for crypto users everywhere.
- Paul V
NEAR Protocol has been developed with the objective of making the process of creation, ownership and exchange of value on the internet as accessible and user friendly as possible.
Arbitrum mainnet beta has launched for developers. What comes next? Read on.
The unique sponsorship is among the latest examples of cryptocurrency and professional sports mixing.
Cryptocurrency startup Circle has raised $440 million in new funding, the company said Friday, adding to the list of crypto-focused businesses that have benefited from a bull run by investors.
Ex-Head of China’s Digital Yuan Effort Says CBDCs Could Operate on Ethereum
Central bank digital currencies will one day be more "smart," and not merely digital versions of cash, Yao Qian said.
IN THE TWEETS
NEW PRODUCTS AND HOT DEALS
We’re excited to announce that Set Labs has raised a $14M Series A round led by 1kx and Hashed!
The protocol aims to bring accurate pricing data for illiquid, non-public assets to DeFi.
LETS MEET UP
Bitcoin 2021, Miami, June 2-6
Puerto Rico, June 7-9
Hi, I’m Paul Veradittakit, a Partner at Pantera Capital, one of the oldest and largest institutional investors focused on investing in blockchain companies and cryptocurrencies. I’ve been in the industry since 2014, and the firm invests in equity, early stage token projects, and liquid cryptocurrencies on exchanges. I focus on early-stage investments and share my thoughts on what’s going on in the industry in this weekly newsletter.