Flow

Sablier
FoundryDeFi
20,000 USDC
View results
Submission Details
Severity: medium
Invalid

Arithmetic Overflow/Underflow Risks

location: /src/SablierFlow.sol

code:

unchecked {
_streams[streamId].balance -= amount;
}

Impact

  • Description: Although Solidity 0.8.x introduces built-in overflow/underflow checks, if the contract is mistakenly compiled with an older version, it may become vulnerable. Additionally, calling external contracts that do not adhere to SafeMath can also lead to issues.

  • Real-World Consequences: Incorrect calculations can lead to incorrect balances and potentially financial losses.

Recommendations

  • Version Control: Ensure the contract is always compiled with Solidity 0.8.x or higher.

  • SafeMath Library: If compatibility with earlier versions is required, use SafeMath for all arithmetic operations.

Updates

Lead Judging Commences

inallhonesty Lead Judge 8 months ago
Submission Judgement Published
Invalidated
Reason: Lack of quality
inallhonesty Lead Judge 8 months ago
Submission Judgement Published
Invalidated
Reason: Lack of quality

Support

FAQs

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