Skip to main content
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 EthereumList and match on Ethereum, pay on the destination, collect on Ethereum

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 cardPosting an offer from the swap card

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 matchRequests waiting for the maker to match

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 passesThe matched filler pays once every check passes

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. Credits are withdrawn with withdraw, to any address. Nothing is pushed to anyone during settlement.
A settled order: every step completeA settled order: every step complete
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.