QuantAMMWeightedPool will revert when initialize() is called.
When a QuantAMMWeightedPool is initialized, _setInitialWeights() is called with initialWeights as parameter. Each weight is checked to be valid, but this is done incorrectly: the function reverts whenever an initialWeights[i] < absoluteWeightGuardRail; however according to natspec this variable is the maximum allowed weight (not the minimum), so that the condition for reverting should be exactly the opposite:
Impact is critical as pools can never be initialized with valid values, breaking the expected behaviour of the system.
Remix, manual testing
Update the condition for reverting only when maximum allowed weight is exceeded:
Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelyhood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.
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.