All multi-step flows use the same API pattern as single-step Composer operations. LI.FI’s routing engine automatically determines the optimal path (bridge, swap, deposit) based on the
fromChain, toChain, fromToken, and toToken parameters.Bridge + Deposit
The most common multi-step pattern: bridge assets from one chain and deposit into a protocol on another chain.ETH on Ethereum → Morpho Vault on Base
Cross-chain Composer: deposit into a Morpho vault on Base using ETH from Ethereum. The routing engine determines the optimal path (bridge, swap, deposit) automatically.- LI.FI bridges ETH from Ethereum to Base
- Swaps ETH to USDC on Base
- Deposits USDC into the Morpho vault
- Returns Morpho vault tokens to the user
Swap + Bridge + Deposit
Start with a token that needs to be swapped before bridging, then deposit on the destination chain.USDT on Arbitrum → Morpho Vault on Base
- LI.FI may swap USDT to a bridgeable token on Arbitrum (if needed)
- Bridges to Base
- Swaps to USDC on Base (the vault’s underlying asset)
- Deposits into the Morpho vault
- Returns vault tokens to the user
Bridge + Stake
Bridge assets from one chain and stake on another.USDC on Polygon → wstETH on Ethereum
- LI.FI bridges USDC from Polygon to Ethereum
- Swaps USDC to ETH on Ethereum
- Stakes ETH via Lido and wraps to wstETH
- Returns wstETH to the user
Bridge + Lend
Bridge assets and deposit into a lending protocol on another chain.ETH on Optimism → Aave V3 on Base
Execution Flow for Multi-Step Recipes
All multi-step recipes follow the same execution pattern:1. Get Quote
2. Set Allowance (if needed)
IffromToken is not a native token (ETH), approve the estimate.approvalAddress from the quote response.
3. Send Transaction
4. Poll Status
For cross-chain flows, pollGET /status until the transfer completes:
Cross-Chain Timing
Cross-chain Composer flows involve bridge latency. Typical times vary by bridge:- Fast bridges (e.g., Across, Relay): seconds to minutes
- Standard bridges (e.g., Stargate): 1-5 minutes
- Canonical bridges: 10-30+ minutes
order parameter (CHEAPEST or FASTEST).
Error Handling for Multi-Step Flows
Cross-chain multi-step flows have specific failure modes:| Scenario | What Happens | User Impact |
|---|---|---|
| Source transaction reverts | All steps fail atomically | Tokens stay in wallet (gas consumed) |
| Bridge fails | Refund process initiated | User receives refund on source chain |
| Destination deposit fails | Bridge succeeds, deposit fails | User has tokens on destination chain |
Next Steps
Vault Deposit Recipes
Same-chain vault deposit recipes
Staking Recipes
Lido, EtherFi, Kinetiq staking recipes
Cross-Chain Patterns
Detailed cross-chain execution guide
API Parameters
Full API parameter reference

