Skip to main content

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

Step 1: request a gasless quote

Add permit2_owner to the standard quote request:
The response includes quote_id, the permit2 typed data, issues, and the tx Rialto will submit after receiving the signature.

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

Auth: requires an API key with swap access.
Example response:

Step 4: poll relay status

Auth: requires an API key with swap access.

Python example

This example requests a gasless quote, signs Permit2, submits the signature, and polls until the relay reaches a terminal state.
A full runnable Python example for the gasless flow is in the API repo: https://github.com/rialto-plds/rialto-api-docs/blob/main/RIALTO_SWAP_API.md