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

# How Ambi works

> List, match, pay, collect: the four steps of every Ambi trade, and what crosses chains.

Every Ambi trade has two sides on two chains. The maker's asset sits in escrow on Ethereum. The filler's payment moves natively on the destination chain. A **statement** ties the two together, and a **verifier** on Ethereum decides the result.

![List and match on Ethereum, pay on the destination, collect on Ethereum](https://mintcdn.com/ambi/8mjfh67uXoNKAf5Q/images/art/flow-light.webp?fit=max\&auto=format\&n=8mjfh67uXoNKAf5Q\&q=85\&s=5243a230e01a955fe8f130a776a489e5)

## 1. List

The maker calls `list` and deposits the full amount, in ETH or any ERC-20. The request names the destination chain, the asset, the amount, the recipient, the deadline (`payBy`) and the verifier that will judge the outcome. The maker also sets the bond a filler must post.

The market rejects the listing unless the verifier is approved in the registry and its code is unchanged, the verifier accepts the exact terms, and at least 30 minutes remain before `payBy`.

![Posting an offer from the swap card](https://mintcdn.com/ambi/YFcg3UdfEoAyYkl8/images/app/swap-offer-light.webp?fit=max\&auto=format\&n=YFcg3UdfEoAyYkl8\&q=85\&s=4e6196dd8535121d09cb95785c1abfb2)

## 2. Match

Fillers call `requestFill` with the bond. The maker picks one with `matchOffer`, and every other bond goes back to its owner. The market now fixes the **statement**, a hash over the domain, origin chain, market, order, maker, escrow, full request and matched filler. The destination router computes the same hash from the same inputs.

![Requests waiting for the maker to match](https://mintcdn.com/ambi/YFcg3UdfEoAyYkl8/images/app/panel-maker-light.webp?fit=max\&auto=format\&n=YFcg3UdfEoAyYkl8\&q=85\&s=5c347ed73d1ae98a014a8568dc8e81d2)

## 3. Pay, or expire

Before `payBy`, the matched filler pays through the router. The router checks the sender, asset, amount and recipient, moves the funds, and records **Paid** in the same transaction. From `payBy` onward, anyone can record **ExpiredUnpaid** instead. A statement can only ever have one outcome, and the destination chain's clock decides which.

![The matched filler pays once every check passes](https://mintcdn.com/ambi/YFcg3UdfEoAyYkl8/images/app/panel-checklist-light.webp?fit=max\&auto=format\&n=YFcg3UdfEoAyYkl8\&q=85\&s=dd1ec74a2300eaf29fdc44b8bb5ccda6)

## 4. Collect

A relayer claims the outcome on the Ethereum inbox with a small bond. If nobody disputes it within 30 minutes, anyone can settle the order. The router also sends the outcome over the chain's own bridge, which decides any disputed claim.

| Outcome | Ethereum call | Credited |
| - | - | - |
| Paid | `fulfill` | Filler: escrow minus 0.30% (and any integrator fee), plus their bond. Fee recipient: the 0.30%. |
| ExpiredUnpaid | `refundExpired` | Maker: the escrow plus the filler's bond. |

Credits are withdrawn with `withdraw`, to any address. Nothing is pushed to anyone during settlement.

![A settled order: every step complete](https://mintcdn.com/ambi/YFcg3UdfEoAyYkl8/images/app/progress-released-light.webp?fit=max\&auto=format\&n=YFcg3UdfEoAyYkl8\&q=85\&s=2498db9626037f1d565d834ea9923def)

> [!NOTE]
>
> A disputed claim waits for the rollup's bridge, about 7 days, and the bridge decides who was right. A recorded outcome never expires. See [Settlement](https://docs.ambichain.org/concepts/settlement.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.