> ## Documentation Index
> Fetch the complete documentation index at: https://docs.route.fun/llms.txt
> Use this file to discover all available pages before exploring further.

# Gasless swaps

> The user signs, Route's relayer sends the swap and is repaid in the input token. The user needs no ETH.

Robinhood Chain, switched on per partner key. For Solana see [Solana gasless swaps](https://docs.route.fun/solana/gasless.md).

The relayer's gas fee is taken from the input before the swap and shown up front. Input must be an ERC-20 (use WETH for ETH).
Gasless swaps cannot be combined with streams, vault zaps or `permit2`.

**1. Quote**

`GET /quote` with `gasless=1` and `owner=<the signing wallet>` (`recipient` defaults to the owner; the deadline to 2 minutes).
The response has no `tx`. It has `gasless` and `swap` instead.

**2. Approve Permit2 if needed**

`gasless.approval` says what the token needs: `{ "ok": true }` (nothing), `{ "erc2612": <typed data> }` (sign this permit too,
no transaction), or `{ "needsApproval": true }` (one approval of the [Permit2 contract](https://docs.route.fun/contracts.md) for the token).

**3. Sign**

The owner signs `gasless.typedData` (a Permit2 transfer with the order as witness).

**4. Submit**

[`POST /gasless/submit`](https://docs.route.fun/api-reference/gasless-submit) within `gasless.validForS` seconds (120) with the order, nonce,
signature and ticket. Returns the transaction `hash`; track it with [`GET /status`](https://docs.route.fun/api-reference/status) if your key has
submit and track.

```json POST /gasless/submit theme={null}
{
  "order": { "...": "gasless.order, as returned" },
  "nonce": "<gasless.nonce>",
  "signature": "0x<65-byte signature of gasless.typedData>",
  "ticket": "<gasless.ticket>",
  "erc2612": { "signature": "0x...", "value": "<message.value>", "deadline": "<message.deadline>" }
}
```

`erc2612` only when `gasless.approval` asked for it.

## The fee and the checks

* `gasless.fee` is the relayer's fee in input-token units; the swap is quoted for `amount - fee`. It is `0` when Route sponsors
  gas for your key.
* A trade worth less than about 20 gas fees is refused (`Amount too small for a gasless swap`).
* At submit, Route quotes again. If no route clears the signed minimum or the price moved against the user by more than 0.25%
  since the quote, it refuses with `422` and `requote: true`. If the signed fee no longer covers gas, `400 Signed fee no longer
  covers the gas: quote again`. Either way, quote again and sign again.
* Each signed order can be sent once.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.