The UpdateWeightRunner provides a function (setIntermediateValuesManually) that allows the QuantAMM admin to manually set the intermediate variables of a rule, asides from setting the initial intermediate variables on pool initialization , it can also be used as a break-glass feature to set/reset the intermediate variables of a rule if necessary.
The issue is that the length check in the function QuantAMMVarianceBasedRule::_setIntermediateVariance function is incorrect and will prevent usage of this feature
In QuantAMMVarianceBasedRule::_setIntermediateVariance
The issue is that intermediateVarianceStates is a packed array with length = numberOfAssets/2 whereas initialValues is an array with length = numberOfAssets. This means that the function will always revert when storeLength is not 0(i.e. when pool is already initialized).
Medium - Break-glass feature, where the QuantAMM admin can manually set the intermediate variance if necessary, will be unusable
Manual Review
Likelihood: Medium, _setIntermediateVariance is used to correct values in case of problem. Impact: Low/Medium, First initialization will work but this function won’t be able to mitigate any future problem.
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.