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:
_ratio = _diff * 1e18 / totalSupply possible divisions by 0
can be performed.
loanRatio = (debt * 10 ** 18) / collateral possible divisions by 0
can be performed.
It is recommended to add a sanity check to control whether the borrowed
amount is zero or not.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.