Beginner FriendlyFoundryDeFiOracle
100 EXP
View results
Submission Details
Severity: high
Valid

Unnecessary fee update - bad accounting

Summary

deposit() function in Thunderloan.sol contract has an unnecessary update of the asset token's exchange rate. This will lead to incorrect exchange rates.

Vulnerability Details

This logic should, and already does, happen in the flashloan() function.

Impact

Users could either pay a fee that is too high or low due to arbitrary calls to deposit().

Tools Used

Manual inspection

Recommendations

Remove the lines listed in relevant links section

Updates

Lead Judging Commences

0xnevi Lead Judge almost 2 years ago
Submission Judgement Published
Validated
Assigned finding tags:

can't redeem because of the update exchange rate

Support

FAQs

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