Exchange rate should not change due to a deposit. But in reality, calling the "deposit" function in ThunderLoan.sol leads to an increase in the exchange rate.
The documentation of the protocol states that "these AssetTokens gain interest over time depending on how often people take out flash loans". The exchange rate grows due to the fact that users pay a fee on loans. But in the "deposit" function, the depositor does not pay anything, but simply invests his funds, so the growth of the exchange rate is artificial.
This can break the functionality of the protocol: incorrect rate, unfair distribution of AssetTokens, calculation problems.
Manual rewiew.
Recommended to remove these lines of code in the "deposit" function:
///solidity
uint256 calculatedFee = getCalculatedFee(token, amount);
assetToken.updateExchangeRate(calculatedFee);
///
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.