Skip to main content
A user who wants to move USDC off Ethereum needs ETH to do it. A user bridging into a new ecosystem often holds the asset they want to move and nothing else. In both cases the swap is blocked by a token the user does not care about and did not plan to acquire. Gasless execution removes that requirement. Instead of sending a transaction, the user signs a message, and a Mayan relayer submits the transaction on their behalf. It covers swaps as well as withdrawals, on the routes that support it.

How it works

1

Request a gasless quote

Pass gasless: true on the quote request. The quoter returns only routes that can be executed this way.
2

Check the response

Eligible quotes come back with gasless set. Surface it before the user commits, because what they are about to approve is a signature rather than a transaction.
3

The user signs a message

No native token is spent and nothing is broadcast from their wallet.
4

A relayer submits it

Mayan’s relayer puts the order onchain. From here the swap proceeds exactly like any other.
5

Track it by order hash

Because no transaction was sent from the user’s wallet, there is no source transaction hash. swapFromEvm returns an order hash string instead, which the Explorer API accepts in its place.

Key concepts

  • A signature, not a transaction. The user signs, and a Mayan relayer submits the transaction and pays the gas.
  • The return value changes. On a normal quote swapFromEvm returns a transaction. On a gasless quote it returns an order hash string. Code that assumes a transaction object will break, so branch on quote.gasless.
  • Not every route supports it. Requesting gasless: true narrows the routes the quoter will return. If nothing comes back for a pair, that pair cannot be executed gaslessly.
  • Refunds go back to the signer. A gasless Swift order requires the refund address to match the wallet that signed. swiftRefundAddress is rejected on a gasless quote, so request gasless: false if you need a refund to land somewhere else. See executing swaps.

Requesting it

See the Quote API for the full parameter list.

Tracking a gasless swap

The status values and their meanings are the same as any other swap. See track transactions.

Where it is used

First-time users. Someone arriving in an ecosystem for the first time holds one asset and no gas. Gasless removes the step where they have to go acquire the native token before they can do anything. Withdrawals. A user leaving an app should not need to top up gas on the chain they are leaving in order to leave it. Consumer flows. Any interface where you would rather not explain gas at all.

Next steps

Executing Swaps

The swap call on EVM, Solana and Sui.

Track Transactions

Follow a swap, or a gasless order, to a terminal status.

Quote API

Every quote parameter, including gasless.