Skip to content

Latest commit

 

History

History
20 lines (19 loc) · 904 Bytes

Integer overflow, underflow.md

File metadata and controls

20 lines (19 loc) · 904 Bytes

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)


Slide Screenshot

019.jpg


Slide Text

  • Integer Arithmetic
  • Overflows & Underflows
  • Wrapped Values -> Invalid
  • Data -> High/Low
  • Unexpected Behavior & Vulnerabilities
  • OZ SafeMath
  • Default Checks -> >= 0.8.0

References


Tags