In QuantAMMCovarianceBasedRule::_setIntermediateCovariance
the function initializes a 2d array of size n*n as seen here line 59
newState
is meant to be an n by n 2d array for the covariance matrix but is instead initialized as an n*n by n 2d array.
In the case of pools with say 8 tokens , this becomes a 64 by 8 2d array, which leads to significant gas wastage due to solidity's memory expansion costs.
Low - unnecessary gas waste in an already gas intensive function
Manual Review
Should instead be
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.