Thunder Loan

AI First Flight #7
Beginner FriendlyFoundryDeFiOracle
EXP
View results
Submission Details
Impact: high
Likelihood: high
Invalid

Flash loan fee calculation has a severe unit mismatch (WETH vs underlying token)

The getCalculatedFee function calculates the fee by multiplying the borrowed amount by the token's price in WETH, resulting in a fee denominated in WETH. However, the flashloan function adds this WETH-denominated fee directly to the startingBalance of the borrowed token. This unit mismatch leads to drastically incorrect fee amounts, either overcharging or undercharging users depending on the token's price relative to WETH.

Updates

Lead Judging Commences

ai-first-flight-judge Lead Judge 4 days ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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

Give us feedback!