Other Chain·Bitcoin · EVM
Citrea
Bitcoin's first ZK-rollup: a Type-2 zkEVM that uses Bitcoin for both data availability and settlement via the BitVM-based Clementine two-way peg. Mainnet went live January 2026.
- 01BTC-secured EVM apps
- 02ZK rollups on Bitcoin
- 03BitVM bridges
- 04porting Solidity to Bitcoin
- 05ctUSD/native BTC DeFi
- pnpm add viem
- pnpm add wagmi
| Variable | Scope | Description |
|---|---|---|
| NEXT_PUBLIC_CITREA_RPC_URL | Client | Citrea JSON-RPC endpoint (mainnet or testnet). |
| NEXT_PUBLIC_CITREA_CHAIN_ID | Client | Citrea chain ID (mainnet 5115; verify in docs). |
Use Citrea as a Type-2 zkEVM L2 secured by Bitcoin. Add a custom `Chain` object to viem/wagmi pointing to `NEXT_PUBLIC_CITREA_RPC_URL` with the configured chain id, then deploy contracts unchanged with Foundry or Hardhat targeting that RPC. Bridge BTC in/out via the Clementine peg UI or contracts; for in-app deposits, generate a deposit address through the bridge contract, monitor BTC confirmations, and credit the EVM-side cBTC after the ZK proof finalizes. Existing `viem` `createPublicClient`/`createWalletClient` flows work as-is.
- ⚑Bridge withdrawals depend on the BitVM/Clementine challenge window — withdrawals can take hours to days; never block UX on synchronous BTC settlement.
- ⚑Even though the EVM is Type-2 equivalent, gas pricing and proof-batching mean confirmation latency is rollup-bounded; quote fees in BTC, not ETH.
- ⚑Bridge security is BitVM-trust-minimized but still relies on at least one honest watcher — disclose the trust model honestly to users.
- ⚑Mainnet is young (Jan 2026) — pin RPC providers, watch for re-orgs near genesis epochs, and keep a fallback indexer.
- ⚑Native gas token is BTC-denominated; fund deployer addresses with bridged cBTC, not ETH.