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.
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.