This report highlights a critical vulnerability in the setWeights function of the QuantAMM contract. The function lacks a check to ensure that updated weights are not below the absoluteWeightGuardRail. This oversight allows administrators to set invalid weights during updates, potentially destabilizing the pool and opening the protocol to economic exploits.
In the _setInitialWeights function, a check ensures that no weight in _weights is less than the absoluteWeightGuardRail:
This guarantees that all initial weights meet the minimum threshold. In the setWeights function, there is no similar validation. Consequently, during updates, weights can be set below the absoluteWeightGuardRail, bypassing the safeguard enforced during initialization.
In the setWeight function, there is no similar validation. Consequently, during updates, weights can be set below the absoluteWeightGuardRail, bypassing the safeguard enforced during initialization.
The updateRunner calls the setWeights function to update the pool's weights, The _weights array contains values below the absoluteWeightGuardRail.
The function proceeds without reverting, allowing invalid weights to be set.
Invalid weights disrupt the intended balance and operation of the pool.
Manual review
Include a loop to validate that all weights meet the absoluteWeightGuardRail threshold before proceeding. For example:
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.