freecoding.school100% FREE · NO SIGNUP
Ledger LandISSUE #68 of 90

layer 2 · scaling beyond mainnet

BlockyVSDouble-Spend Dan
Blocky saysLayer 2s scale a blockchain by processing transactions off the main chain, then settling on it.

Base layers (L1) like Ethereum are secure but slow and expensive. Layer 2s execute many transactions off-chain (or in a compressed batch) and post results back to L1, inheriting its security while slashing cost and latency. Rollups are the dominant approach. L2s are how Ethereum scales to mainstream volume without sacrificing L1 security.

Power-ups you unlock

Double-Spend Dan attacks — common mistakes

Boss battleExplain how an L2 keeps L1 security while lowering fees.

Example code

<!doctype html><html><head><meta charset="utf-8"></head>
<body style="background:#06040d;color:#e6e0ff;font-family:monospace;padding:20px"><pre>L1: secure, slow, pricey
L2: batch many txs off-chain → post to L1
→ L1 security, fraction of the cost</pre></body></html>
▶ Open the interactive comic issue
‹ Did · Decentralized IdentifiersOptimistic Rollups · Arbitrum · Optimism ›