setWeights - Missing minWeight check against absoluteWeightGuardRail
setWeights function lacks a check to keep weights above the absoluteWeightGuardRail, risking pool instability and enforcing potential exploitations.
Here's minWeight check in _setInitialWeights function:
Above check ensures that all initial weights meet the minimum threshold.
In contrast, 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.
Invalid weights compromise the pool's balance and functionality, potentially leading to instability and economic vulnerabilities.
Manual Review
Add a validation check in the setWeights function to ensure that all updated weights remain above the absoluteWeightGuardRail, similar to the validation implemented in the _setInitialWeights function.
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.