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

# Swap

> Trade any asset to any asset at the best price.

A swap on Mayan exchanges one token for another, on the same chain or across two. The user signs once and the output arrives instantly.

Over **\$20B** has moved through Mayan, across **9M+ swaps** and **3M+ users**.

## How it works

1. **Quote.** You request a route for a pair and an amount. Mayan returns the routes available, each with an expected output, a minimum output, an ETA, and the transfer method it uses.
2. **Sign.** The user signs one transaction on the source chain. `minAmountOut` is part of what they sign, so the order cannot fill below it.
3. **Fill.** Drivers compete to fill the order with their own capital, and the best offer wins.
4. **Settle.** The winning driver pays the user, then reclaims the source funds afterwards.

```typescript theme={null}
const quotes = await fetchQuote({
  amountIn64: "100000000",   // 100 USDC
  fromChain: "arbitrum",
  fromToken: USDC_ARBITRUM,
  toChain: "solana",
  toToken: SOL,              // native SOL
  slippageBps: "auto",
});
```

## Instant settlement

The driver pays the user from capital they already hold on the destination chain, so nobody waits for the source chain to finalize first. Verification and reimbursement happen after the user already has their funds. See [intents](/how-mayan-works/intent-based-swaps) for how an order reaches a driver in the first place.

## Token coverage

Any token with a contract address is tradable. There is no whitelist and no listing process, so a long-tail asset routes the same way a major does, and adding an asset is never an integration change.

## Transfer methods and size

A swap can execute over any of three transfer methods. `fetchQuote` returns the routes available for the pair, each tagged with its method, and you choose which one to execute.

Swift carries single swaps up to around \$1M, depending on the chain. MCTP and Fast MCTP carry up to around \$10M.

## Where it fits

* A wallet adds in-app trading without building routing or maintaining a token list.
* An aggregator widens asset coverage without adding integrations one chain at a time.
* A trading app makes every market reachable from one interface.

## Case studies

* [**Avail Nexus**](https://mayan.finance/blog/mayan-unlocks-high-value-cross-chain-transfers-in-avail) routes high-value cross-chain transfers up to \$10M per transaction with Mayan.
* [**SwapKit**](https://mayan.finance/blog/mayan-unlocks-instant-cross-chain-swaps-on-swapkit) unlocked instant cross-chain swaps across its routing with Mayan.

## Next steps

<CardGroup cols={3}>
  <Card title="Quickstart" icon="rocket" href="/get-started/quickstart">
    Quote, sign and execute a first cross-chain swap.
  </Card>

  <Card title="Swift" icon="bolt" href="/architecture/swift">
    The route behind settlement in seconds.
  </Card>

  <Card title="Mayan app" icon="arrow-up-right-from-square" href="https://swap.mayan.finance">
    Try a swap yourself.
  </Card>
</CardGroup>
