ThunderLoan.deposit raises the AssetToken exchange rate as though the protocol had received a fee, but a deposit collects no fee — the only transfer in the function moves exactly amount. The rate therefore rises with no matching underlying behind it, so the AssetToken immediately promises more underlying than it holds.
Contrast this with flashloan, where the identical call is legitimate because the borrower really does return amount + fee:
Likelihood: High
No attacker is required. This happens on every single deposit through normal protocol usage, and the shortfall compounds with each one.
Impact: High
The AssetToken's liabilities exceed its assets from the very first deposit. Every holder's redeemable claim is larger than the underlying actually held, so the protocol is insolvent and the last depositors to redeem cannot withdraw their funds at all.
A single deposit makes the depositor's own claim exceed the contract's balance, and the full redeem reverts.
Result after a single 100e18 deposit:
The depositor is owed 0.296 tokenA more than exists in the contract, and redeem(type(uint256).max) reverts.
Remove the fee accounting from deposit. The exchange rate represents how much underlying each share is worth, so it may only rise when the protocol actually receives underlying it did not have before. A deposit mints shares against the exact amount transferred in, which leaves the ratio unchanged by definition — raising the rate there invents value out of nothing and the gap is paid for by whoever redeems last.
Flash loan repayment is the only event that genuinely adds unbacked underlying to the pool, and flashloan already calls updateExchangeRate with its enforced repayment check. That call site is correct and should remain.
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.