DEV Community

Robert
Robert

Posted on

Minimum Output Checks for Cross-Chain Swaps

Set a minimum output before you approve a cross-chain swap, and choose a threshold you would still accept if the quote worsens while the transaction is waiting. On a centralised exchange, a market order may fill against the live order book; from your wallet, a cross-chain route can take time to confirm and execute across networks. If you are new to that flow, how thor swap handles a first trade is useful when you want a walkthrough of the broader process; here, the focus is what your minimum output protects.

Why can a cross-chain quote go stale?

A quote is an estimate of what a route may return, while the minimum output is the least you agree to receive. Between the estimate and execution, the source-chain transaction must be confirmed, and prices or available liquidity can change. A route may also rely on more than one pool or swap, so a delay at one step can affect the final amount.

For a pool-based swap, the price depends partly on the balance of assets in the pool. A trade changes that balance, and larger trades relative to the pool can have more price impact. Other traders’ activity, market movement, and the route’s available liquidity can all make the eventual output differ from the quote.

What does the minimum output do?

The minimum output sets a floor for the amount you will accept in the destination asset. The route can proceed if it can meet that floor; if it cannot, the swap may fail or the remaining funds may be returned, depending on how the route handles failure. This check limits how far execution can move against you, but it does not make the original quote guaranteed.

Say a route quotes 0.50 ETH and you set a 3% tolerance: the minimum output would be 0.485 ETH. If the route can deliver 0.49 ETH when it executes, it clears your floor; if it can deliver only 0.48 ETH, it should not execute at that amount. The example shows the arithmetic, not a recommended tolerance or a promise about a particular service.

That threshold matters because signing the source-chain transaction starts a process you may not be able to cancel like an unfilled exchange order. Check that the minimum is expressed in the asset you expect to receive, and review whether the quoted output already accounts for route fees. Also leave enough of the source-chain asset to pay the network fee for sending the transaction.

Choose a floor that fits the trade

A tighter minimum suits a trade where receiving less than the quoted amount would make the swap unattractive. It gives the route less room to execute after the market moves, so it may fail more often when confirmation is slow or liquidity is thin. Use it when protecting your price matters more than completing the swap on that attempt.

A wider minimum gives the route more room to complete, but you are agreeing to accept a larger shortfall. It can fit a small, routine conversion where finishing matters more than a small price difference. It is a poor fit when the lower output would leave you short of a target amount, such as funds needed for a planned purchase.

For a large trade, compare the minimum with the amount you need after fees, rather than choosing a wide tolerance simply to avoid a failed swap. A large order can move the price in a shallow pool, so splitting it or choosing a slower, price-focused route may reduce price impact where those options are available. The trade-off is time: the market can still move while a slower route runs.

What should you check before signing?

Decide the lowest destination amount that still makes sense, then compare it with the quote. If the quote is already close to your floor, you have little room for movement; if the floor is far below it, make sure that shortfall is genuinely acceptable. When your task is to move and swap an asset between chains from your own wallet, thorswap.us is one service that can handle that cross-chain route.

THOR swap belongs to this category of wallet-based cross-chain swaps, where a minimum output helps you set a boundary before the route runs. After you submit, monitor the transaction status and use the route’s stated handling for a failed or incomplete swap; a threshold limits the accepted output, but it does not remove network delays or costs already incurred.

Questions readers ask next

Does a minimum output guarantee the quoted amount?

No. It sets the lowest output you are willing to accept, so execution may return more than that floor but need not match the quote exactly. The quote can change as transactions confirm and liquidity shifts. Treat it as a boundary for acceptable execution, not a fixed-price promise.

Can a swap fail because the minimum is too high?

Yes. If the route cannot meet your floor by the time it executes, it may stop or handle the unfilled amount according to its own design. Review the route’s failure and refund information before signing, and remember that source-chain network costs may still apply even if the swap does not complete.

Set the minimum at the lowest destination amount you can accept, then decide whether the trade-off between price protection and completion suits your swap.

Top comments (0)