In _calculateQuantAMMVariance
the notDivisibleByTwo
if case is not added in the else case. In this situation logic will be not correct and it will calculate wrong results.
During the calculations in _calculateQuantAMMVariance
, there are two situations where lambda array is with 1 length and lambda array is with more than 1 elements. If the length is 1, everything is calculated correctly, even for array with odd number of elements due to this logic.
The same logic should be used in the else case when the len of lambdas is more than 1. It is partially the same, but the first if statement is missing. This will lead to incorrect computations.
Logic will revert in the second if stament, due to element out of bound and not correct logic.
Manual review
Add the following code into the begging of the else case:
Likelihood: Medium/High, odd asset number + lambda is a vector. Impact: Medium/High, DoS the update.
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.