Skip to main content

The flow

1

Check the allowance (ERC-20 input only)

The signing wallet must allow the executor 0x27F38C4fd323D635d0E15054a6cfbdFc9D076F25 to spend at least amountIn of the input token. Approve first if it does not.
2

Request the quote with a transaction

Call GET /quote with recipient. Do this after any approval so the quote is fresh.
3

Show the user the terms

Display swap.netOut as the expected output and swap.minOut as the minimum received.
4

Sign and send tx

Send to, data and value exactly as returned, on chain 4663.
5

Wait for the receipt

A successful swap emits Settled from the executor. A reverted swap moves no tokens.

Who pays and who receives

  • The wallet that sends tx pays the input. The executor only pulls tokens from the sender.
  • recipient receives the output. It can be the sender or any other address, but not the zero address.

Native ETH

Use 0x0000000000000000000000000000000000000000 for ETH.
  • ETH input: no approval. tx.value equals amountIn; send it as returned.
  • ETH output: the recipient receives native ETH, not WETH.
Inside swaps, legs that trade through WETH show the WETH address 0x0bd7d308f8e1639fab988df18a8011f41eacad73. That is expected.

Approvals

Approve the executor for the exact amountIn, or a larger amount if your product supports standing approvals. The executor uses only the amount in the order and clears any approvals it grants to pools during the swap. swap.spender and tx.to are always the executor address. If either is ever different from the published address, do not sign.

Slippage, minimum and deadline

The quote is exact at block. Prices move, so a swap sent later may get less than netOut, but never less than minOut.

Freshness

Quotes do not have an ID or a server-side expiry. The transaction carries its own deadline and minOut. For the best price, request a new quote right before the user signs, and again if they wait more than a few seconds. Requests are fast, typically well under a second.

When a swap reverts

The executor reverts with one of these errors. Nothing is transferred.

Gas

gas is the router’s estimate for the swaps. swap.executorGas is the gas measured when the transaction was run through the executor at the quote block. Use eth_estimateGas from the signing wallet when you can, or executorGas plus a margin.