FV-SOL-3 Arithmetic Errors
TLDR
Arithmetic-related security vulnerabilities primarily stem from issues with numeric operations, particularly when they handle unexpected values or edge cases
Code
Classifications
Mitigation Patterns
Update Solidity Version (FV-SOL-3-M1)
Solidity 0.8+ offers built-In Overflow and Underflow protection
Using Established Math Libraries (FV-SOL-3-M2)
Complex calculations should be using hard work premade in trusted math libraries available
Unit Testing on Edge Cases (FV-SOL-3-M3)
Write tests for edge cases, such as small or very large values, fractions close to rounding boundaries, zero values, and more.
Actual Occurrences
Content
Last updated