Skip to main content
Settlement can only pull the tokens you have allowed it to, through the ordinary ERC-20 allowance: approve() on the token, granting a named spender the right to move up to a chosen amount. The RFQ and Router APIs share one escrow, so the flow is identical.

Finding the Right Spender

Run preflight on your selected quote; nextActions include any approval step with the exact spender and amount.
Approval addresses are not constants. They shift with chain and lock type; preflight is the only authority. Some tokens need none: USDC-style tokens settle via EIP-3009 transferWithAuthorization, authorized inside your signature.

Reading Current Allowance

If the existing allowance already covers the trade, an extra approval is wasted gas.

Granting Allowance

Two strategies: a maximum grant (2^256 - 1) per token, once, which solvers and aggregators default to; or a per-trade grant of exactly what each trade needs, tighter but paying approval gas every time.

Wiring It into the Trade Flow

Run preflight and execute any approval action before signing. Approval actions are ready-to-broadcast transactions, type: "evmTransaction" with purpose: "tokenApproval" and the calldata in tx:

Funding Locks Beyond approve()

Preflight selects the lock for your corridor and token: Permit2 (one approval of the Permit2 contract per token, then each pull is authorized by an EIP-712 signature), EIP-3009, or a resource lock. It is not a per-request choice. Details under Settlement & Smart Contracts.