← Protocols
Base
01Description

Coinbase's OP-Stack L2 (chain ID 8453) — the default chain for Coinbase consumer flows, Smart Wallet, Basenames, and onchain commerce. Sub-cent fees, ~2s blocks, full EVM equivalence, and deep integration with Coinbase products (CDP, Onramp, Pay, Commerce). De-facto home of consumer Web3 throughout 2025–2026.

02Best for
  • 01consumer apps that need Coinbase Smart Wallet + Basenames out of the box
  • 02low-fee DeFi and onchain commerce
  • 03Farcaster Frames and miniapps
  • 04Coinbase Onramp / Pay / Commerce integrations
  • 05AgentKit-powered onchain agents
03Install
  • pnpm add viem wagmi
  • pnpm add @coinbase/onchainkit
  • pnpm add @coinbase/wallet-sdk
04Environment variables
VariableScopeDescription
NEXT_PUBLIC_BASE_RPC_URLClientBase RPC URL. Use Coinbase CDP (`https://api.developer.coinbase.com/rpc/v1/base/<KEY>`), Alchemy, or QuickNode — the public `mainnet.base.org` endpoint is rate-limited.
NEXT_PUBLIC_BASE_CHAIN_IDClientChain ID — 8453 for Base mainnet, 84532 for Base Sepolia testnet.
NEXT_PUBLIC_ONCHAINKIT_API_KEYClientCoinbase Developer Platform API key for OnchainKit components (Onramp, Pay, Identity, Basename resolution).
05Prompt snippet
Use viem's built-in `base` / `baseSepolia` chains. For React UI, install `@coinbase/onchainkit` and wrap the app in `<OnchainKitProvider chain={base} apiKey={...}>` — it ships drop-in components for Wallet, Identity (Basenames + avatars), Token, Swap, Transaction, Checkout, Fund. For Smart Wallet auth, add `coinbaseWallet({ appName, preference: 'smartWalletOnly' })` to your wagmi connectors. For Basenames resolution use `getName({ address, chain: base })` from OnchainKit; do not hand-roll ENS-style resolution. Coinbase CDP RPC supports gas-sponsored paymaster transactions natively — use it for sponsored onboarding flows.
06Gotchas
  • Base's bridge to mainnet has a 7-day challenge period for L2→L1 withdrawals (standard OP-Stack). For instant withdrawals route through Across, Stargate, or Coinbase's centralized bridge.
  • Smart Wallet (Coinbase's ERC-4337 wallet) creates a fresh smart-account address per dApp — the wallet `address` you receive is NOT a 1:1 EOA, so loyalty/airdrop programs keyed off EOA will miss users.
  • Basenames are ENS-compatible but live on Base — resolve via OnchainKit or the Base Basenames resolver, not mainnet ENS.
  • OnchainKit components require an OnchainKit API key (from CDP) or they silently fall back to limited functionality.
  • `mainnet.base.org` public RPC is heavily rate-limited and drops eth_subscribe — production must use a managed provider.
  • Base is OP-Stack — most Optimism tooling (op-node, op-geth, Cannon, fault proofs) applies, but Coinbase-specific extensions (CDP, Smart Wallet, Basenames) are NOT portable to vanilla Optimism.
07Alternatives