Swapping A to B and then B back to A does not generally restore the starting amount. Trading charges and intervening state changes can alter the result. However, price impact alone should not be double-counted as an unavoidable loss in a perfectly reversible fee-free model.
First isolate the idealized case
Assume one hypothetical constant-product pool, no fees, no rounding, no other trades and no liquidity changes. If a trade moves the reserves along the curve and the user immediately returns exactly the output to reverse it, the pool can return to its original state and return the original input.
This matters because it prevents a misleading explanation that treats forward price impact and reverse price impact as two independent losses against untouched reserves. The reverse trade starts from the changed state.
Add a trading fee
Now start with 1,000 A and 1,000 B and assume an illustrative 0.3% input-side fee retained in the pool. Selling 100 A produces approximately 90.661089 B. The reserves become 1,100 A and 909.338911 B.
Selling those 90.661089 B back, with the same fee convention, produces approximately 99.455067 A. The round trip has lost about 0.544933 A before any network charges. These figures are independently calculated hypothetical examples, not a live fee claim.
Uniswap's pricing documentation explains reserve calculations and fee-adjusted invariant checks.
Real-world reversals add more variables
The return swap may use a different pool or route. Other traders may have acted, ranges may have changed, or the broader market may have moved. Those differences can improve or worsen the reverse result; they need their own explanation.
Network charges also belong to the full workflow but do not appear in the pool-only calculation above.
To analyze a round trip, preserve both transactions' actual amounts and route states. Do not assume the second quote is the reciprocal of the first, and do not calculate both against the same initial reserves. A correct comparison follows the state transition between the two trades.
Sources & verification (2)
Source-check date is recorded in the article details. URLs are provided for manual verification. Use Copy to keep this page open.
- Uniswap v2 Pricing
Reserve pricing, invariant enforcement and exact swap modes.
https://developers.uniswap.org/docs/protocols/v2/concepts/pricing - Understanding Swaps on Uniswap
AMM execution, minimum output, maximum input, deadlines and impact.
https://developers.uniswap.org/docs/get-started/concepts/traders/swaps