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

Division by zero not prevented

Summary

Vulnerability Details

In Solidity, transactions are reverted with the "division by zero" error
message when a division by zero is attempted.
Although divisions by zero will result in reversions,
they will not have error messages,
making failed transaction more difficult to debug by users.

Consider actively preventing divisions by zero with appropriate revert statements that
have informative and user-friendly error messages.

There are 2 instances of this issue:

Impact

Tools Used

Recommendations

It is recommended to add a sanity check to control whether the borrowed
amount is zero or not.

Support

FAQs

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