Overview
BOB Gateway enables users to interact with DeFi protocols using a single Bitcoin transaction. There are three integration approaches:Custom Strategy
Full control with smart contracts
Multicall
No deployment needed
Cross-Chain
Execute on destination chains
Which Approach Should I Choose?
Custom Strategy - For Complex Logic
Custom Strategy - For Complex Logic
Choose this when you need:
- Complex multi-step operations
- Gas optimization
- Custom events and logging
- Full control over execution flow
- State management in your contract
Multicall - For Quick Integration
Multicall - For Quick Integration
Choose this when you want to:
- Integrate with existing contracts on BOB
- Avoid deploying new contracts
- Implement simple approve + deposit patterns
- Get started quickly
Cross-Chain - For LayerZero Bridges
Cross-Chain - For LayerZero Bridges
Choose this for:
- Bridging to Ethereum, Base, or other LayerZero chains
- Executing actions on destination chain after bridge
- Depositing into lending protocols on destination
- Multi-step operations post-bridge
Option 1: Custom Strategy Contract
Deploy a smart contract that implements the Gateway strategy interface for full control.Strategy Interface
Complete Example: Convert to SolvBTC
Using Your Custom Strategy
Option 2: Multicall Strategy
Execute multiple contract calls without deploying custom contracts.Basic Approve + Deposit Pattern
Advanced: Multi-Protocol Interaction
Option 3: Cross-Chain Destination Calls
Cross-Chain Destination Calls allow you to execute arbitrary smart contract calls on the destination chain as part of a cross-chain swap or bridge transaction. This is ideal for advanced integrations, multi-step DeFi actions, or custom workflows triggered by a cross-chain transfer.How It Works
When you request a quote (viaget-quote), you can specify a message containing an ABI-encoded vector of calls. Each call uses the following Solidity struct:
target: Contract address to call on the destination chaincallData: ABI-encoded function call datavalue: Amount of native token (e.g., ETH) to send with the call
Call structs using standard Solidity ABI encoding and include it in the message field of your quote request.
On the destination chain, the solver decodes the vector and executes each call using a LayerZero (L0) composer contract. This ensures atomic execution and proper sequencing of all calls.
SDK Example: Sending Cross-Chain Calls
Benefits
- Enables complex workflows and contract interactions as part of a cross-chain swap
- Ensures atomic execution via the L0 composer
Note: Make sure all target contracts and call data are valid for the destination chain. The composer contract handles sequencing and error management; failed calls may revert the entire batch depending on configuration.
Next Steps
Integration Guide
Complete SDK integration walkthrough
Bitcoin Wallets
Implement Bitcoin wallet support
API Reference
Complete API documentation
GitHub Examples
View example implementations