Exploring the opportunities in Layer 2's
Gm, friends!
Today I want to look closer at L2’s (OP, ARB, Polygon, Base). It will not surprise me to see an increase in price to L2 governance tokens in the lead-up to EIP-4844, since this change is likely to draw more volume to the chains.
Before we start, I have been doing a lot of sports betting lately.
If you’re interested in that yourself, join my free Telegram group with 740+ degens to get a free money bonus so that you can try out SX Bet yourself:
Free Telegram group: https://t.me/bettingbr0s
Exploring the opportunities in Layer 2's
Over the past couple of months, I’ve observed certain Layer 2 solutions (L2s) attract large volumes and have seen a variety of projects built on these L2s, so what’s the big deal? What are these L2 solutions?
Before diving into Layer 2 solutions, its important to understand the current landscape with Ethereum mainnet, as of current Ethereum mainnet processes an average of 12 transactions per second and at times of high network activity, the cost to make a transaction on mainnet has, in the past, reached unusable levels for your average crypto user. This raises a scalability issue for Ethereum. The issue stems from the fact that each node within the network is required to store and validate transactions that have happened on the network - hence the blockchain.
Layer 2 solutions were introduced in an effort to combat this Ethereum scalability issue. L2s are in essence a completely separate blockchain that is built on top of Ethereum, which in turn inherits the security guarantees of Ethereum itself. Each L2 solution has its own set of security guarantees and trade-offs. The most popular forms of L2 scaling on Ethereum are rollups, such as Arbitrum, Optimism, and Base.
Rollups are L2 solutions that are able to process transactions for the L1. The generic transaction on Ethereum is typically 156 bytes, somewhat data-dense. As such, rollups are able to process many transactions on the L2 execution layer before bundling them up into one, concise transaction to post to the L1 state verification layer. By bundling up the many transactions on the L2 execution layer into one, it heavily reduces the gas cost for each transaction. There are many types of rollups, and not all are equal, however, the most popular of all are smart contract rollups: optimistic rollups and zero-knowledge rollups.
Smart contract rollups are rollups where users are able to send funds to a rollup smart contract on the L1 (Ethereum) and this smart contract then manages the transaction and changes in state. One key component of rollups and blockchains as a whole are merkle trees, in essence, merkle trees are data structures that store the state of everyone’s funds and the transactions that occurred, allowing the L1 to verify the state directly on the L2 without needing to download the entire state. To put it simply, users interact and make transactions on the L2 (which changes the state) with their funds and the L2 will send a merkle root of the state to the L1 so that the L1 can verify the state of the chain.
The L1 however, needs some sort of proof to ensure that the merkle root sent by the L2 is valid and this is where the two smart contract rollups differ. The two main proofs are fraud proofs and zero-knowledge proofs.
Optimistic rollups such as Arbitrum and Optimism use fraud proofs to finalise state.
The following are how fraud proofs work:
L2 nodes post a merkle root to the L1 smart contract along with a small bond;
The L1 smart contract by default trusts the L2 node and this is where the term Optimistic derives from. The L1 optimistically trusts the L2 update;
However, this state change does not become final for seven (7) days;
During these seven (7) days, someone can submit a proof that the merkle root submitted is fraudulent, this would then revert the update and penalise the L2 node by giving the bond submitted to the reporter of the fraudulent update;
The reporter is now able to prove the update was fraudulent by verifying all transactions that has happened in the state root change and by confirming each signature on these transactions are valid;
If the state change is not contested for the duration of the seven (7) days, the update will be finalised and immutable.
As for zero-knowledge (ZK) rollups, they use zero-knowledge proofs. The following are how zero-knowledge proofs work:
The L2 nodes post a merkle root to the L1 smart contract along with a ZK proof that proves the L2 correctly processed the transactions and produced a new merkle root;
If the L2 nodes were to try and post fraudulent updates, they would not be able to produce a valid ZK proof and thus the L1 smart contract would not accept the new merkle root;
The state update is settled instantly once the ZK proof has been verified.
Now, as we mentioned above, L2s exist to combat a scalability issue with Ethereum, in such that the transaction/gas costs on mainnet were too high. Let’s dive into how the two major smart contract rollups calculate gas fees users pay.
Both Arbitrum and Optimism expects users to pay two costs to transact on them: L2 gas (execution fee) and L1 calldata (security fee). The L2 gas (execution fee) is similar to how gas fees work on mainnet. Each transaction on an L2 will have to pay a gas/execution fee, equal to the amount of gas used by the transaction, multiplied by the current gas price attached to the transaction.
(L2 gas price) x (L2 gas used)
As for L1 calldata/security fee, the L1 calldata fee is paid to cover the cost to post transactions back to Ethereum. This exists because the sequencer (the mechanism by which L2s gather and post transactions back to the L1) will have to pay L1 gas to post transactions on Ethereum. Here is how this is calculated:
(L1 gas price estimate) x (L1 calldata size + L1 buffer)
L2 fee pricing works differently on Arbitrum and Optimism, the most important distinction between the two lies in the way Optimism and Arbitrum computes the cost of L1 computation. Arbitrum uses an oracle that prices the L1 computation - as for Optimism, the L1 computation contains a dynamic overhead (scalar) variable that can be tweaked by the team of Optimism to adjust L1 compute cost.
Important things to note here would be that transacting on an L2 is significantly cheaper than transacting directly on Ethereum’s mainnet, hence the popularity of L2s. Currently, rollups have cheap costs for the L2 execution layer and storage but in order to comply with data availability, the posting of data to L1s still remains costly for users.
Earlier this year, there was an Ethereum proposal called EIP-4844, and it is scheduled to launch end of the year. EIP-4844 proposes the addition of a brand new transaction type that allows the acceptance of blobs of data. The size of these blobs are specifically designed to be small enough to reduce storage overhead on the mainnet chain. As previously mentioned, the high transaction costs on Ethereum mainnet are also a major cost for L2 rollup solutions when posting batches and proofs to verify the state change. The effect this proposal has on this issue is that it may significantly reduce the L1 cost overhead. It is estimated that EIP-4844 will reduce the L1 batch posting cost by around 10-50x.
Some popular L2s
Arbitrum
Arbitrum is a layer 2 solution designed to improve the capabilities of Ethereum smart contracts — boosting their speed and scalability, while adding in additional privacy features to boot.
It’s built to address some of the shortcomings of current Ethereum-based smart contracts — such as poor efficiency and high execution costs — which have damaged the Ethereum user experience and frequently make transacting an expensive task.
Arbitrum uses a technique known as optimistic rollups. Transactions are executed off-chain, before being bundled in large batches and submitted on the Ethereum mainnet as calldata. This process helps to offload most of the computational and storage burden Ethereum currently suffers from, by moving them off-chain.
As per DeFiLlama Arbitrum has a TVL of 1,73b.
The most popular protocol is called GMX, which is a perp trading platform.
I have written about the Arbitrum ecosystem and the most interesting protocols in this thread:
https://x.com/Route2FI/status/1627739897770418177?s=20
-DeFiLlama TVL (with picture) + general info 3-4 lines (find info in thread) + mention popular protocols + link a great thread
Optimism
Optimism (OP) is a layer-two blockchain on top of Ethereum. Optimism benefits from the security of the Ethereum mainnet and helps scale the Ethereum ecosystem by using optimistic rollups. That means transactions are trustlessly recorded on Optimism but ultimately secured on Ethereum.
Optimism is one of the biggest scaling solutions for Ethereum with over $600 million in TVL. It is home to 97 protocols, the biggest being Synthetix (SNX), a derivatives exchange, Uniswap (UNI), a DEX, and Velodrome (VELO), an AMM.
I’ve written detailed about Optimism and its DeFi protocol here:
https://x.com/Route2FI/status/1628838344724471808?s=20
Matic
Polygon (formerly Matic Network) is a Layer 2 scaling solution backed by Binance and Coinbase. The project seeks to stimulate mass adoption of cryptocurrencies by resolving the problems of scalability on many blockchains.
Polygon boasts of up to 65,000 transactions per second on a single side chain, along with a respectable block confirmation time of less than two seconds.
MATIC, the native tokens of Polygon, is an ERC-20 token running on the Ethereum blockchain. The tokens are used for payment services on Polygon and as a settlement currency between users who operate within the Polygon ecosystem.
The TVL is sitting at around $800m at the moment with Quickswap and PearlFi as the biggest native protocols currently.
Here is my latest thread about Polygon if you want to do a deep dive:
Thread link: https://x.com/Route2FI/status/1622993817862344705?s=20
Base
Base is built as an Ethereum L2, with the security, stability, and scalability you need to power your dapps. Confidently deploy any EVM codebase and onramp your users and assets from Ethereum L1, Coinbase, and other interoperable chains. Base is built on the MIT-licensed OP Stack, in collaboration with Optimism.
Base has a TVL of $350m with Aerodrome and Friend.tech as the biggest DeFi protocols. I have already written a lot about Friend.tech (see my newsletter archive and Twitter feed).
Just to end this newsletter:
It will not surprise me to see an increase in price to L2 governance tokens in the lead-up to EIP-4844, since this change is likely to draw more volume to the chains. The assumption I would make here is that the transaction count grows on these L2 chains due to the savings users have in gas costs.
These are just my closing thoughts, do your own research, and stay safe friends.
Want To Sponsor This Newsletter? 🕴️
Send me a DM on Twitter: https://twitter.com/Route2FI or reply to this email. I have a sponsorship deck I can send you.
Join My Free Telegram Channel 🐸
I’ve launched a free Telegram channel where I share tweets, threads, articles, trades, blog posts, etc. that I find interesting within crypto.
Join it for free here: https://t.me/cryptogoodreads