The QuantAMMGradientBasedRule._calculateQuantAMMGradient function stores new values in the intermediateGradientStates array using the index of the unpacked array which is twice larger. This can cause unexpected errors for the _poolParameters.lambda.length > 1 case.
The QuantAMMGradientBasedRule._calculateQuantAMMGradient function stores in the intermediateGradientStates array packed values . That is why it tracks two indexes. When value is stored in the intermediateGradientStates array the locals.storageArrayIndex should be used. But for the _poolParameters.lambda.length > 1 case the i is used.
DoS of the core functionality
Manual Review
Consider using locals.storageArrayIndex instead of i index.
Likelihood: Medium/High, assets>4, lambdas > 1. Impact: Medium/High, DoS update but pool works fine. Pool with 5 assets will use incorrect weights.
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.