Fees & trade costs

Budget the cost of receiving a fixed token amount

Compare the cost of acquiring a fixed token quantity using required input, maximum input and separate transaction payments.

When you need a fixed amount of the receiving token, compare how much input each route requires for that quantity. Add separate charges in a common currency. Keep the expected input and maximum authorized input distinct.

Calculate the acquisition budget

Suppose the goal is exactly 100 output tokens. In a hypothetical comparison, Route A quotes 510 stablecoins of input with $0.40 of separate costs. Route B quotes 509.50 with $1.20 of separate costs. Under a one-dollar stablecoin assumption, expected acquisition costs are $510.40 and $510.70. A is cheaper despite requiring more swap input.

Cost per acquired token is therefore $5.104 for A and $5.107 for B. Dividing by the known output quantity makes the comparison easier to reuse in a larger acquisition budget.

Check the spending ceiling

If A authorizes a maximum input of 515 and B authorizes 512, their accepted input bounds differ. The exact-output maximum-input parameter is a transaction constraint. It is not the expected amount spent.

Report expected total cost and the stated upper input budget separately. Network costs may remain variable outside that input constraint, so “maximum total cost” needs additional qualification.

Normalize the requested outcome

Both quotes must deliver the same asset on the same network to the intended recipient. Verify whether the requested amount is what the recipient obtains after any relevant deductions. If a system quotes gross output before a later charge, it may not satisfy the actual requirement.

After completion, replace expected input with the observed input spent and use the received quantity to confirm the target. An unused input allowance is not a trading loss. Nor should it be recorded as spending merely because it appeared in a maximum field. This budget covers acquisition cost; it does not assume every token or execution system supports exact-output trading.

Sources & verification (1)

Source-check date is recorded in the article details. URLs are provided for manual verification. Use Copy to keep this page open.

  1. Understanding Swaps on Uniswap

    Exact-input minimum output, exact-output maximum input, quote-size price impact and swap execution distinctions.

    https://developers.uniswap.org/docs/get-started/concepts/traders/swaps

Continue reading

Measure negative slippage after a completed swap Where did the better-than-quoted output go? Price impact and slippage: a numerical comparison