Function _calculateQuantAMMVariance will fail if numberOfAssets is odd and lambda is a vector.
The function _calculateQuantAMMVariance is implemented as follows:
The key issue here is that when lambda is a scalar and numberOfAssets is an odd number, --locals.nMinusOne; is executed, but when lambda is a vector, this logic is missed. Finally, after ++locals.nMinusOne;, the access to _poolParameters.lambda[locals.nMinusOne] will be failed(out of index), causing function to be reverted.
Function _calculateQuantAMMVariance will fail.
None
Put the logic of --locals.nMinusOne; at the beginning of the function.
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.