Overview
The gasless flow lets the taker sign Permit2 while Rialto submits the onchain swap transaction. The taker still authorizes the exact swap with a Permit2 witness signature, but the relayer wallet pays the network gas.Constraints
| Constraint | Behavior |
|---|---|
| Settlement | Requires settlement: permit2 and a returned permit2 payload. |
| Token type | ERC20 sells only. Native ETH sells require the taker-submitted flow. |
| Permit owner | Pass permit2_owner=taker on the quote. For gasless, permit2_owner must equal taker. |
| Recipient | The quote controls the recipient through the Permit2 witness. Do not edit it. |
| Allowance | The taker must still approve Permit2 if issues.allowance is non-null. |
| Balance | Do not submit if issues.balance is non-null. |
Step 1: request a gasless quote
Add permit2_owner to the standard quote request:Step 2: approval and signature
If issues.allowance is non-null, the taker approves issues.allowance.spender for at least the raw sell_amount. For gasless Permit2 quotes the spender is the Permit2 contract. Then have the taker sign the permit2 typed data exactly as returned.Step 3: submit to the relayer
| Field | Description |
|---|---|
| quote_id | UUID returned by the quote. The quote must have been requested with permit2_owner. |
| signature | 0x-prefixed 65-byte Permit2 signature over the typed data returned by the quote. |
| idempotency_key | Optional client-generated unique string for one relay attempt, such as your internal order id or a UUID. Reuse the same value only when retrying the same quote submission; do not reuse it across different quotes or users. |
Step 4: poll relay status
| Status | Meaning |
|---|---|
| accepted | Request accepted and queued. |
| submitted | Relayer broadcasted the transaction. |
| confirmed | Transaction mined successfully. |
| failed | Transaction was submitted but failed or could not be confirmed. |
| expired | Request expired before successful relay. |
| rejected | Request failed validation before relay. |
