Skip to the article
Top Crypto

Crypto markets, protocols, policy

How to compare DEX swap quotes before trading

Set the same input amount, network and output token before reading two DEX swap quotes, because different trades cannot be ranked by the amount received…

The Top Crypto Editors 5 min read

How to compare DEX swap quotes before trading

Set the same input amount, network and output token before reading two DEX swap quotes, because different trades cannot be ranked by the amount received. For equivalent exact-input quotes, record expected output, minimum received and costs paid separately; convert those costs to the output token; calculate both expected and minimum net proceeds; then refresh the preferred quote. The comparison is ready for a trading decision when expected proceeds and the execution floor have separate labels. After a trade, replace the estimates with the confirmed output and actual costs.

What must match before you compare quotes?

Two quotes are comparable when they swap the same quantity of the same input token for the same output token on the same network. Start with one WETH amount going to USDC on Ethereum. Verify both token contract addresses as well as their symbols, and collect the quotes within seconds of each other. Pool prices and network fees can move while an older quote sits on screen.

An exact-input swap fixes the quantity of WETH you send and quotes the USDC you may receive. Have both quote screens, your wallet’s gas estimates and one ETH-to-USDC conversion reference ready. Read that reference live when you compare the quotes; it puts gas paid in ETH into the same units as USDC received. A token approval may require its own transaction, so include its estimated gas when one route needs approval and the other does not.

Separate costs by where they are paid. A pool fee reflected in the quoted USDC output has already reduced that number. Ethereum gas leaves your wallet separately in ETH. Mark each displayed fee as included or separate before doing arithmetic, so the same deduction enters the comparison once.

How can expected and minimum proceeds change the choice?

Expected net proceeds can favor one quote while its minimum net estimate favors another, because expected output and the accepted output floor answer different questions. Work through the two quotes below as hypothetical figures, with all costs already converted to USDC. They are arithmetic for one trade size, not live prices.

  1. Record both quotes. Quote A shows 102 USDC expected and 98 USDC minimum. Quote B shows 101 USDC expected and 100 USDC minimum. Write each minimum beside its expected output, rather than treating it as another forecast. In a Uniswap V3 exact-input swap, the router parameter amountOutMinimum sets the least output the transaction will accept. The result of this step is two rows with the same WETH input and two clearly different USDC figures per row.
  2. Normalize the separate costs. Assume A needs 1 USDC worth of gas and other separately payable costs, while B needs 0.5 USDC worth. Those figures are estimates based on the same ETH-to-USDC reference. Assume any pool deductions are already inside the displayed outputs. The rows now use USDC for both the received amount and the separate cost, so subtraction is meaningful.
  3. Calculate two rankings. Subtract separate cost from expected output: A offers 101 USDC expected net proceeds; B offers 100.5. Subtract the same estimated cost from each minimum: A has 97 USDC minimum net on that cost estimate; B has 99.5. A leads by 0.5 on expected proceeds, yet B leads by 2.5 on minimum net proceeds. I would choose B for a trade that needs at least 99 USDC after estimated costs, because A’s minimum calculation falls short. The router enforces the token output minimum, not the gas-adjusted figure; a change in gas changes the latter.
  4. Refresh the preferred quote. Open its current swap review and read the expected output, minimum received, route and wallet gas estimate again just before signing. Check the network, token addresses and WETH input against your original row. Convert the new gas estimate with a current ETH-to-USDC reference and redo both subtractions. If the refreshed minimum is below the amount you require, reconsider the trade before signing. The visible result is a current comparison, with a floor you have actually reviewed.
  5. Reconcile the executed trade. After confirmation, read the USDC received in the transaction record and the ETH gas actually charged in the receipt. Convert that gas using an ETH-to-USDC reference from execution time, then subtract it and any other separate charge from the confirmed USDC output. Label the three figures separately: expected net proceeds from the refreshed quote, its minimum USDC output as the execution floor, and actual net proceeds from the receipt. The task is done when those labels reflect what was quoted, accepted and paid.

The fee display can be the snag when you repeat this calculation in another interface. On a verified SpookySwap deployment, open spookyswap fees to identify the pool fee, then read the swap quote to see whether that deduction is already reflected in its output amount.

How do other swap quote comparisons change?

How to compare exact-output swap quotes?

Exact-output quotes fix the USDC amount you want to receive, so compare the WETH input each route requires plus costs paid separately. Review the maximum input the transaction permits as a separate limit. A smaller quoted input is useful only while the output amount and network remain the same.

How to compare swaps across chains?

Cross-chain comparisons must include transfer costs and the token amount delivered on the destination chain. Check the destination token contract and any additional transaction needed to make those tokens available. An amount shown before a transfer is not yet the amount ready to use at the destination.

Does a reverted swap cost gas?

An included transaction that reverts still consumes gas, even though the swap delivers no USDC. Its transaction receipt shows the gas used and the effective gas price, which determine the cost of that failed attempt.