Closed 0xSandyy closed 2 weeks ago
Imo this should go under DoS with unexpected revert, would be a great addition
or How about a separate Solidity Math Issues
listing including all other issues like rounding errors, lack of precision, solidity truncation, etc?
I think division by zero best fits under unexpected revert but I think the others could go together on a listing that specifically encompasses effects of integer math
Ok, I will work on the PR for unexpected revert first and then will work on Integer math issues. What should I put the title for integer math issues?
Ok, I will work on the PR for unexpected revert first and then will work on Integer math issues. What should I put the title for integer math issues?
I think we could go with "Integer Rounding" or something like that as I'd say it's probably the root of each of those issues. By the way, I realized we have this vulnerability listed already https://github.com/kadenzipfel/smart-contract-vulnerabilities/blob/master/vulnerabilities/lack-of-precision.md so would be best to update that with the new title and different possible outcomes
Checklist
Type of Issue
Description
Division by Zero
In solidity if the contract attempts to perform division when the denominator is
zero
, the whole transaction reverts. Thus, the denominator should be always checked before division.