Missing Overflow Protection On the DeployedCapital #238
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 acknowledged
Technically the issue is correct, but we're not going to resolve it for XYZ reasons
Handle
defsec
Vulnerability details
Impact
An overflow/underflow happens when an arithmetic operation reaches the maximum or minimum size of a type. For instance if a number is stored in the uint8 type, it means that the number is stored in a 8 bits unsigned number ranging from 0 to 2^8-1. In computer programming, an integer overflow occurs when an arithmetic operation attempts to create a numeric value that is outside of the range that can be represented with a given number of bits – either larger than the maximum or lower than the minimum representable value.
On the SwingTrader.sol contract, Some of the internal variables doesn't have overflow protection although the safemath library has been used.
Proof of Concept
Tools Used
None
Recommended Mitigation Steps
Consider to use the following statement.
The text was updated successfully, but these errors were encountered: