buyLoan()
doesn't have the requirement checking if the pool has the lender is msg.sender
Malicious user can do this:
A(malicious user) makes a pool
B(A's alternative account) lends A's pool
A immediately startAuction()
the B's loan
A can buyLoan
using C's pool
After this, pools[C's pool].poolBalance
got decrease, and pools[A's pool].poolBalance
got increase
A can removeFromPool()
and take profit
Moreover, all of this step can execute in one transaction
Manual Review
Add the requirement if(pools[poolId].lender != msg.sender) revert NotOwner();
in buyLoan()
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.