Layer 1 vs Layer 2 Blockchains

The scalability trilemma, optimistic rollups, ZK rollups, sidechains, Lightning Network, bridge risk, and how the Layer 1 vs Layer 2 architecture determines liquidity, fees, and withdrawal risk for active traders.

Course 56: Layer 1 vs Layer 2 Blockchains

Blockchain & Mining Track · 30 min read · Intermediate

On 12 May 2021, a routine Ethereum transaction cost upward of $70 in gas fees. During the peak of the 2021 bull market, average gas costs regularly exceeded $100 for simple token swaps — making micro-transactions, small DeFi positions, and most ordinary financial activity economically irrational for anyone outside the wealthiest tier of participants. This is the scalability problem in practice: not a theoretical concern but a lived barrier to adoption that directly determined which traders could afford to participate in on-chain markets and which could not. The architectural tension that produces this problem — the impossibility of simultaneously maximising decentralisation, security, and throughput with a single blockchain layer — is one of the foundational engineering challenges of the field. Understanding how Layer 1 and Layer 2 solutions address this tension is essential for any serious crypto trader, because it determines where liquidity lives, what fees cost, how quickly transactions finalise, what new risks are introduced, and why different assets in the ecosystem are valued as they are. This course builds on Course 55's smart contract foundation to explain the full scaling architecture.

The Scalability Trilemma

Ethereum co-founder Vitalik Buterin articulated the scalability trilemma: a blockchain system can simultaneously optimise for at most two of three properties — decentralisation, security, and scalability. Maximise all three simultaneously and you get something that doesn't exist yet (or that compromises one property in subtle ways not immediately visible).

  • Decentralisation: the network is maintained by many independent participants, none of whom has disproportionate control. High node count, low hardware requirements for participation, geographic distribution.
  • Security: the network is resistant to attacks. For PoW, this is measured in hashrate and attack cost. For PoS, in total staked value. High security requires that attacking the chain be more expensive than any benefit the attacker can extract.
  • Scalability (throughput): the network can process many transactions per second at low cost. Bitcoin processes approximately 7 transactions per second (TPS). Ethereum ~15–30 TPS. Visa processes approximately 1,700 TPS average, with peak capacity of ~24,000 TPS.

The trilemma arises from first principles: increasing throughput on a single chain (larger blocks, shorter block times) requires nodes to process more data faster, raising hardware requirements, reducing the number of viable node operators, and thereby reducing decentralisation. Layer 2 solutions address this by moving most computation and state off the main chain while anchoring security to it.

Layer 1 Scaling Approaches

Several approaches attempt to increase throughput at the base layer:

  • Block size increases: Bitcoin's block size debate produced one of the most contentious forks in crypto history. Bitcoin Cash (BCH) forked from Bitcoin in August 2017 with an 8 MB block size limit (vs Bitcoin's 1 MB / ~4 MB with SegWit). The argument: larger blocks mean more transactions per block means more throughput. The counter-argument: larger blocks require more bandwidth and storage, raising node operation requirements, reducing decentralisation, and centralising the network around well-resourced operators. The market delivered a verdict: Bitcoin Cash's market cap is roughly 1–2% of Bitcoin's. Throughput gains alone do not guarantee adoption.
  • Shorter block times: Solana produces blocks every 400 milliseconds (vs Bitcoin's ~600 seconds) and targets 65,000 TPS, achieved through a novel Proof of History (PoH) timestamping mechanism combined with PoS. The trade-off: Solana's validator hardware requirements are much higher than Ethereum's, reducing the validator set and decentralisation. Solana also suffered multiple multi-hour network outages in 2021–2022 due to the complexity of its high-throughput design.
  • Sharding: instead of every node processing every transaction, sharding splits the network into parallel subsets (shards), each processing a subset of transactions. Ethereum's Danksharding roadmap (expected through 2025–2028) implements this via data blobs rather than execution shards — a design that prioritises serving Layer 2 data availability rather than running Layer 1 computation in parallel. Proto-Danksharding (EIP-4844) launched in March 2024, immediately reducing L2 transaction costs by 90%+.

Layer 2 Architecture: The Core Concept

A Layer 2 is a separate protocol that processes transactions outside the main chain (Layer 1) but inherits the Layer 1's security guarantees through a cryptographic or economic link. The key insight: the Layer 1 does not need to execute every transaction; it only needs to verify a compact proof or record a commitment that allows anyone to verify the Layer 2's correctness after the fact.

Layer 1 vs Layer 2 — Security InheritanceLayer 1: Ethereum (Settlement + Data Availability)~15-30 TPS | Full decentralisation + security | State roots / validity proofs / fraud proofs anchored hereOptimistic RollupArbitrum, Optimism~1,000-4,000 TPS | 7-day challengeZK RollupzkSync, Starknet, Polygon zkEVM~100-2000 TPS | instant finalitySidechainPolygon PoS, Gnosis ChainHigh TPS | own security modelsecurity inherited from L1own validatorsLightning Network (Bitcoin L2): payment channels, off-chain balance updates,L1 only for channel open/close. Near-instant, near-zero cost. Limited to simple payments.
Fig 1 — Layer 2 security inheritance. Rollups anchor their state to Ethereum L1 via fraud proofs (optimistic) or validity proofs (ZK), inheriting L1 security. Sidechains have their own security models. The Lightning Network (Bitcoin) processes payments entirely off-chain with L1 settlement only for channel open/close.

Optimistic Rollups

Optimistic rollups (Arbitrum, Optimism, Base) bundle thousands of transactions off-chain and periodically post a compressed summary (the state root) to Ethereum L1. They are called "optimistic" because they assume all transactions are valid by default — they do not compute a proof of validity upfront. Instead, they post a bond and provide a challenge window (currently 7 days for both Arbitrum and Optimism) during which anyone can submit a fraud proof demonstrating that a posted state root is incorrect. If fraud is proven, the invalid batch is rolled back and the sequencer's bond is slashed.

The practical implication: withdrawals from optimistic rollups to Ethereum L1 have a 7-day delay for security. You can bridge assets to Arbitrum instantly but cannot move them back to mainnet instantly — you must either wait 7 days or use a "fast bridge" (a third-party liquidity provider who fronts you the mainnet liquidity immediately in exchange for a fee, taking on the 7-day settlement risk themselves). Fast bridges are convenient but introduce their own counterparty and smart contract risk layers.

Optimistic rollup throughput in practice: Arbitrum and Optimism typically handle 10–40 TPS at current demand levels, with theoretical capacity in the hundreds to thousands of TPS. Transaction costs are typically 5–20× cheaper than Ethereum mainnet for equivalent operations.

Zero-Knowledge Rollups

ZK rollups (zkSync Era, Starknet, Polygon zkEVM, Scroll) use cryptographic validity proofs — typically SNARK or STARK proofs — to mathematically guarantee the correctness of each batch of transactions before posting to L1. Instead of assuming validity and watching for fraud, ZK rollups prove validity. The L1 smart contract verifies the proof before accepting the new state root.

Advantages over optimistic rollups:

  • Instant finality: once the validity proof is verified on L1 (typically within minutes to hours of batch submission), the state is final with the same security guarantees as L1. No 7-day withdrawal window.
  • Stronger security guarantees: mathematical proof provides cryptographic certainty, not just economic incentives against fraud.
  • Lower L1 data footprint: validity proofs allow more state compression, reducing calldata costs further.

The trade-off: generating ZK proofs is computationally intensive and complex. ZK-proving is not yet able to efficiently handle arbitrary EVM bytecode for all opcodes, though EVM-equivalence has improved dramatically since 2022. The main ZK rollup projects sit at different points on the EVM-compatibility spectrum: zkSync Era and Polygon zkEVM target full EVM equivalence; Starknet uses its own Cairo VM with a different programming model.

Sidechains

Sidechains are independent blockchains with a two-way bridge to Ethereum (or Bitcoin). They run their own consensus, their own validator sets, and their own security — they do not inherit Ethereum's security model. Examples:

  • Polygon PoS: a PoS chain with ~100 validators, bridged to Ethereum. Processes ~7,000 TPS at very low cost. Security depends on the honesty of its validator set, not on Ethereum. The bridge is the critical risk point: the Polygon bridge has been audited extensively and has not been exploited (unlike the Ronin and Wormhole bridges), but it remains a concentrated attack surface.
  • Gnosis Chain (formerly xDai): an EVM-compatible sidechain originally designed for stablecoin payments, now home to various DeFi protocols.

The core distinction: if Polygon PoS's validators all collude to produce an invalid state, there is no Ethereum-level fallback. Ethereum's security does not protect assets on Polygon. This is fundamentally different from optimistic rollups and ZK rollups, which inherit Ethereum's security directly through fraud or validity proofs posted to L1.

The Lightning Network (Bitcoin Layer 2)

Bitcoin's primary Layer 2 is the Lightning Network, a network of bidirectional payment channels. Two parties open a payment channel by committing a Bitcoin transaction to L1 (the channel open). They can then make unlimited off-chain payments between themselves, updating a shared balance sheet. These off-chain updates are not broadcast to Bitcoin; they only exist between the channel parties. When they wish to settle, they broadcast the final state to Bitcoin (the channel close). The Bitcoin L1 enforces the final balance.

The innovation: channels can be routed. Alice can pay Carol through Bob, if Alice-Bob and Bob-Carol channels exist with sufficient liquidity, without either Alice or Carol having a direct channel. The network of channels forms a routing graph, and payments can flow through multi-hop paths atomically using Hashed Timelock Contracts (HTLCs) enforced by the underlying Bitcoin smart script language.

Lightning Network throughput: theoretically millions of TPS limited only by network routing capacity, not any on-chain bottleneck. Fee costs: fractions of a cent. Limitations: payment amounts are bounded by channel liquidity; channels require on-chain transactions to open and close; routing large payments through the network requires adequate inbound and outbound liquidity at each hop, which is an unsolved liquidity management problem at scale.

Data Availability: The Critical Layer

A subtle but important distinction in the Layer 2 design space is data availability: where does the transaction data that allows anyone to reconstruct the rollup state live? If only a validity proof (or fraud proof challenge data) is posted to L1 but the underlying transaction data is stored off-chain (on a separate data availability committee), the rollup's security degrades: if the data becomes unavailable, users cannot reconstruct the chain state or exit funds.

This is why Ethereum's Danksharding roadmap is designed around data availability sampling rather than full transaction execution on L1. EIP-4844 (Proto-Danksharding, launched March 2024) introduced "blob" transactions — large data payloads attached to L1 blocks that are temporarily available for ~18 days (enough for fraud challenges and exits) but not permanently stored, dramatically reducing rollup data costs. The rollup ecosystem is the primary beneficiary: Arbitrum and Optimism transaction costs dropped 90%+ immediately following EIP-4844 activation.

Bridge Risk: The Weakest Link

Bridges are the infrastructure connecting Layer 1 to Layer 2 and connecting different L2s. They are also the single most exploited component in all of DeFi. The three largest hacks in DeFi history by dollar value — Ronin ($625M), Wormhole ($320M), Nomad ($190M) — were all bridge attacks. Why are bridges so vulnerable? They concentrate TVL in smart contracts, require complex cross-chain message passing logic, and often have privileged administrative functions that are attack targets. When you move assets across chains, you are taking on bridge smart contract risk in addition to the destination chain's protocol risks. This is a concrete, quantifiable addition to the risk profile covered in the previous course.

Implications for Traders

The L1/L2 landscape has direct, practical consequences for active crypto traders:

  • Liquidity fragmentation: Ethereum mainnet, Arbitrum, Optimism, Base, zkSync, Polygon, and Solana all have separate liquidity pools. The same token pair may have dramatically different depth, spread, and slippage across chains. Use the free crypto tools to model your effective execution price including bridge fees, gas, and slippage across chains before executing large trades.
  • Gas cost as a timing signal: high Ethereum mainnet gas (and correspondingly high L2 fees during congestion periods) indicates peak network activity. Retail participants are most active and most emotional during these periods. Conversely, very low gas periods often coincide with low market activity and potentially better entry opportunities for on-chain positions.
  • Withdrawal delays matter for risk management: if you hold a significant position on an optimistic rollup and want to exit to mainnet, you are committing to a 7-day minimum withdrawal window or accepting fast bridge fees. This affects stop-loss execution timing. For positions where rapid exit is critical, native L1 or ZK rollup positioning may be more appropriate than optimistic rollup exposure.
  • L2 token ecosystem evaluation: several L2s have governance tokens (ARB for Arbitrum, OP for Optimism, MATIC for Polygon, STRK for Starknet). Valuing these requires understanding the fee revenue model of the L2, the competitive landscape among rollups, and the trajectory of Ethereum's Danksharding roadmap. Use position sizing principles from Course 36: Portfolio Construction when allocating to L2 ecosystem tokens. The crypto profit and loss calculator is useful for modelling fee-adjusted returns on L2 liquidity provision positions.
  • Bridge concentration risk: if you maintain substantial capital on multiple chains simultaneously, the bridges connecting them represent a concentration of smart contract risk. Diversify across bridge providers and avoid leaving large amounts in bridge contracts during periods of market stress, when hacks are more likely to go undetected in the noise.

Summary

The scalability trilemma forces every single-chain solution into a trade-off between decentralisation, security, and throughput. Layer 1 scaling approaches — larger blocks, shorter block times, sharding — each sacrifice some decentralisation in exchange for throughput. Layer 2 solutions — rollups, payment channels, sidechains — move computation off-chain while anchoring to L1 security through fraud proofs, validity proofs, or HTLCs. Optimistic rollups (Arbitrum, Optimism) provide strong security inheritance from Ethereum with a 7-day withdrawal challenge window. ZK rollups (zkSync, Starknet) provide cryptographic proof of correctness with near-instant finality. Sidechains (Polygon PoS) provide high throughput with their own security models. Bridge risk is the critical practical vulnerability in multi-chain exposure. EIP-4844 has already dramatically reduced L2 costs, and the Danksharding roadmap will extend this further. For traders, the L1/L2 landscape determines where liquidity lives, what execution costs, how quickly you can exit, and what smart contract risks your positions carry. The curriculum now turns to the economic layer sitting above this infrastructure: Course 57: Tokenomics Deep Dive, where the supply schedules, vesting structures, and inflation models that determine the long-term value dynamics of every crypto asset are examined in systematic detail.

Your Free Crypto Tools for This Course

The concepts introduced in this course connect directly to several of DennTech’s free crypto tools. There is no registration required to use any of them: