code-423n4 / 2022-03-volt-findings

0 stars 0 forks source link

If `currentMonth` in init is 0, then CPI update will revert, zero div #128

Closed CloudEllie closed 2 years ago

CloudEllie commented 2 years ago

This is a manual upgrade of the sixth item in QA report #86 , per judge @jack-the-pug's assessment of it as a Medium risk issue.

If currentMonth in init is 0, then CPI update will revert, zero div https://github.com/code-423n4/2022-03-volt/blob/main/contracts/oracle/ScalingPriceOracle.sol#L92 https://github.com/code-423n4/2022-03-volt/blob/main/contracts/oracle/ScalingPriceOracle.sol#L174 https://github.com/code-423n4/2022-03-volt/blob/main/contracts/utils/Deviation.sol#L23

CloudEllie commented 2 years ago

Duplicate of #58

jack-the-pug commented 2 years ago

Confirmed!