← Protocols
BOB (Build on Bitcoin)
Other Chain·Bitcoin · EVM

BOB (Build on Bitcoin)

01Description

Hybrid Layer-2 powered by Bitcoin and Ethereum. Combines Bitcoin security and BTC liquidity with EVM execution, plus a Gateway SDK for native BTC-in/BTC-out app flows.

02Best for
  • 01EVM apps that accept native BTC
  • 02BTC-collateralized DeFi
  • 03ordinals/runes-aware dApps
  • 04hybrid BTC + ETH UX
  • 05BTC staking
03Install
  • pnpm add @gobob/bob-sdk viem wagmi
04Environment variables
VariableScopeDescription
NEXT_PUBLIC_BOB_RPC_URLClientBOB JSON-RPC endpoint (mainnet chain id 60808).
BOB_GATEWAY_API_KEYServerAPI key for the BOB Gateway SDK if using hosted endpoints.
05Prompt snippet
Use BOB to build EVM apps that accept native BTC. Add chain id 60808 to wagmi/viem with `NEXT_PUBLIC_BOB_RPC_URL`. To accept BTC, use `@gobob/bob-sdk` `GatewaySDK('mainnet')` then `getQuote({ toToken, toUserAddress, amount })` and `startOrder(quote)` to get a BTC deposit PSBT — sign with the user's BTC wallet (Xverse/Leather/Unisat) and broadcast. The Gateway relayer auto-mints WBTC/tBTC/solvBTC on the EVM side. For ordinals/runes, use the SDK's `EsploraClient` and `Inscription`/`Rune` helpers to read inscriptions in Solidity-adjacent flows.
06Gotchas
  • Gateway orders depend on Bitcoin confirmation count — pick the right `toToken`/strategy combo and surface BTC mempool latency in the UI; don't promise instant settlement.
  • BOB is a hybrid L2: phase 1 is an OP Stack rollup on Ethereum, phase 2 adds BTC finality — security assumptions evolve, document the current trust model.
  • Bridged BTC variants (WBTC, tBTC, solvBTC) have different issuer trust assumptions; treat them as distinct assets, not fungible '1 BTC'.
  • PSBTs returned from Gateway must be signed by the same wallet that owns the inputs — user wallet selection (Xverse vs Leather vs Unisat) materially affects fee estimation and signing UX.
  • Withdrawals back to L1 BTC are not synchronous — fall back to the relayer's status webhook rather than polling EVM events.
07Alternatives