Incorrect calculation of valueOfBorrowedToken
inside the ThunderLoan::getCalculatedFee() function will lead to calculation of incorrect value for fees. The precision used is fixed but as there will be various tokens in the protocol with different decimals then it will lead to wrong calculations.
The calculation of valueOfBorrowedToken
on the basis of a fixed precision will lead to wrong calculations as the tokens in the protocol will have different precisions, so having a fixed precision will lead to wrong calculation of fees and the exchange rate updations.
here s_feePrecision have a fixed value, but as different tokens can have different precisions, thus will lead to incorrect calculations for different tokens.
Incorrect calculations of fees and exchange rates, leading to less interest rates and less fees imposed on flash loan borrower.
Manual Review
To calculate the precision on the basis of the respective tokens.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.