Measure execution against a contemporaneous reference if you want to distinguish broad market movement from route-specific deterioration. A comparison with an old reference combines both. The separation remains approximate when the reference is not executable at the same size.
A simple attribution example
At decision time, a hypothetical reference values the intended received quantity at 1,000 input units. By inclusion time, that reference indicates 1,006. The actual acquisition requires 1,008, before separate fees.
Relative to the decision-time reference, the acquisition cost eight extra units. A six-unit movement occurred in the reference during the wait; actual execution was two units above the contemporaneous reference. Calling all eight a route failure would overstate what the comparison establishes.
A reference is still imperfect
The two-unit residual may contain fees, size effects, venue differences and reference error. It is not automatically avoidable loss. A local mid price differs from average trade execution, particularly when the requested size is meaningful relative to depth.
Use matching token identity, price direction and timestamps. A reference built from a different network or a delayed market feed can create a residual unrelated to the route's performance.
Report two useful metrics
The decision-time shortfall captures what it cost to carry out the original intention. The contemporaneous residual describes execution relative to the chosen reference at settlement. Presenting both prevents favorable market movement from disguising poor execution and prevents adverse movement from being assigned entirely to routing.
If the inclusion-time reference is missing, report the combined shortfall and the attribution limit. A later chart lookup can offer context but should not be presented as an exact reconstruction of the available market. Separate gas remains another explicit cost rather than part of the market-movement component.
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.
- Pricing with the v2 SDK
Distinction between mid price and average execution price.
https://developers.uniswap.org/docs/sdks/v2/guides/pricing