Overview
With a gasless swap, the user never broadcasts a deposit transaction and never needs the network’s native token for gas. Instead they sign a single off-chain message (an EIP-712 typed-data payload), and Layerswap’s paymaster broadcasts the on-chain deposit on their behalf and pays the gas. From the deposit onward the swap follows the normal swap lifecycle. This is ideal when the user holds only the token they want to swap (e.g. USDC) and no native gas token, or when you want to remove the “top up for gas first” step from your flow entirely.Gasless is a funding method, alongside the Depository, a generated
deposit address, and a direct transfer. You opt into it per swap with
use_gasless: true — and, so the
quote reflects it, on the quote and limit endpoints as well (see Request a gasless quote).Supported gasless route types
Whether a token can be deposited gaslessly depends on the signature standard its contract implements. Layerswap auto-detects this per token and picks one:You do not need to know which standard a token uses. The gasless deposit action returns a ready-to-sign
typed_data payload with the correct EIP-712 domain, types, and message for that token — you sign it as-is.
Nonces and expiries are handled by Layerswap.Which tokens are gasless
A token is gasless-capable when itssupports_gasless_deposit flag is true in the quote /
networks responses, and the network has a paymaster + Depository
deployed. Gasless is EVM-only today. Always read supports_gasless_deposit at runtime rather than
hard-coding a token list — the set grows over time.
Request a gasless quote
Gasless isn’t free to the sender: Layerswap fronts the source-chain gas and recovers it as a fee folded into the quote’sblockchain_fee / total_fee (and therefore deducted from receive_amount). Because of
that, you must pass use_gasless=true on the quote and limit endpoints — otherwise you’ll get a
non-gasless quote whose receive_amount is too high for a swap you intend to complete gaslessly.
use_gasless is supported on:
GET /api/v2/quoteGET /api/v2/detailed_quoteGET /api/v2/limits
blockchain_fee (and correspondingly smaller receive_amount) — the
difference is the paymaster’s deposit gas. See Fees for how fees are composed.
Integration flow
1
Create the swap with use_gasless
Pass
use_gasless: true in the create request. The swap is priced with the gasless fee and marked as
a gasless deposit.2
Fetch the deposit actions with the signer address
Call
GET /api/v2/swaps/{swapId}/deposit_actions?source_address=<signer>. For a gasless swap this
returns a sign action containing the typed_data to sign. The source_address is required — it’s
the wallet that holds the funds and will sign (it is not stored at create time).3
Sign the typed data
Have the wallet sign the returned
typed_data with eth_signTypedData_v4.4
Submit the signature
POST /api/v2/swaps/{swapId}/authorize with the signature and signer_address. Layerswap verifies
the signature, then the paymaster broadcasts the deposit and pays the gas.5
Track status (optional)
Poll
GET /api/v2/swaps/{swapId}/authorize for the authorization status and, once published, the
on-chain transaction. The swap itself then progresses through the normal lifecycle.1. Create the swap
use_depository — gasless settles through the Depository automatically. Do not combine use_gasless
with use_deposit_address.
2. Fetch the deposit actions
type is sign:
For an ERC-2612 token the
typed_data primaryType is Permit with a Permit type block instead of
ReceiveWithAuthorization — but you handle both the same way: pass typed_data straight to
eth_signTypedData_v4.3. Sign and submit
4. Track the authorization
GET /api/v2/swaps/{swapId}/authorize returns:
Important nuances
- Indicate gasless on the quote and limit endpoints.
use_gasless=trueon/quote,/detailed_quote, and/limitsmakes them include the gasless fee. Omitting it yields a non-gasless quote with an inflatedreceive_amount. source_addressis required when fetching deposit actions for a gasless swap — it’s the signer, and it isn’t persisted at create time.- The signature standard is transparent. Sign the returned
typed_data; you never choose or construct EIP-3009 vs ERC-2612 yourself, and you don’t manage nonces. - Authorizations expire (a fixed validity window, ~30 minutes). If a swap sits unsigned past the window, re-fetch the deposit actions to get a fresh payload and sign again.
- One authorization per swap. A submitted signature is single-use per swap; it can be refreshed only after it expires.
- Balance is checked at authorize time and again before broadcast. If the signer can no longer cover
the amount the authorization is marked
Insufficientand nothing is broadcast. - Wallet support. EOA (ECDSA) signers are supported everywhere. Smart-contract / account-abstraction wallets are verified via EIP-1271 and work on EIP-3009 tokens whose contract supports contract-signature validation; ERC-2612 is EOA-only. If a wallet can’t sign gaslessly for a given token, fall back to a normal (non-gasless) deposit.
Common errors
Related
- Depository — the settlement contract gasless deposits flow through
- Fees — how the gasless fee fits into the quote
- Get deposit actions — full response schema
- Swap lifecycle — what happens after the deposit