Layers L1s, L2s & Rollups

Table of contents

GM GM, frens! 🙏
The blockchain world never sleeps, and neither do we. As the sun rises on another day of innovation, decentralization, and building, let's take a moment to reflect on what makes this space so extraordinary.
So grab your coffee (or chai), open your mind, and let's journey into this latest blog!
So, if you are ready. Let’s take a slip at today’s 1st topic! ☕
⛓️ Blockchain Layers
A blockchain network consists of multiple layers just like a Sandwich, which helps in operating, execution and data storage on the chain easier. Each layer serves a purpose Layer 1 does the execution of smart contracts and agreements, whereas Layer 2 improves scalability, and reduces cost and energy consumption by streamlining and combining data into rolls to store on a blockchain.
1️⃣ Layer 1 (L1)
A Layer 1 (L1) blockchain is the base layer of the blockchain ecosystem, where nodes help the chain to reach consensus. Referred to as the ‘Foundational Level’ of blockchain architecture, operating as the primary and autonomous chain on which transactions are directly executed and confirmed, as well as providing the essential infrastructure for decentralized applications and smart contracts.
It maintains its own network of nodes, which validate transactions and add new blocks to the blockchain.
It uses consensus algorithms like PoW (Proof of Work) for Bitcoin, and PoS( Proof of Stake) for Ethereum, making the system secure, transparent, and immutable.
Layer 1 (L1s) are Bitcoin, Ethereum, Solana, and Cardano.
Think of Layer 1 as a Foundation Layer for a building to be constructed.
Applications are then deployed on this foundation layer which are known as dApps on L1.
A very famous example of L1 dApp is Uniswap.
2️⃣ Layer 2 (L2)
A layer 2 is any off-chain network, system, or technology built on top of a blockchain to help extend its capabilities, which is then connected back to layer 1 blockchain infrastructure. It brings a higher transaction throughput in a blockchain system.
Need for Layer 2
Blockchains are incapable of scaling effectively while keeping the underlying network both secure and decentralized posed in the Blockchain Trilemma. Which means that there must be tradeoffs between these three features—today’s blockchain networks can fulfill two out of the three conditions, but not all three simultaneously.
This is solved by Layer 2 Solutions with addition of Rollups.
Example of L2s are Chainlink, a decentralized Oracle networks and event indexing networks like The Graph, which enable applications to access on-chain data. But the most popular type of L2 is the rollup, or L2 chain.
🧻 Rollups
Rollups are L2 scaling solutions that enable to increase the number of transactions on Ethereum by bundling multiple transactions into one, reducing gas costs.
Rollups solves the blockchain Trilemma which states that a blockchain can only achieve two out of three properties: decentralization, security, and scalability. In the case of Ethereum, scalability is sacrificed as it can only process approximately 15 transactions per second. Rollups, on the other hand, aim to enhance scalability without compromising security or decentralization.
Scalability with rollups is achieved through the following three methods.
Rollups perform off-chain execution of transactions, requiring that the underlying base blockchain only needs to execute small proofs to verify network activity and store raw transaction data.
Rollups batch transaction data together when submitted to a blockchain so that the on-chain gas cost is distributed across a number of transactions.
Rollups only require a minimum of one honest validator to prove the validity of transactions to the base layer blockchain, allowing for smaller validator sets and increased hardware requirements without significantly compromising security.
There are two types of rollups, Optimistic and Zero-Knowledge rollups. The main difference between the two lies in how each rollup verifies the validity of the transactions.
Optimistic Rollups
A layer 2 that uses fault proofs assumes all transactions are valid by default. However, there is a dispute period where any network participant can generate a dispute and provide proof to the smart contract that the transaction data and proposed state change are wrong. When a fault proof is published, the rollup transaction is either partially or fully re-executed on-chain and the resulting state change is compared to the original claim. If the re-execution results in a different result, then the original claim is deemed invalid and reverted.
Zero-Knowledge (ZK) Rollups
ZK rollups use validity proofs, known as zk proofs, to verify transaction batches. In this process, the prover (operator) generates a zk proof to show that their inputs (the transactions) satisfy this equation. A verifier (an L1 contract) then checks this proof to ensure that the output matches the expected result. The solution that the prover uses to demostrate that their input satisfies the mathematical equation in the zk proof is commonly referred as the witness.
This was Blockchain Layers and Rollups explained!
See you next time!!
Subscribe to my newsletter
Read articles from Mohil Wankar directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Mohil Wankar
Mohil Wankar
I am Mohil Wankar, embarking on my journey in the Web3 realm, documenting online learning through my blogs. Need support and Love from the community.