Same-chain
Swap and deposit
Swap WETH to USDC, then deposit the USDC into Aave. You pick each step.
Split a deposit across vaults
Divide USDC between an Aave and a Morpho vault.
Deposit with a server-planned route
Composer plans up to two hops (swap included) from USDT into an Aave position, with
sdk.route.Add liquidity on Uniswap
Add to a V2 pair from one token, or mint a V3 position.
Consolidate tokens into USDC
Swap several stablecoins into USDC in one transaction.
Cross-chain flows
Bridge and deposit
Bridge USDC to Base and deposit it into Aave, with one signature.
Pay cross-chain
Pay exact amounts to a payee and a fee recipient on Base, from ETH on Arbitrum. One signature: both get paid or neither does.
lifi.bridge with a destination; see Which cross-chain path?.
More examples
Thecomposer-sdk-examples repo has about 40 runnable examples. A few cover tasks these recipes do not:
aaveBorrow.ts: supply collateral and borrow from Aave.callContract.ts: call an arbitrary contract withcore.call.simulateCompiledSwap.ts: simulate a compiled transaction withsdk.simulate.
The examples repo may pin an older SDK version. These recipes target
@lifi/composer-sdk and @lifi/compose-spec 0.14.0.
