The UpdateWeightRunner contract lacks validation that updateInterval is non-zero during pool initialization. This leads to a division by zero in weight calculations, causing the entire weight update process to revert. Issue is irreversible.
Deployer can mistakenly provide 0 value for updateInterval when creating new pool. Since updateInterval is not validated to be non-zero, deployment and initialization will be successful:
Later, this value is used as denominator in the process of calculating the multiplier when new weights are set:
This will result by failure due to division by 0. Issue is permanent because there is no mechanism to update value of updateInterval. So pool is unusable because core feature of weight updates cannot be performed.
Pool becomes permanently unusable if deployed with zero updateInterval
All weight update attempts will revert
No way to fix after deployment as updateInterval can't be updated
I consider this to be medium severity.
Manual code review
Add updateInterval validation during pool setup:
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.