Estimate Omnichain Swap Costs Before You Sign
An omnichain swap quote combines source-chain execution, bridge or solver pricing, destination delivery and slippage limits; check each cost component before signing.
The Blockchain Brief Desk5 min read
Estimate an omnichain swap by separating the source-chain transaction, cross-chain transfer, destination swap and slippage allowance before you sign. A wallet’s headline output is a route estimate, not a single fee: it can combine gas paid on the source chain with protocol or solver charges deducted from the transferred amount. Compare the expected destination amount and its minimum alongside those costs. For the wallet flow itself, see how an omnichain wallet swap works. The cost check starts with identifying which transactions the quoted route actually includes.
What costs make up an omnichain swap quote?
An omnichain swap may execute a token swap on the source chain, transfer value across chains, then swap again on the destination. Each step can affect the amount received, but the costs are paid or deducted in different ways.
- Source-chain gas: The wallet pays the network to execute the transaction that starts the route. If the token needs an approval transaction first, that may require a separate transaction and gas. Some quote APIs include estimated origin gas in their fee total; inspect the response rather than adding it twice.
- Bridge or solver pricing: A bridge may charge a protocol fee, while a liquidity provider or solver may price delivery through a difference between the amount deposited and the amount delivered. These charges can depend on the route, token, amount, liquidity and gas on the destination chain.
- Swap execution: A source or destination decentralized exchange may charge a pool fee through its pricing. That cost is reflected in the exchange rate and output, not necessarily listed as a separate wallet fee. A route that swaps on both chains has two market executions to account for.
- Slippage: Slippage is the difference between a quoted output and the output at execution. A minimum output protects against excessive movement by setting a floor; it is not a fee and does not guarantee the quoted amount.
Do not sum every displayed percentage blindly. Some interfaces show fees as a token deduction, some show gas in the chain’s native asset, and some show an estimated output after costs. Check each value’s denomination and whether it is already included in the quoted receive amount.
How do you compare the expected output with the minimum?
Compare the route’s expected destination amount with its minimum destination amount, then check how the route derives each figure. In a quote response, fields such as `toAmount` and `toAmountMin` can distinguish the estimate from the minimum after slippage. The expected amount is a forecast; the minimum is the execution bound encoded for the swap leg or route.
That bound may not cover every failure mode. A destination swap can revert if its minimum is no longer attainable, even after the source transaction succeeds. A bridge delivery can also take longer than estimated, leaving the destination swap exposed to a changed market price. Read whether the route’s minimum applies to the final output token or only to an intermediate token. An intermediate floor does not establish what the wallet will receive after a later swap.
For a concrete API example, Across’s Swap API returns executable transaction data with a fee breakdown, including fields such as `fees.total`, `fees.totalMax` and `originGas`. The field names and fee coverage are specific to that API. Other aggregators and bridges use different response schemas, so identify what a quote includes before comparing routes.
When should you refresh a quote?
Refresh the quote immediately before signing because route prices, gas estimates and fee inputs can change between quote and execution. A quote expiry timestamp marks a validity boundary where provided; after expiry, fetch a new quote instead of treating the old output or calldata as current.
Check the selected chains and token contract addresses as well as the token symbols. The same symbol can refer to different contracts on different chains, and token decimals determine how an amount is represented in raw units. A mismatch can make a route unavailable or produce an unintended amount. Also verify that the recipient is the intended destination address and that the wallet holds the source token and any native asset needed to submit the source transaction.
For two routes, compare the same input amount, source and destination tokens, recipient, and slippage setting. Then compare expected output, minimum output, total fees, gas asset requirements, and any separate approval transaction. A route with a smaller displayed bridge fee can still deliver less if its swap price is worse. A route with a higher expected output can also have a lower minimum if it permits more slippage.
The useful pre-signing figure is therefore not the smallest fee label. It is the minimum destination amount you are willing to accept, checked against the route’s stated fees and the assets the wallet must spend to start it. If that minimum is unattractive, change the route or wait for a fresh quote; signing does not turn an estimate into a guaranteed final amount.