SafeMath library is not always used in the contracts #60
Labels
1 (Low Risk)
Assets are not at risk. State handling, function incorrect as to spec, issues with comments
bug
Something isn't working
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Handle
defsec
Vulnerability details
Impact
SafeMath library functions are not always used in arithmetic operations in the contracts, which could potentially cause integer underflow/overflows. Although in the reference lines of code, there are upper limits on the variables to ensure an integer underflow/overflow could not happen, using SafeMath is always a best practice, which prevents underflow/overflows completely (even if there were no assumptions on the variables) and increases code consistency as well.
Proof of Concept
Tools Used
Code Review
Recommended Mitigation Steps
Consider using the SafeMath library functions in the referenced lines of code.
The text was updated successfully, but these errors were encountered: