The input arrays in ConstantProduct2::calcReserveAtRatioLiquidity
are never checked. This can can lead to weird situation.
The input arrays are never checked. If the reserves.length != ratios.length != 2 then the whole uint256 i = j == 1 ? 0 : 1;
can have unexpected results.
Impact is high because these numbers are a central piece of the constant product calculation.
Likelihood is extremely low.
Overall the impact is low.
Manual review
Perform the following changes:
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.