A multi-hop route must be evaluated from original input to final output. One favorable intermediate rate can be offset by a weaker later conversion. Adding hop rates is invalid because their units differ.
Multiply compatible units
In a hypothetical simplified path, 1 A becomes 2 C and each C becomes 3 B. If those rates apply to the full amounts and no further deductions occur, the composite rate is 6 B per A.
Another path might turn 1 A into 3 D, apparently a larger first-hop number, but each D becomes only 1.5 B. Its composite rate is 4.5 B per A. Comparing 3 D with 2 C at the first hop says nothing useful because D and C are different assets.
Real paths need amount-dependent calculation
The simplified multiplication assumes fixed rates. AMM routes instead quote the actual first-hop output and use that amount as input to the next hop. The second rate can change with that size.
Uniswap's multi-hop guide describes this sequence of conversions. Its pricing guide explains why amounts depend on pool reserves.
Keep principal and presentation separate
A route diagram can contain several large-looking numbers simply because some tokens use small unit prices or many decimal places. Those amounts are intermediate inventory, not independent benefits to add together.
For a split route, calculate the final B result of each branch and then add those B amounts. Do not add C or D amounts to the final B total. At every step, track which asset is leaving and which is arriving.
The final comparison should use the same original input, destination token and execution assumptions. This preserves the economic question the route is meant to answer: what does the complete plan deliver? A visually attractive hop is only one part of that plan.
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.
- Multi-hop Swapping
Sequential token paths and reverse requirements for exact-output swaps.
https://developers.uniswap.org/docs/protocols/v3/guides/swapping/multi-hop-swapping - Uniswap v2 Pricing
Reserve pricing, invariant enforcement and exact swap modes.
https://developers.uniswap.org/docs/protocols/v2/concepts/pricing