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

0 stars 0 forks source link

Ensure targetUtilization > 0 #105

Open code423n4 opened 3 years ago

code423n4 commented 3 years ago

Handle

pauliax

Vulnerability details

Impact

function setTargetUtilization should also prevent _value = 0 as then function interestRatePerBlock will stop working (revert due to division by 0). This function can only be called by an owner but I think still it makes sense to enforce this algorithmically.

Recommended Mitigation Steps

require(_value > 0, "InterestRateModel: _value > 0");

talegift commented 3 years ago

Required admin error. Lower severity to 0.

ghoul-sol commented 3 years ago

best practice, non-critical