Beginner FriendlySolidity
100 EXP
View results
Submission Details
Severity: medium
Invalid

Integer Overflow/Underflow Risks

Summary

The contract lacks protection against arithmetic overflow and underflow, which could lead to balance manipulation.

Vulnerability Details

The contract does not use SafeMath to prevent arithmetic overflows and underflows.

Affected code:

uint256 balance = balances[msg.sender] - amount;

Impact

  • Arithmetic errors could lead to incorrect balances or unintended behavior

Tools Used

  • Slither

  • Echidna

Recommendations

  • Use Solidity's SafeMath library (for older versions) or checked arithmetic operators (>=0.8.0)

Updates

Lead Judging Commences

0xtimefliez Lead Judge 3 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.