When the lender auctions their loan, the borrower can call refinance() into a pool which has exactly the same specifications as the previous pool, and then immediately giveLoan() or refinance back into the original pool. This cancels the auction and allows the borrower to extend their loan indefinitely even if it is insolvent.
Here is a POC that Refinance resets loan time. The auction is initiated through:
lender.startAuction(loanIds);
So the auction should end 1 day from the current block.timestamp. Then it is refinanced.
If refinance resets the auction timestamp, startAuctionTimestamp will be reset to type(uint256).max:
assertEq(auctionTimestamp, type(uint256).max);
This test passes so the proof/attack was successful
Borrower can extend their loan forever without being seized
Foundry
Do not reset the auctions starting time when refinance is called.
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.