Loans can be seized before the end of their auction.
The seizeLoan function allows users to seize a loan if an auction for them has failed. There is an if statement that reverts the transaction if a trial to claim a loan before the end of its auction occurs. The condition will return true if block.timestamp is equal to the end of the auction.
This may seem like intended, but in buyLoan we can see that an auction is considered active until block.timestamp passes its end time.
If an user who wants to buy a loan is backrunned in a block where the timestamp matches the end of the auction, he can end up buying a loan that gets seized by a malicious actor.
Manual review
Correct the check in seizeLoan to:
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.