Can you explain the different layers in blockchain technology and what each one does?
Let's build this stack from the middle out, because the whole layered picture only makes sense once you fix the one layer that does the real work: settlement and security. Everything else is named relative to it.
Layer 1: the base chains
A Layer 1 (L1) is a blockchain that settles its own transactions and provides its own security. It is the foundation, the place where ownership is ultimately recorded and made final. Bitcoin and Ethereum are the canonical examples; Solana and Avalanche are alternative L1s that made different trade-offs to go faster. An L1 has its own consensus mechanism, the rule for who gets to add the next block and why everyone trusts it. Bitcoin uses proof-of-work (compete by burning computing power) and Ethereum uses proof-of-stake (compete by locking up coins as collateral), as covered in the Proof-of-Work versus Proof-of-Stake material. The L1 is also where smart contracts run on chains that support them, self-executing programs that move funds automatically when their conditions are met. When people argue about which chain is "best," they are really arguing about where its L1 sits on the trade-off between being decentralised, secure, and fast.
Layer 2: scaling on top
An L1 can only process so many transactions per second, because every node has to re-check every one. A Layer 2 (L2) is a network built on top of an L1 that handles transactions off the main chain but inherits the L1's security by posting its results back down to it. The point is to make transactions far cheaper and faster while still ultimately settling on the secure base layer. The dominant kind of L2 today is the rollup: it executes hundreds of transactions on its own fast network, bundles ("rolls up") them into one batch, and posts that batch to the L1 along with proof it is valid. Because the expensive L1 settlement cost is shared across the whole batch, each individual transaction is far cheaper, while security still rests on the L1. Arbitrum, Optimism, and Polygon are well-known examples. The key thing to say in an interview is that an L2 does not replace its L1, it leans on it.
Layer 0: connecting the base chains
Below the L1s sits what some call Layer 0: the infrastructure and frameworks that let separate blockchains be built and talk to each other. Where an L1 is a single chain, a Layer 0 is the plumbing for a whole family of chains and the messaging between them. Polkadot and Cosmos are the usual examples, each providing a shared backbone that many individual chains plug into so they can communicate, which is the foundation for the cross-chain interoperability we discuss in the Blockchain Interoperability question.
Layer 3: the applications
At the top sit the decentralised applications (dApps), the things ordinary users actually touch. These are programs built from smart contracts that deliver a service directly from your wallet with no company in the middle, such as a decentralised exchange where you swap tokens, a lending platform, or a marketplace for digital collectibles (NFTs). They borrow all their security and settlement from the chain beneath them; they are the storefront, not the vault.
So the clean mental model, top to bottom:
The unifying idea, and the thing worth saying out loud in an interview: the L1 is the one layer that actually settles and secures value, and every other layer exists either to connect those base chains (Layer 0) or to scale and use them (Layers 2 and 3). Keep the base layer at the centre and the whole stack snaps into place!
Layer 1: the base chains
A Layer 1 (L1) is a blockchain that settles its own transactions and provides its own security. It is the foundation, the place where ownership is ultimately recorded and made final. Bitcoin and Ethereum are the canonical examples; Solana and Avalanche are alternative L1s that made different trade-offs to go faster. An L1 has its own consensus mechanism, the rule for who gets to add the next block and why everyone trusts it. Bitcoin uses proof-of-work (compete by burning computing power) and Ethereum uses proof-of-stake (compete by locking up coins as collateral), as covered in the Proof-of-Work versus Proof-of-Stake material. The L1 is also where smart contracts run on chains that support them, self-executing programs that move funds automatically when their conditions are met. When people argue about which chain is "best," they are really arguing about where its L1 sits on the trade-off between being decentralised, secure, and fast.
Layer 2: scaling on top
An L1 can only process so many transactions per second, because every node has to re-check every one. A Layer 2 (L2) is a network built on top of an L1 that handles transactions off the main chain but inherits the L1's security by posting its results back down to it. The point is to make transactions far cheaper and faster while still ultimately settling on the secure base layer. The dominant kind of L2 today is the rollup: it executes hundreds of transactions on its own fast network, bundles ("rolls up") them into one batch, and posts that batch to the L1 along with proof it is valid. Because the expensive L1 settlement cost is shared across the whole batch, each individual transaction is far cheaper, while security still rests on the L1. Arbitrum, Optimism, and Polygon are well-known examples. The key thing to say in an interview is that an L2 does not replace its L1, it leans on it.
Layer 0: connecting the base chains
Below the L1s sits what some call Layer 0: the infrastructure and frameworks that let separate blockchains be built and talk to each other. Where an L1 is a single chain, a Layer 0 is the plumbing for a whole family of chains and the messaging between them. Polkadot and Cosmos are the usual examples, each providing a shared backbone that many individual chains plug into so they can communicate, which is the foundation for the cross-chain interoperability we discuss in the Blockchain Interoperability question.
Layer 3: the applications
At the top sit the decentralised applications (dApps), the things ordinary users actually touch. These are programs built from smart contracts that deliver a service directly from your wallet with no company in the middle, such as a decentralised exchange where you swap tokens, a lending platform, or a marketplace for digital collectibles (NFTs). They borrow all their security and settlement from the chain beneath them; they are the storefront, not the vault.
So the clean mental model, top to bottom:
- Layer 0
the connective infrastructure that lets many separate chains exist and communicate. - Layer 1
the base chains that settle transactions and provide security, each with its own consensus and, often, smart contracts. - Layer 2
networks on top of an L1 that make transactions faster and cheaper while inheriting the L1's security, mostly rollups. - Layer 3
the user-facing decentralised applications that run on all of the above.
The unifying idea, and the thing worth saying out loud in an interview: the L1 is the one layer that actually settles and secures value, and every other layer exists either to connect those base chains (Layer 0) or to scale and use them (Layers 2 and 3). Keep the base layer at the centre and the whole stack snaps into place!
My Notes
Related Questions (36)
| Title | Category | Subcategory | Difficulty | Status |
|---|---|---|---|---|
| 51% Attack | Digital Assets - Crypto | Blockchain Technology Fundamentals | Easy | |
| Block Explorer | Digital Assets - Crypto | Blockchain Technology Fundamentals | Easy | |
| Blockchain Applications | Digital Assets - Crypto | Blockchain Technology Fundamentals | Easy | |
| Blockchain Immutability | Digital Assets - Crypto | Blockchain Technology Fundamentals | Medium | |
| Blockchain Transactions | Digital Assets - Crypto | Blockchain Technology Fundamentals | Medium | |
| Blockchain vs. Traditional Database | Digital Assets - Crypto | Blockchain Technology Fundamentals | Easy | Example |
| Common Security Threats | Digital Assets - Crypto | Blockchain Technology Fundamentals | Hard | |
| Consensus Algorithms | Digital Assets - Crypto | Blockchain Technology Fundamentals | Medium | |
| Cryptographic Hashing | Digital Assets - Crypto | Blockchain Technology Fundamentals | Medium | |
| Cryptographic Signatures | Digital Assets - Crypto | Blockchain Technology Fundamentals | Hard | |
| Decentralized Ledger | Digital Assets - Crypto | Blockchain Technology Fundamentals | Medium | |
| Decentralized Oracles | Digital Assets - Crypto | Blockchain Technology Fundamentals | Medium | |
| Double Spending | Digital Assets - Crypto | Blockchain Technology Fundamentals | Easy | |
| DPoS | Digital Assets - Crypto | Blockchain Technology Fundamentals | Medium | |
| Forks | Digital Assets - Crypto | Blockchain Technology Fundamentals | Medium | |
| Gas Fees | Digital Assets - Crypto | Blockchain Technology Fundamentals | Easy | |
| Hard and Soft Fork | Digital Assets - Crypto | Blockchain Technology Fundamentals | Easy | |
| Identity Verification | Digital Assets - Crypto | Blockchain Technology Fundamentals | Medium | |
| Limitations | Digital Assets - Crypto | Blockchain Technology Fundamentals | Easy | |
| Mining | Digital Assets - Crypto | Blockchain Technology Fundamentals | Easy | |
| Nodes | Digital Assets - Crypto | Blockchain Technology Fundamentals | Medium | |
| Peer-to-Peer Transactions | Digital Assets - Crypto | Blockchain Technology Fundamentals | Easy | |
| Permissioned Blockchain | Digital Assets - Crypto | Blockchain Technology Fundamentals | Medium | |
| PoA | Digital Assets - Crypto | Blockchain Technology Fundamentals | Medium | |
| PoW vs PoS | Digital Assets - Crypto | Blockchain Technology Fundamentals | Easy | |
| Privacy vs. Transparency | Digital Assets - Crypto | Blockchain Technology Fundamentals | Hard | |
| Public and Private Keys | Digital Assets - Crypto | Blockchain Technology Fundamentals | Easy | |
| Quantum Computing | Digital Assets - Crypto | Blockchain Technology Fundamentals | Hard | |
| Scaling Challenges | Digital Assets - Crypto | Blockchain Technology Fundamentals | Medium | |
| Security and Integrity | Digital Assets - Crypto | Blockchain Technology Fundamentals | Easy | |
| Sharding | Digital Assets - Crypto | Blockchain Technology Fundamentals | Medium | |
| Sidechain and Off-Chain Transactions | Digital Assets - Crypto | Blockchain Technology Fundamentals | Easy | |
| Smart Contracts | Digital Assets - Crypto | Blockchain Technology Fundamentals | Medium | |
| Supply Chain | Digital Assets - Crypto | Blockchain Technology Fundamentals | Medium | Example |
| Support Digital Assets | Digital Assets - Crypto | Blockchain Technology Fundamentals | Easy | |
| Zero-Knowledge Proofs | Digital Assets - Crypto | Blockchain Technology Fundamentals | Hard |
Discussion
Please log in to see the discussion.