Start / Overview
How a swap works
What happens to the coins when a user buys BTC with ETH on Base. Every other route reuses this flow. Terms are in the glossary.
Sign the intent EIP-712, scriptHash
Escrow on the settler openNativeBuyIntent
BTC to your address bc1q…, native SegWit
Proof releases escrow verifier on chain
| Step | What happens | Who acts | Time |
|---|---|---|---|
| 1. Quote | GET /quote returns the amount and the steps | your app | under a second |
| 2. Sign | The user signs amount, price, recipient and deadlines | wallet | the user's |
| 3. Escrow | One transaction locks the coins on the settler | wallet | one block |
| 4. Commit | The solver commits and posts a bond, 1% by default | solver | seconds |
| 5. Pay | The solver sends the BTC to the user's address | solver | typically 3 seconds |
| 6. Prove | The solver proves the payment after 1 confirmation | solver | about 10 minutes |
| 7. Release | The settler pays the solver | contract | same transaction as 6 |
The user has the BTC at step 5, and the order reads completed from then on. Steps 6 and 7 are how the solver gets paid.
Who holds the funds
| Moment | The user's coins | The BTC |
|---|---|---|
| Quote, signing | the user's wallet | the solver |
| Escrow open, committed | the settler | the solver |
| BTC paid | the settler | the user |
| Proof accepted | the solver | the user |
| Solver never commits | back to the user after 2 hours | never sent |
| Solver commits, never pays | back to the user with the bond, after 144 blocks | never sent |
No Maxy server can move the escrow or mark a payment as made. The security page lists every exit an escrow has.