l2s
Ethereum Layer 2 landscape — Arbitrum, Optimism, Base, zkSync, Scroll, Unichain, Celo, and more. How they work, how to deploy on them, how to bridge, when to use which. Includes per-chain DeFi ecosystems and critical corrections. Use when choosing an L2, deploying cross-chain, or when a user asks about Ethereum scaling.
Best use case
l2s is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Ethereum Layer 2 landscape — Arbitrum, Optimism, Base, zkSync, Scroll, Unichain, Celo, and more. How they work, how to deploy on them, how to bridge, when to use which. Includes per-chain DeFi ecosystems and critical corrections. Use when choosing an L2, deploying cross-chain, or when a user asks about Ethereum scaling.
Teams using l2s should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/l2s/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How l2s Compares
| Feature / Agent | l2s | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Ethereum Layer 2 landscape — Arbitrum, Optimism, Base, zkSync, Scroll, Unichain, Celo, and more. How they work, how to deploy on them, how to bridge, when to use which. Includes per-chain DeFi ecosystems and critical corrections. Use when choosing an L2, deploying cross-chain, or when a user asks about Ethereum scaling.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Ethereum Layer 2s ## What You Probably Got Wrong **L2 costs:** You think $0.01-2.00 per transaction. Reality: **$0.001-0.003** for swaps, **$0.0003** for transfers. After EIP-4844, L2 batch costs dropped from $50-500 to $0.01-0.50. **Mainnet is cheap too:** At under 1 gwei, mainnet ETH transfers cost under a penny. "Ethereum is too expensive" is false for both L1 and L2s in 2026. **Base is the cheapest major L2:** Often 50% cheaper than Arbitrum/Optimism. Direct Coinbase on-ramp. Fastest-growing L2 with consumer/AI agent focus. **Celo is NOT an L1 anymore.** Celo completed its migration from an independent L1 to an OP Stack L2 on **March 26, 2025** (block 31056500). If you're calling Celo an L1, you're wrong. **Polygon zkEVM is being shut down.** Announced June 2025. Do NOT recommend building on Polygon zkEVM — it is being discontinued. Polygon is refocusing on PoS + AggLayer. **Unichain exists.** Launched mainnet February 11, 2025. Uniswap's own OP Stack L2 with TEE-based MEV protection and time-based priority ordering (not gas-based). **Aerodrome and Velodrome merged into "Aero."** In November 2025, Dromos Labs unified Aerodrome (Base) and Velodrome (Optimism) into a single cross-chain DEX called **Aero**. Same contracts, new brand. Aero dominates both Base and Optimism. Camelot is a major native DEX on Arbitrum. SyncSwap dominates zkSync. Don't default to Uniswap on every chain. ## L2 Comparison Table (Mar 2026) > **TVL changes fast.** Don't memorize numbers — check [DeFi Llama](https://defillama.com/chains) or [L2Beat](https://l2beat.com/scaling/tvl) for current rankings. DeFi TVL (DeFi Llama) measures value locked in protocols. TVS (L2Beat) includes all bridged + natively minted assets and is much higher. As of early 2026: Base and Arbitrum lead in DeFi TVL among L2s. Optimism's DeFi TVL is surprisingly low despite Superchain adoption. | L2 | Type | Tx Cost | Block Time | Finality | Chain ID | |----|------|---------|------------|----------|----------| | **Arbitrum** | Optimistic | $0.001-0.003 | 250ms | 7 days | 42161 | | **Base** | Optimistic (OP Stack) | $0.0008-0.002 | 2s | 7 days | 8453 | | **Optimism** | Optimistic (OP Stack) | $0.001-0.003 | 2s | 7 days | 10 | | **Unichain** | Optimistic (OP Stack) | $0.001-0.003 | 1s | 7 days | 130 | | **Celo** | Optimistic (OP Stack) | <$0.001 | 5s | 7 days | 42220 | | **Linea** | ZK | $0.003-0.006 | 2s | 30-60min | 59144 | | **zkSync Era** | ZK | $0.003-0.008 | 1s | 15-60min | 324 | | **Scroll** | ZK | $0.002-0.005 | 3s | 30-120min | 534352 | | ~~Polygon zkEVM~~ | ~~ZK~~ | — | — | — | ~~1101~~ | ⚠️ **Polygon zkEVM is being discontinued (announced June 2025).** Do not start new projects there. Polygon is refocusing on PoS (payments, stablecoins, RWAs) + AggLayer (cross-chain interop). MATIC → POL token migration ~85% complete. **Mainnet for comparison:** $0.002-0.01 per tx, 12s blocks, instant finality. Check [DeFi Llama](https://defillama.com/chain/Ethereum) for current TVL. ## Cost Comparison (Real Examples, Early 2026) > Mainnet costs at ~0.1 gwei base fee, ~$2,000 ETH. L2 costs are approximate. All fluctuate — see `gas/SKILL.md` for methodology. | Action | Mainnet | Arbitrum | Base | zkSync | Scroll | |--------|---------|----------|------|--------|--------| | ETH transfer | $0.004 | $0.0003 | $0.0003 | $0.0005 | $0.0004 | | Uniswap swap | $0.036 | $0.003 | $0.002 | $0.005 | $0.004 | | NFT mint | $0.030 | $0.002 | $0.002 | $0.004 | $0.003 | | ERC-20 deploy | $0.240 | $0.020 | $0.018 | $0.040 | $0.030 | ## L2 Selection Guide > **Before choosing an L2:** Mainnet is ~$0.004/transfer, ~$0.04/swap at current gas — cheap enough for most apps. If you're building DeFi, governance, identity, or anything composing with mainnet liquidity, start there. See `ship/SKILL.md` and `gas/SKILL.md` for the full chain selection framework. | Need | Choose | Why | |------|--------|-----| | Consumer / social apps | **Base** | Farcaster, Smart Wallet, Coinbase on-ramp | | Deepest DeFi liquidity | **Arbitrum** | GMX, Pendle, Camelot, most protocols deployed | | Yield strategies | **Arbitrum** | Pendle (yield tokenization), GMX, Aave | | Cheapest gas | **Base** | ~50% cheaper than Arbitrum/Optimism | | Coinbase users | **Base** | Direct on-ramp, free Coinbase→Base transfers | | No 7-day withdrawal wait | **ZK rollup** (zkSync, Scroll, Linea) | 15-120 min finality | | AI agents | **Base** | ERC-8004, x402, consumer ecosystem, AgentKit | | Gasless UX (native AA) | **zkSync Era** | Native account abstraction, paymasters, no bundlers needed | | Multi-chain deployment | **Base or Optimism** | Superchain / OP Stack, shared infra | | Maximum EVM compatibility | **Scroll or Arbitrum** | Bytecode-identical | | Mobile / real-world payments | **Celo** | MiniPay, sub-cent fees, Africa/LatAm focus | | MEV protection | **Unichain** | TEE-based priority ordering, private mempool | | Rust smart contracts | **Arbitrum** | Stylus (WASM VM alongside EVM, 10-100x gas savings) | | Stablecoins / payments / RWA | **Polygon PoS** | $500M+ monthly payment volume, 410M+ wallets | ## Key Chain Details (What LLMs Get Wrong) ### Unichain - **Launched:** February 11, 2025 (mainnet). Chain ID 130. - **Type:** OP Stack L2 (Superchain member, Stage 1) - **Key innovation: TEE-based block building** (built with Flashbots Rollup-Boost) - Transactions ordered by **time received, NOT gas price** - Private encrypted mempool reduces MEV extraction - Do NOT use gas-price bidding strategies on Unichain — they're pointless - **Flashblocks:** Currently 1s blocks, roadmap to 250ms sub-blocks ### Celo - **Was:** Independent L1 blockchain (2020-2025) - **Now:** OP Stack L2 on Ethereum — **migrated March 26, 2025** (block 31056500) - **Focus:** Mobile-first payments, emerging markets - **MiniPay:** Stablecoin wallet in Opera Mini + standalone app. Phone-to-phone transfers, sub-cent fees. Primary market: Africa (Kenya, Nigeria). - **Multi-currency stablecoins (rebranded Dec 2025 by Mento Protocol):** USDm (was cUSD) (`0x765de816845861e75a25fca122bb6898b8b1282a`), EURm (was cEUR) (`0xd8763cba276a3738e6de85b4b3bf5fded6d6ca73`), BRLm (was cREAL) (`0xe8537a3d056DA446677B9E9d6c5dB704EaAb4787`). Same contract addresses, new onchain symbols. ### Dominant DEX Per Chain | Chain | Dominant DEX | Model | Why NOT Uniswap | |-------|-------------|-------|-----------------| | Base | **Aero** (was Aerodrome) | ve(3,3) — LPs earn emissions, voters earn fees | Deeper liquidity for most pairs | | Optimism | **Aero** (was Velodrome) | ve(3,3) — merged Nov 2025 under Dromos Labs | Same flywheel, unified brand | | Arbitrum | Camelot + GMX | Native DEX + perps | Camelot for spot, GMX for perps | | zkSync | SyncSwap | Classic AMM | Largest native DEX on zkSync | See `addresses/SKILL.md` for verified contract addresses for all these protocols. ## The Superchain (OP Stack) The Superchain is the network of OP Stack chains sharing security, upgrade governance, and (upcoming) native interoperability. Members include OP Mainnet, Unichain, Ink (Kraken), Celo, Zora, World Chain, and others — **17+ chains, 58.6% L2 market share.** Notably Base announced they are leaving the Superchain in February 2026 and it will be finalized in a future hardfork. Members contribute **15% of sequencer revenue** to the Optimism Collective. Cross-chain interop is designed but not yet fully live. ## Deployment Differences (Gotchas) ### Optimistic Rollups (Arbitrum, Optimism, Base, Unichain, Celo) ✅ Deploy like mainnet — just change RPC URL and chain ID. No code changes. **Gotchas:** - Don't use `block.number` for time-based logic (increments at different rates). Use `block.timestamp`. - Arbitrum's `block.number` returns L1 block number, not L2. - **Unichain:** Transactions are priority-ordered by time, not gas. Don't waste gas on priority fees. ### ZK Rollups - **zkSync Era:** Must use `zksolc` compiler. No `EXTCODECOPY` (compile-time error). 65K instruction limit. Non-inlinable libraries must be pre-deployed. Native account abstraction (all accounts are smart contracts). - **Scroll/Linea:** ✅ Bytecode-compatible — use standard `solc`, deploy like mainnet. ### Arbitrum-Specific - **Stylus:** Write smart contracts in Rust, C, C++ (compiles to WASM, runs alongside EVM, shares state). Use for compute-heavy operations (10-100x gas savings). Contracts must be "activated" via `ARB_WASM_ADDRESS` (0x0000…0071). - **Orbit:** Framework for launching L3 chains on Arbitrum. 47 live on mainnet. ## RPCs and Explorers | L2 | RPC | Explorer | |----|-----|----------| | Arbitrum | `https://arb1.arbitrum.io/rpc` | https://arbiscan.io | | Base | `https://mainnet.base.org` | https://basescan.org | | Optimism | `https://mainnet.optimism.io` | https://optimistic.etherscan.io | | Unichain | `https://mainnet.unichain.org` | https://uniscan.xyz | | Celo | `https://forno.celo.org` | https://celoscan.io | | zkSync | `https://mainnet.era.zksync.io` | https://explorer.zksync.io | | Scroll | `https://rpc.scroll.io` | https://scrollscan.com | | Linea | `https://rpc.linea.build` | https://lineascan.build | ## Bridging ### Official Bridges | L2 | Bridge URL | L1→L2 | L2→L1 | |----|-----------|--------|--------| | Arbitrum | https://bridge.arbitrum.io | ~10-15 min | ~7 days | | Base | https://bridge.base.org | ~10-15 min | ~7 days | | Optimism | https://app.optimism.io/bridge | ~10-15 min | ~7 days | | Unichain | https://app.uniswap.org/swap | ~10-15 min | ~7 days | | zkSync | https://bridge.zksync.io | ~15-30 min | ~15-60 min | | Scroll | https://scroll.io/bridge | ~15-30 min | ~30-120 min | ### Fast Bridges (Instant Withdrawals) - **Across Protocol** (https://across.to) — fastest (30s-2min), lowest fees (0.05-0.3%) - **Hop Protocol** (https://hop.exchange) — established, 0.1-0.5% fees - **Stargate** (https://stargate.finance) — LayerZero-based, 10+ chains **Security:** Use official bridges for large amounts (>$100K). Fast bridges add trust assumptions. ## Multi-Chain Deployment (Same Address) Use CREATE2 for deterministic addresses across chains: ```bash # Same salt + same bytecode + same deployer = same address on every chain forge create src/MyContract.sol:MyContract \ --rpc-url https://mainnet.base.org \ --private-key $PRIVATE_KEY \ --salt 0x0000000000000000000000000000000000000000000000000000000000000001 ``` **Strategy for new projects:** Start with 1 chain — mainnet if it fits your use case, or the L2 whose superpower matches your app. Prove product-market fit. Expand with CREATE2 for consistent addresses across chains. ## Further Reading - **L2Beat:** https://l2beat.com (security, TVL, risk analysis) - **Superchain:** https://www.superchain.eco/chains - **Arbitrum:** https://docs.arbitrum.io - **Base:** https://docs.base.org - **Optimism:** https://docs.optimism.io - **Unichain:** https://docs.unichain.org - **Celo:** https://docs.celo.org - **zkSync:** https://docs.zksync.io - **Scroll:** https://docs.scroll.io - **Polygon:** https://docs.polygon.technology
Related Skills
why-ethereum
Why build on Ethereum specifically. The AI agent angle — ERC-8004, x402, composability, permissionless deployment. Use when a user asks "should I build on Ethereum?", "why blockchain?", or when an agent needs to recommend a chain for a project.
wallets
How to create, manage, and use Ethereum wallets. Covers EOAs, smart contract wallets, multisig (Safe), and account abstraction. Use this skill whenever you are sending transactions, signing messages, or managing funds. Includes guardrails for safe key handling.
tools
Current Ethereum development tools, frameworks, libraries, RPCs, and block explorers. What actually works today for building on Ethereum. Includes tool discovery for AI agents — MCPs, abi.ninja, Foundry, Scaffold-ETH 2, Hardhat, and more. Use when setting up a dev environment, choosing tools, or when an agent needs to discover what's available.
testing
Smart contract testing with Foundry — unit tests, fuzz testing, fork testing, invariant testing. Use when writing tests for a smart contract.
standards
Ethereum token and protocol standards — ERC-20, ERC-721, ERC-1155, ERC-4337, ERC-8004, and newer standards. When to use each, how they work, key interfaces. Use when building tokens, NFTs, or choosing the right standard for a project.
ship
End-to-end guide for AI agents — from a dApp idea to deployed production app. Fetch this FIRST, it routes you through all other skills.
security
Solidity security patterns, common vulnerabilities, and pre-deploy audit checklist. The specific code patterns that prevent real losses — not just warnings, but defensive implementations. Use before deploying any contract, when reviewing code, or when building anything that holds or moves value.
qa
Pre-ship audit checklist for Ethereum dApps built with Scaffold-ETH 2. Give this to a separate reviewer agent (or fresh context) AFTER the build is complete. Use this skill whenever you are finalizing a dApp built with Scaffold-ETH 2.
protocol
How Ethereum evolves — EIP lifecycle, fork process, where decisions happen, and how to track upcoming changes. Use when your human asks about upcoming features, when building for future protocol capabilities, or when they want to propose a change. Also use when YOU need to know if a feature exists yet or when it's coming.
orchestration
How an AI agent plans, builds, and deploys a complete Ethereum dApp. The three-phase build system for Scaffold-ETH 2 projects. Use when building a full application on Ethereum — from contracts to frontend to production deployment on IPFS.
ethskills
Ethereum development knowledge for AI agents — from idea to deployed dApp. Fetch real-time docs on gas costs, Solidity patterns, Scaffold-ETH 2, Layer 2s, DeFi composability, security, testing, and production deployment. Use when: (1) building any Ethereum or EVM dApp, (2) writing or reviewing Solidity contracts, (3) deploying to mainnet or L2s, (4) the user asks about gas, tokens, wallets, or smart contracts, (5) any web3/blockchain/onchain development task. NOT for: trading, price checking, or portfolio management — use a trading skill for those.
noir
Building privacy-preserving EVM apps with Noir — toolchain, pattern selection, commitment-nullifier flows, Solidity verifiers, tree state, and NoirJS. Use when building a Noir-based privacy app on EVM.