missing checks and error handling for potential division by zero
Potential division by zero in assetAmt * totalSupply() / (totalAsset() - assetAmt)
If (totalAsset() - assetAmt) is zero, this is undefined in mathematics and would lead to runtime exception error
VS Code
Error handling statements of this form can resolve the issue:
if ((totalAsset() - assetAmt) == 0) revert Errors.DivisionByZeronotAllowed()
require(totalAsset() > assetAmt, "Division by zero: totalAsset must be greater than assetAmt");
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.