route and bundle API operate in crosschain mode.
For custom bundles, use the bridge action to facilitate cross-chain token transfers using one of four supported bridge protocols: CCIP, CCTP (USDC-only), Relay or Stargate.
For example: bridge assets to chains where protocols exist, execute operations such as minting, then optionally bridge results back to your origin chain and deposit them in a yield-bearing position.
Quick Start
- Crosschain Stablecoin Minting (Stargate)
- Crosschain Swap
Core Concepts
Bridge Protocols
Enso supports four bridge protocols: CCIP (Chainlink), CCTP (Circle, USDC-only), Relay, and Stargate (LayerZero). Each has different characteristics for callback limits, native token support, and fee handling.
Protocol Discovery
Use protocol-specific APIs to discover bridge addresses:
/ccip/router for CCIP,
/cctp/bridge/tokenmessengerv2 for
CCTP, /layerzero/pool for
Stargate.Native Drop
Parent bridge calls calculate gas fees required for all child bridge
operations and include these costs in the initial transaction fee.
Post-Bridge Execution
Callback arrays of Enso Actions execute on the destination chain after bridge
completion. All actions within a bundle execute atomically.
Bridge Protocols
Enso supports four bridge protocols, each with different characteristics:| Feature | CCIP | CCTP | Relay | Stargate |
|---|---|---|---|---|
| Provider | Chainlink | Circle | Relay | LayerZero |
| Token Coverage | Whitelisted ERC20 | USDC only | ERC20 + native | OFT-enabled tokens |
| Callback Data Limit | 30KB | Not supported | Unlimited | ~9.5KB |
| Native Token Bridging | No | No (USDC only) | Yes | Yes |
| Callback Gas Limit | 200k–3M | N/A | Dynamic | 300k base |
| Fee Token | Native | USDC (from minted amount) | Token itself | Native |
| Finalization | Waits for finality (varies by chain) | Fast (where available) or wait for finality | Fast | Fast |
| Discovery API | /ccip/router | /cctp/bridge/tokenmessengerv2 | Not needed (token address is the primaryAddress) | /layerzero/pool |
When to Use Each Bridge
CCIP (Chainlink)
CCIP (Chainlink)
Best for: High-security transfers requiring source chain finalization guarantees.
- Higher callback data limit (30KB) allows complex post-bridge operations
- Waits for source chain finality before executing callbacks, ensuring transaction irreversibility
- Does not support native token bridging (use wrapped tokens)
CCTP (Circle)
CCTP (Circle)
Best for: Native USDC transfers across chains where the recipient shouldn’t need destination gas.See the CCTP Bridge use case for full details on fees, fallbacks, and the manual claim flow. Per-chain Fast/Standard support comes from Circle’s supported blockchains matrix.
- USDC only — bridges burn-and-mint, not wrapped
- No callback support (use CCIP/Stargate/Relay for post-bridge actions)
- Auto-relayed by Circle’s Forwarding Service in both fast and standard modes
- Fees deducted from minted amount: protocol fee (Fast only, ~Iris
minimumFee* 1.20) + forwarding fee (low/med/high, always) cctpTransferTypedefaults tofastwhere supported, otherwise silently falls back tostandard
Relay
Relay
Best for: Flexible bridging with dynamic amounts and native token support.
- Uses placeholder-based design for dynamic amount resolution
- No callback data limit (amounts resolved at execution time)
- Supports both ERC20 and native token bridging
- API-based fee calculation
Stargate (LayerZero)
Stargate (LayerZero)
Best for: Native token bridging and LayerZero ecosystem integration.
- Full native token support
- Tight callback data limit (~9.5KB) - keep callbacks concise
- Uses LayerZero messaging for cross-chain communication
When to use Route vs Bundle API?
Use Route API for: Limitations: The route API automatically selects the optimal bridge protocol - bridge protocol cannot be explicitly selected. Cannot handle custom post-bridge logic or multi-step protocol interactions. See Bridge Transaction Status to track delivery after submission. Use Bundle API for:- crosschain position minting
- crosschain yield strategies
- CCIP bridging with callbacks
- mixed bridge protocols
- Relay bridging with callbacks
- CCTP USDC bridging
Examples
1. Simple Cross-Chain Swap
Use Route API for basic cross-chain operations with automatic pathfinding.SDK
2. Crosschain Vault Zap
In this example, we’ll bridge ETH from Ethereum to zap it to a Ether.fiweETH vault on Base.
Try this route →
3. Cross-Chain Position Minting
Crosschain routing enables you to mint positions on different chains and bridge them back, while signing only once. In this example, we’ll bridge USDC from Berachain to Ethereum, mint e-rUSD using Reservoir protocol, then bridge rUSD back to Berachain. About Reservoir: Reservoir is a stablecoin protocol that mints rUSD (a USD-pegged stablecoin) by accepting USDC as collateral on Ethereum mainnet.Use the GET
layerzero/pool API
or client.getLayerZeroPool() from the SDK to find the correct pool address
and use it as the primaryAddress for stargate.bridge operation.-
Atomic Safety: All callback actions execute as a single atomic transaction on the destination chain. If any action fails, the entire callback transaction reverts and bridged tokens are sent to the
refundReceiveraddress. Funds never get stuck in an intermediate state. - Gas Management: The initial transaction on the source chain calculates and pays for all destination chain gas costs using LayerZero’s native drop feature. You don’t need to hold native tokens on every destination chain.
- Output Chaining: Callbacks can reference outputs from previous callback actions using useOutputOfCallAt, enabling complex multi-step workflows that adapt to actual bridged amounts rather than fixed values.
mintOnBeraFromMainnet.ts
4. Crosschain Yield Strategy
Nested callbacks enable multi-hop workflows, allowing operations that span multiple chains where different protocols exist. In this example, we’ll do an Euler deposit of rUSD tokens minted on a Berachain by using Ethereum Mainnet assets. The user starts with USDC on Berachain and ends with yield-generating vault shares with a single signature.mintOnBeraDepositOnMainnet.ts
5. CCIP Bridge with Callback
Use CCIP for ERC20 token bridging with larger callback payloads. This example bridges SolvBTC from BNB Chain to Base, then swaps it to native ETH.Use the GET
/ccip/router API to
get the CCIP Router address for the primaryAddress parameter.ccipBridgeWithCallback.ts
6. Mixed Bridge Protocols
Combine different bridge protocols in a single workflow. This example uses Stargate for the outbound bridge and CCIP for the return bridge, useful when different protocols support different token pairs.mixedBridgeProtocols.ts
7. Relay Bridge with Callback
Use Relay for bridging with dynamic amount resolution. This example bridges ETH from Ethereum to Arbitrum and wraps it to WETH.relayBridge.ts
8. CCTP Bridge
Bridge native USDC across chains with Circle’s CCTP — burn on the source, mint on the destination. Both fast and standard transfers are auto-relayed by Circle’s Forwarding Service, so the receiver never needs destination gas.cctpBridge.ts
Reference
Bridge Action Parameters
All bridge protocols share a common set of parameters:| Parameter | Description | Required |
|---|---|---|
protocol | Bridge protocol: "ccip", "cctp", "relay", or "stargate" | Yes |
action | Always "bridge" | Yes |
primaryAddress | Protocol-specific address (see below) | Yes |
destinationChainId | Target blockchain network ID | Yes |
tokenIn | Token address to bridge from source chain | Yes |
amountIn | Amount to bridge (with full decimals) or reference to previous action output | Yes |
receiver | Address to receive bridged tokens on destination chain | Yes |
callback | Array of actions to execute on destination chain after bridging | No |
refundReceiver | Address to receive bridged tokens if callback execution fails. Defaults to receiver. | No |
Protocol-Specific Parameters
- CCIP
- CCTP
- Relay
- Stargate
primaryAddress: CCIP Router address from /ccip/router APICallback limits:- Data limit: ~30KB
- Gas limit: 200k (default) to 3M (max)
- ERC20 tokens only (no native token bridging)
- Fee paid in native token
Callback Requirements
- First action must be the
balanceaction:
- Reference previous outputs: Use
useOutputOfCallAtto chain actions together
- Nested callbacks: Bridge actions within callbacks enable multi-hop workflows across multiple chains
- Callback data limits: Keep callbacks concise for Stargate (~9.5KB limit). CCIP supports larger payloads (~30KB). Relay has no practical limit. CCTP does not support callbacks.
Protocol Discovery APIs
| Protocol | API Endpoint | Returns |
|---|---|---|
| CCIP | GET /ccip/router | CCIP Router address |
| CCTP | GET /cctp/bridge/tokenmessengerv2 | TokenMessengerV2 address per chain |
| Relay | Not needed — use the bridged token address as primaryAddress | — |
| Stargate | GET /layerzero/pool | OFT pool address |
Updated
