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

# Multi-Leg Swaps

> 1-to-many and many-to-1 — including cross-chain.

<Snippet file="coming-soon.mdx" />

## What it is

Fuse extends beyond one-source / one-destination flows. Multi-leg modes:

| Mode                     | Source    | Destination             | Example                                             |
| ------------------------ | --------- | ----------------------- | --------------------------------------------------- |
| **1-to-many**            | 1 token   | N tokens                | Swap USDC into a 60/30/10 ETH/BTC/SOL basket        |
| **many-to-1**            | N tokens  | 1 token                 | Consolidate dust + small balances into USDC         |
| **Cross-chain swap+zap** | Any chain | Any chain (with action) | Bridge USDC → swap on destination → deposit into LP |

## Why this is different from a bundle

A current bundle is a **sequence** — A then B then C. Multi-leg is a **fan-out / fan-in**:

* **Fan-out (1-to-N)** — one input, many outputs in parallel.
* **Fan-in (N-to-1)** — many inputs, one output, atomic.

The atomic guarantee means partial fills never happen — you get every leg or none.

## Use cases

<CardGroup cols={2}>
  <Card title="Index entry" icon="chart-pie">
    Buy a basket index (top-10 alts, stablecoin yield mix, etc.) without N transactions.
  </Card>

  <Card title="Dust collection" icon="broom">
    Sweep dozens of small balances into a single token in one click.
  </Card>

  <Card title="Cross-chain settlement" icon="bridge">
    Send a payment denominated in token X on chain A; recipient receives token Y on chain B.
  </Card>

  <Card title="Single-asset to portfolio" icon="layer-group">
    User holds one asset; one signature spreads it across a target allocation.
  </Card>
</CardGroup>

## API surface (planned)

```ts theme={null}
const intent = await dzap.getMultiLegQuote({
  account: '0xUser',
  mode: '1-to-many',
  input: { chainId: 42161, token: '0xUSDC', amount: '1000000000' },
  outputs: [
    { chainId: 8453, token: '0xWETH', share: 0.6 },
    { chainId: 8453, token: '0xWBTC', share: 0.3 },
    { chainId: 8453, token: '0xUSDC', share: 0.1 },
  ],
  slippage: 1,
});
```

Track release in the [changelog](/resources/changelog).
