Anyone can call the flash loan function, which in turn calls the executeOperation function in the MockFlashLoanReceiver contract with parameters that spend any profits left in MockFlashLoanReceiver after another person's flash loan. People borrow flash loans to make a profit, so MockFlashLoanReceiver should end up with more than just amount + fee after a flash loan is done. But only amount + fee is returned to the ThunderLoan contract. If a borrower doesn't send its profit out of the MockFlashLoanReceiver contract, a griefer can come behind them and call flash loan with parameters that spend the previous borrower's profits.
A borrower could lose their profits.
Manual review
Borrower should not keep their profits in the flash loan receiver contract
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.