> ## Documentation Index
> Fetch the complete documentation index at: https://docs.li.fi/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Canonical Composer Flows you can copy, plus a pointer to the SDK examples for everything else.

These recipes are a sample of common Composer flows, drawn from the tested examples in the [`composer-sdk-examples`](https://github.com/lifinance/composer-sdk-examples/tree/main/examples) repo. Each page shows the full SDK code and the resulting Flow shape.

<CardGroup cols={2}>
  <Card title="Dust Sweep" href="/composer/composer-api/recipes/dust-sweep">
    Intentionally leave part of an input unused; `sweepTo` recovers the dust back to the sender. Wallet-cleanup pattern.
  </Card>

  <Card title="Swap and Deposit" href="/composer/composer-api/recipes/swap-and-zap">
    Swap an input token to a vault asset, then zap the result into the vault. The canonical chained-deposit shape; powers LI.FI Earn.
  </Card>

  <Card title="Split Deposits" href="/composer/composer-api/recipes/split-and-zap">
    Split a single input across multiple vaults in one signed transaction. Multi-strategy yield without per-step capital lockup.
  </Card>

  <Card title="Debt Migration" href="/composer/composer-api/recipes/debt-migration">
    Move a borrow position between protocols (Aave → Morpho) atomically using two concurrent flash loans. Advanced flash-loan pattern.
  </Card>
</CardGroup>

## 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`](https://github.com/lifinance/composer-sdk-examples/tree/main/examples) repo.

<Warning>
  **Unaudited preview — not for production funds.** Morpho Blue borrow/repay and flash-loan flows are available in the [ETHGlobal preview](/composer/composer-api/reference/addresses#ethglobal-hackathon) only. Those contracts are **unaudited** and not deployed to production — use these examples for experimentation only, not with significant value.
</Warning>
