A fee percentage needs a base. “One percent” can mean one percent of input, one percent of gross output, or a charge added on top of the requested trade. These rules can produce different cash requirements even when the percentage is identical.
Define the cash budget first
Use a deliberately simplified hypothetical exchange with a constant rate of two output tokens for one input token. Ignore price impact and network charges.
- A 1% fee deducted from a 100-token input budget leaves 99 input tokens for exchange and produces 198 output tokens.
- Exchanging all 100 input tokens produces 200 output tokens; a 1% output deduction leaves 198.
- A 1% charge added to the 100 input tokens requires 101 input tokens in total and still delivers 200 output tokens.
The first two match only because this example uses a fixed linear rate. With a size-dependent pool curve, deducting input before exchange and deducting a percentage afterward need not have identical effects.
Beware of percentage conversions
A charge of one input token on top of a 100-token trade is 1% of the trade amount but approximately 0.9901% of the total 101-token cash outlay. Neither is inherently the wrong denominator. The description must identify which was used.
The Uniswap v2 whitepaper specifies fee treatment relative to input for its invariant. That implementation detail is one reason not to assume that every fee label uses the same base across services.
Questions a quote must answer
Record the asset charged, the amount on which the percentage operates, whether the fee is added or deducted, and whether quoted output already includes it. For a fixed wallet budget, request a quote using that full spending constraint. Comparing 100-token trades while overlooking an additional input charge compares different budgets.
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.
- Uniswap v2 Core
Invariant, reserve accounting and historical protocol design; do not repeat obsolete activation status.
https://uniswap.org/whitepaper.pdf