Flow

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

Improper Error Handling for External Calls

location: /src/SablierFlow.sol

code:

token.safeTransferFrom({ from: msg.sender, to: address(this), value: amount });

Impact

  • Description: If an external call (like safeTransferFrom) fails, any state changes made before the call may still persist. This can leave the contract in an inconsistent state.

  • Real-World Consequences: Users may lose funds due to failed transactions while believing their actions have succeeded.

Recommendations

  • Check Return Values: Always verify the return value of external calls and revert the transaction if it fails.

  • Try/Catch Mechanism: Implement a try/catch structure for calls to external contracts to handle failures gracefully.

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.