Fees & trade costs

Include approval costs in a first-swap comparison

Include only the approval transactions needed for a current swap and distinguish paid setup from signing an authorization message.

Include an approval cost when completing the proposed swap requires a new paid approval transaction. If the required allowance already exists and remains usable, there may be no new approval cost for that route. The relevant question is the wallet's present state, not whether the website generally supports approvals.

Compare the actual first transaction

Suppose Route A delivers output worth $998 with $1 swap gas and $0.70 approval gas. Route B delivers $997.50 with $0.80 swap gas and no new approval. Under these hypothetical values, A leaves $996.30 net value while B leaves $996.70.

Ignoring A's preparation transaction reverses the ranking: A would appear to leave $997. The omitted $0.70 is large enough to decide this comparison.

A signature is a different item

Uniswap's approval guide distinguishes an approval transaction that requires network costs from a signature request that does not itself pay an onchain transaction fee. Do not price every wallet prompt as a separate transaction.

Conversely, a signature-based interface can still require an earlier onchain allowance or other setup. Count the concrete operations required for this wallet and token, rather than assuming that an interface described as gasless has no preparation cost.

Keep the boundary narrow

The first-swap ledger should show setup and execution separately. If you later report average costs across several completed swaps, you can also present an allocated setup cost. That allocation is a different question from today's cash outlay.

Do not assume an allowance will work indefinitely across tokens, contracts or networks. A future route might need different authorization. Choosing an allowance also involves access permissions; a cost comparison alone does not decide which permission is appropriate. For this calculation, record the required operation and its estimated charge without prescribing the allowance amount.

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. What is an approval transaction?

    A paid approval transaction and a signature request are different operations.

    https://support.uniswap.org/hc/en-us/articles/8120520483085-What-is-an-approval-transaction

Continue reading

Compare first-time and repeat swap costs honestly Should a past approval fee affect today's route choice? Why identical swaps from two wallets can cost different amounts