The QuantAMMVarianceBasedRule::_calculateQuantAMMVariance function is DoSed for pools with an odd number of tokens and a vector lambda(λ) parameter due to out of bounds(OOB) array access
In QuantAMMVarianceBasedRule::_calculateQuantAMMVariance,
When number of tokens is odd (for vector lambda(λ) calculation) we see that nMinusOne is incremented before accessing the arrays, this is done to set the variable to the last token index, however, the nMinusOne variable is already at the last token index as we see from line 62
This means that the increment will cause nMinusOne to exceed the the arrays bounds, DoSing the function.
High - permanent DOS for vector lambda(λ) pools with odd number of tokens
Manual Review
No need for an increment as nMinusOne is already at the last token index
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.