I. Why Does Layer 2 Matter?
In the year 2021, thanks to the DeFi “summer” and NFT boom, the price of ETH has surged, and the Ethereum blockchain usage is in very high demand. In result, Ethereum reached the highest capacity of over 1.7 million transactions a day, which also pushed the gas fee too painful for users and the network congested regularly. Many people expect more improvements in transaction speeds and more improvements in the network's transaction fees, but these are purely the results of a lack of education.
Before digging in the role of Layer 2, you should cover arguably the biggest innovation event in this blockchain industry, The Merge.
“...the thing to remember is that if you have rollups, but you do not have sharding, you still have 100x factor scaling. You still have the ability for the blockchain to go up to somewhere between 1k-4k tps…” - Vitalik stated.
The idea behind any Layer 2 (L2) solution is that it allows several parties to securely interact in some ways without issuing transactions on the base chain, as the Layer 1 (L1), but still to some extent leveraging the security of the main chain. While rollups improve block validation, they still lead to centralized block production and that in a rollup-centric world, there are two likely outcomes. One in which mitigation to a single highly scalable rollup, one in which network activity is spread across multiple solutions.
And the blockchain trilemma concept coined by Vitalik, that includes a set of three desirable properties of a blockchain, that are decentralization, scalability and security. In fact, Ethereum is the major decentralized and most secure blockchain, likely followed by that of Bitcoin while it faces the remaining sharp corner of the trilemma which is scalability.
Nevertheless, the only upgrade that can truly highlight Ethereum’s issue is the Ethereum 2.0 update, otherwise known as the shift from PoW to PoS. The shift aims to increase transaction speed, throughput without sacrificing decentralization or security. Thus, the need for scaling solutions has increased in demand as well and this is where the Layer 2 networks come in.
II. Layer 2 Outlook
The L2 blockchain communicates with Ethereum by submitting bundles of transactions in order to ensure it has similar security and decentralization guarantees from the Ethereum network. It means that the L2 handles the transactional burden and just back to the L1 all already finalized proofs or results. And by doing this, the L1 removes the transaction load, gets less congested and more important is the scalability.
By combining multiple off-chain transactions into a single L1 transaction, the gas fees are relatively reduced and making Ethereum network more accessible for all users and activities. Furthermore, L2 blockchain settles their transactions on Ethereum mainnet allowing users to benefit from the security of the Ethereum network. Thanks to its higher transaction per second, lower gas fee, any application will be improved regarding user experience.
The major Layer 2 battlefield surrounds Ethereum — that no major changes will be done to undermine the underlying logic of Ethereum network, which is more feasible than Ethereum 2.0, yet improves performance by 30 – 100 times. Currently, the market has quite a lot of L2s that solve many different problems. Different L2 solutions have different properties, pros and cons.
However, projects with rollup technology gain a lot of attention from the communities, and especially, Optimistic Rollups and zk-Rollups recently are two names that are constantly mentioned out of many other outstanding solutions and development potential compared to other L2s. Rollups bundle hundreds of transactions into a single transaction on L1. The batch of transactions get executed outside of L1 but the data gets posted to the base chain Ethereum to secure.
Therefore, this article will only focus on the optimistic rollup-centric model.
Although these L2 scaling ecosystems are still quite young and have tons of work ahead. The year 2023 may be the L2 year for Ethereum’s ecosystem as these various networks take off and gain traction. At the time of writing, compared to the TVL in other L1s, such as BNB Smart Chain ($5.96B), Tron($4.21B), Avalanche ($1.45B), a secure of $4.2B in TVL on all L2s is a relatively small amount.
Furthermore, Ethereum researcher @drakefjustin said the Ethereum Merge may happen as early as August. The Merge itself will not impact rollups a lot because it only changes the L1 consensus layer of Ethereum, from PoW to PoS. But danksharding does, the Ethereum’s scalability killer. The danksharding will push a tremendous impact on L2 scaling solutions, though most likely not happen in 2022. This will hurry the engineers team to shorten the time as well as design new use cases for the native coins.
Currently, native coin of L2s don’t have many effective use cases to ensure market demand. In fact, launching native coins for L2s is not necessary at the time. For network purposes such as transaction fees, staking for security or governance, normally all paid out by ETH. The launch of native coins will create a huge speculation for the L2 market, unless the economists create a proper use case for the economy.
Besides, L2s also received a lot of attention because the scale of capital raising as well as the valuation of these projects is not small, could be mentioned:
- Optimism closed its Series B funding round with $150M raised and $1.65B valuation.
- Offchain Labs (Arbitrum developer) is no less with $123.7M in funding over 3 rounds.
- zkSync raised $256M alongside StarkWare with a $2B valuation after Series C.
III. Rollups 101
A rollup is a type of Layer 2 scaling solution that works by executing transactions outside of the L1 but posting transaction data on the L1, allowing the rollup to scale the network while still relying on the Ethereum consensus for security. Moving computation off-chain allows for the processing of more transactions in total because only a portion of the data from rollup transactions must fit into the blocks. Rollup transactions are carried out on a separate chain, which can even run a rollup-specific version of the Ethereum Virtual Machine (EVM).
Then, by batching all transactions together, they are executed on a rollup and sent to the Ethereum base chain. Each rollup launches a set of smart contracts on L1 that are in charge of processing deposits and withdrawals as well as confirming proofs. The entire process effectively runs transactions, takes the data, compresses it, and rolls it up to the base chain in a single batch of transaction data, thus the name rollup.
In terms of scaling improvements, both forms of rollups should be able to scale up Ethereum from 15 to 45 transactions per second (depending on the transaction complexity) up to 1000-4000 transactions per second.
IV. What Is An Optimistic Rollup?
As the name suggests, Optimistic rollups do not perform any computation by default. Instead, they post data to the base chain, which means Ethereum and assume all data is correct. But to ensure all data transactions are legitimate, the Optimistic rollups rely on fraud proofs that challenge state channel changes and introduce high exit times that can vary between a day or week. Meanwhile, Ethereum’s security layer assumes that a given batch of transactions is valid by default that leads to large scalability improvements. The transactions will only be rejected if a participant that is monitoring the rollup submits a valid claim that illustrates the transaction is fraudulent, as known as “fraud-proof”.
After the fraud proof is submitted, the system enters the dispute resolution mode where the suspicious transaction was indeed fraudulent, the party that submitted this transaction is punished, normally by having their bonded ETH slashed. The underlying security assumption that is made for Optimistic rollups is that there is at least one honest network participant. This implies that if that assumption holds true and one honest network participant submits a valid fraud-proof, the rollup will process the transaction correctly. To prevent the bad actors from spamming the network with incorrect fraud proofs, the parties wishing to submit fraud proofs usually also have to provide a bond that can be subject to slashing.
Finally, in order to execute a rollup transaction on layer 1, optimistic rollups must have a mechanism capable of replaying a transaction with the precise state that existed when the transaction was first executed on the rollup. This is one of the more difficult aspects of optimistic rollups and is generally accomplished by building a separate manager contract that substitutes specific function calls with a rollup state. After calculation, the optimistic rollup system writes transactions to the Ethereum mainnet in the form of a read-only data that holds transactional data. This data is arranged by the system and optimized to improve space usage, further reducing gas costs and making the system more cost-effective.
Due to the nature of the dispute resolution process, optimistic rollups must provide all network participants ample time to present fraud evidence before executing a transaction on L1. This period is normally relatively extensive to ensure that fraudulent transactions may still be challenged even in the worst-case situation. As a result, withdrawals from hopeful rollups take a lengthy time, with users having to wait up to a week or two to be able to transfer their cash back to the L1.
V. Arbitrum vs Optimism: The Difference Explained
The two leading optimistic rollups, currently, Arbitrum and Optimism, are very similar in basic architecture and internal logic with just a few differences in their architecture design. In common, both are optimistic rollups in which using the solution that stores all transaction data on the Layer 1 - Ethereum and fraud proofs that allow messaging cross-chain capabilities to build advanced token bridges. On the other hand, the key difference between two is the implementation of the proofs and security risks.
Optimism’s single-round fraud-proof relies on L1 to execute the entire transaction on L2 and disputes are settled on-chain. This way the verification is instant, consequently, this overtake execution costs more gas and the L2 fee is limited by the L1 gas block. In contrast, for Arbitrum, it applies multiple rounds of fraud proof verification, simply focusing on a singular point of transaction disagreement and generating a proof of state for a whole batch of transactions off-chain and publishes it to the base chain. In result, this turns to higher network performance as the gas block limit is irrelevant.
What people place questions about is the “multi-round” process used by Arbitrum. Will spammers can stop rollup’s progress and delay by launching a series of consecutive challenges, each of which takes a significant amount of time to resolve. However, Arbitrum’s updated protocol called “pipelining” allows the validator to continue processing transactions for final approval, even if the previously processed transaction is disputed. Anyone monitoring the network can know whether the dispute is valid or invalid immediately before the dispute process is completed. No fraud computation needed. On the other hand, anyone can send fraud proofs delaying the chain of Optimism.
In practice, this means that the final confirmation of Ethereum is delayed longer than Optimism, but cheaper. Since Optimism must be able to run every transaction through the EVM in the event of a dispute, in case, if these transactions can’t be correctly verified on the chain, the transactions would not be processed due to the Ethereum gas limit excess. In contrast, Arbitrum can execute large transactions, even if they exceed the gas limit, because transactions are never run in batches through the EVM.
Verdict: For transaction execution, Arbitrum has an advantage, efficiently preventing delay attacks, bigger batch size and cheaper, but less security than Optimism.
One more advantage is that Arbitrum is better optimized for EVM coding languages and does not face the compatibility issues as the OVM (Optimistic Virtual Machine). It does not rely on the majority of Ethereum validators to process transactions through EVM. Arbitrum has its own AVM (Arbitrum Virtual Machine) automatically translates dApps from EVM to AVM. It means that Arbitrum can support all EVM coding languages such as Solidity, Flint, Vyper, etc, unlike only Solidity of Optimism.
When it comes to its ecosystem, both options are great options for Ethereum maximalists, as it uses every tool from the Ethereum ecosystem to migrate from L1 to L2 , no need for new concepts. IMO, in the future, the Ethereum network may only be in charge of decentralization and security over scaling. Users will tend to gradually shift their transaction activities and focus on L2 as the ecosystem is continuously expanding when the big players in the Ethereum ecosystem are also pushing to integrate on L2, such as Uniswap, Synthetix, 1inch, AAVE, etc.
Verdict: For compatibility, Arbitrum has the upper hand, easier to deploy.
For a couple of reasons, Arbitrum is more appealing to investors than Optimism. Arbitrum has native Ethereum token support, or simply meaning it natively supports ETH, unlike Optimism which only supports newer token standards, pegged instead. Moreover, the powerful attribute that gives Arbitrum its edge to mainstream or adoption is the superior interoperability offered by the unified permissionless bridge compared to Optimism, which only utilize dedicated bridges based on community demand. According to the facts, Arbitrum proved to be superior when market share accounted for half of the TVL of L2 market while Optimism only took over 17%, respectively at $1.91B and $662M (at the time of writing).
It is also understandable that Arbitrum has a juicy revenue by its superior number of dApp and users compared to the competitor. Arbitrum's revenue orientation mainly comes from users' transaction fees, limiting the impact from MEV to the system (Miner Extractable Value) to the system. In contrast, Optimism takes the strategy of offensive MEV to provide itself another stream of earning plus transaction fees to accrue value to its native token.
Verdict: Arbitrum's revenue seems to be more accessible to retail investors with a fairer or more decentralized policy when competing for MEV mining on Optimism is definitely not a game for "shrimp, or crab".
VI. The Bottom Line
Comparing Arbitrum vs Optimism, just a personal thought, Arbitrum is the clear winner. It is cheaper, enjoys full compatibility with EVM and existing tooling. This comparison would make little sense, but if we compare the systems as they exist, Arbitrum are the only ones that support open deployment of general smart contracts.
Considering the event of Ethereum 2.0, with the current characteristics and mechanisms, perhaps when Ethereum is officially converted to PoS, Arbitrum seems to be less affected than the competitor, due to less dependence on the Ethereums’ computation. Arbitrum, the most current, advanced L2 platform, will hopefully continue to absorb current technology trends to scale the platform further and encourage its expansion. It also aims for a lower cost solution with wider applicability, complex transactions compared to a solution with higher security of Optimism. In fact, if they are to succeed in the long run, Optimistic Rollups will have to become their own world, not just an appendage of Ethereum.
However, from an investor's perspective, raising at a relatively high valuation over $1.5B, it seems unlikely to generate the expected profit, not to mention a bet during this bear market period, which is very risky for the portfolio. And we can consider later, once the market gets accumulated long enough.
In Vitalik’s blog named “Endgame” considers a possible long-term roadmap for rollups and introduces either fraud proofs zk-SNARKs of zk-Rollups to let users directly and cheaply check block validity. Therefore, capacity expansion is not so much an arms race as it is a multi-line war. It may have one winner either loser, it may have more than one. The author found that there are quite a few conservative opinions that this extension solution is better than another extension solution.
But as an investor, we should often evaluate by actual growth stats rather than just the technology behind it. In personal opinion, we should not bias any L2 solution. Each solution has its own strengths and weaknesses, overcoming the drawbacks of the main L1 network, not to mention the yet-to-be-awake giants zkSync and StarkWare. This will definitely have a major impact on the future of cryptocurrencies.