Flytrade gasless swaps

Updated

Fly's documented app gasless mode lets the selected token cover the gas charge. The same-chain EVM API follows a different rule: the EVM Swap Integration Guide requires gasless=false and states that gasless=true causes the quote to fail.

App Gas Payments

When the app's documented gasless mode is enabled, Fly executes the transaction on the user's behalf and charges the gas expense in the selected token. With the feature off, gas comes from the network's native token. Both modes have a gas cost; the setting changes the payment asset.

The On-Chain Swap guide identifies the leaf icon as the selected-token gas option and the gas-tank icon as native-token payment. These controls describe the app's documented on-chain interface.


Same-Chain EVM API Restrictions

Fly's EVM Swap Integration Guide covers swaps within one EVM network. Its gasless=false requirement applies to both /aggregator/quote and the combined /aggregator/quote/transaction endpoint. The guide's standard flow returns a transaction payload for the wallet to sign and send to the network.


Token Approval and Gas Estimation

For an ERC-20 swap, the router needs sufficient token allowance. The separate /aggregator/transaction endpoint uses estimateGas=true by default. In that mode, the necessary token approval and sufficient token balance must already be in place; otherwise, the endpoint fails to generate the transaction.

The combined quote-and-transaction endpoint does not estimate gas. For contract integrations, the guide instructs developers to set estimateGas=false when obtaining transaction data and to approve the router before swapping ERC-20 tokens. Disabling estimation leaves the swap's gas and authorization requirements in place.

Quote Validity

In the separate quote-and-payload EVM flow, a quote expires after five minutes. Its ID can be used to fetch the transaction payload only once, and a successful payload request consumes it. An expired or consumed quote requires a fresh quote before another payload request. The five-minute window governs payload retrieval; blockchain confirmation is a separate stage.

Visual outline: Flytrade gasless swaps - Quote Validity

View image file


Gas Payment Checklist

  • If the app offers the documented gasless option, check the selected token used for the gas charge.
  • If gasless is off in the app, retain enough of the network's native token for gas.
  • For same-chain EVM API calls, use gasless=false . Before requesting a payload with estimateGas=true , satisfy the token-balance requirement and any ERC-20 router-approval requirement.