Beginner FriendlyFoundryDeFiOracle
100 EXP
View results
Submission Details
Severity: low
Invalid

CEI not followed in deposit

Summary

Vulnerability Details

The check-effect interaction was not properly followed in the deposit function as state variable were updated before getting the fund from users which is a bad practice as it can be dangerous to the protocol and users.

Impact

Liquidity Provider tends to waste gas before realizing they don't have enough or haven't approved the protocol to spend the funds

Tools Used

Manual review

Recommendations

The team should confirm a transferfrom function was successful from the liquidity provider before updating the state of the contract.

Updates

Lead Judging Commences

0xnevi Lead Judge
over 1 year ago
0xnevi Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Vague generalities

Support

FAQs

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