getAmountsOut
, getAmountsIn
these functions retrieve an index price from the SyntheticReader response to calculate swap amounts. However, there is no guarantee this price corresponds to the timestamp of the trade execution.
If the markets or oracle prices moved between the time of the SyntheticReader call and trade, an incorrect index value could be used for pricing.
Reproduction:
Call getAmountsOut/In and SyntheticReader returns stale price
Index moved before trade occurred
Incorrect amounts returned due to outdated reference
Manual Review
Consider caching index prices at function call time rather than rely on SyntheticReader response. Alternatively, pass trade timestamp to derive corresponding index level.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.