20,000 USDC
View results
Submission Details
Severity: low
Valid

Potential division by zero

Summary

Precautions are not being taken for preventing a division by zero which will cause a revert if it occurs.

Vulnerability Details

There is 1 instance of this issue.

File: src/Lender.sol
618: uint256 loanRatio = (debt * 10 ** 18) / collateral;
File Link Instance Count Instance Link
Lender.sol 1 618

Impact

A revert may occur when calculating the loan ratio.

Tools Used

baudit: a custom static code analysis tool; manual review

Recommendations

Consider adding input validation to verify the denominator is greater than zero.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.

Give us feedback!