code-423n4 / 2021-09-wildcredit-findings

0 stars 0 forks source link

`setTargetUtilization`'s `require` statement does not match error #45

Closed code423n4 closed 3 years ago

code423n4 commented 3 years ago

Handle

cmichel

Vulnerability details

The InterestRateModel.setTargetUtilization function reverts on _value < 99e18 but the error message says _value < 100e18.

Impact

The target utilization rate cannot be set to 99% or 99.2%, etc. The cut-off at < 99% seems rather arbitrary and the intention was probably < 100%, what the error message says.

Recommendation

The require statement should be changed to _value < 100e18.

talegift commented 3 years ago

Duplicate #86

ghoul-sol commented 3 years ago

best practices, non-critical