Skip to main content
These recipes are a sample of common Composer flows, drawn from the tested examples in the composer-sdk-examples repo. Each page shows the full SDK code and the resulting Flow shape.

Dust Sweep

Intentionally leave part of an input unused; sweepTo recovers the dust back to the sender. Wallet-cleanup pattern.

Swap and Deposit

Swap an input token to a vault asset, then zap the result into the vault. The canonical chained-deposit shape; powers LI.FI Earn.

Split Deposits

Split a single input across multiple vaults in one signed transaction. Multi-strategy yield without per-step capital lockup.

Debt Migration

Move a borrow position between protocols (Aave → Morpho) atomically using two concurrent flash loans. Advanced flash-loan pattern.

More patterns in the SDK

The SDK ships 30+ worked examples covering everything from a minimal lifi.swap to advanced multi-step flows: cross-token consolidation, recipient-side delivery, split verification with arithmetic and assertion ops (core.add, core.subtract, core.assertEqual, …), allow-revert simulation, balance-precondition checks, raw core.call into arbitrary contracts, full Aave and Morpho Blue lending lifecycles (supply, borrow, repay, claim rewards), and flash-loan debt migrations. Browse them in the composer-sdk-examples repo.
Unaudited preview — not for production funds. Morpho Blue borrow/repay and flash-loan flows are available in the ETHGlobal preview only. Those contracts are unaudited and not deployed to production — use these examples for experimentation only, not with significant value.