Root + Impact
ThunderLoan.deposit() has no minimum deposit amount. The first depositor can deposit 1 wei, then subsequent deposits round down to 0 assetTokens due to integer division with an inflated exchange rate. The first depositor captures all value.
Description
• Normal behavior: A minimum deposit should prevent the first depositor from gaming the exchange rate precision. Depositors should receive assetTokens proportional to their deposit. • Specific issue: With no minimum deposit, the first depositor deposits 1 wei and receives 1 assetToken. After exchange rate inflation, the second depositor's larger deposit rounds down to 0 assetToken due to integer division. The first depositor redeems and captures almost all value.
Risk
Likelihood: Medium — requires the first depositor to act maliciously, but this is a well-known attack pattern.
Impact: Medium — subsequent depositors lose their entire deposit. The first depositor steals all funds.
Proof of Concept
solidity
Recommended Mitigation
solidity
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.