Not using OpenZeppelin’s SafeMath (or similar libraries) that check for overflows/underflows may lead to vulnerabilities or unexpected behavior if user/attacker can control the integer operands of such arithmetic operations. Solc v0.8.0
introduced default overflow/underflow checks for all arithmetic operations. (see here and here)
- Integer Arithmetic
- Overflows & Underflows
- Wrapped Values -> Invalid
- Data -> High/Low
- Unexpected Behavior & Vulnerabilities
- OZ SafeMath
- Default Checks ->
>= 0.8.0