20,000 USDC
View results
Submission Details
Severity: high

Lack of auction length check in buyLoan function

Summary

in buyLoan function there is no check to ensure that auctionLength of new pool is longer than previous pool.

Vulnerability Details

If lender of a pool start auction and transfers the loan to a new pool with lower auctionLength, the borrower will be forced to repay the loan in a shorter time.

consider a scenario that lender creates two pools with different auction lengths, once with 5 days and another one with 10 days.
After a borrower takes a loan from second pool, lender can back-run the borrower, start the auction, call buyLoan function and transfer the loan to another pool and start auction for loan in the new pool so borrower is forced to rapay in a shorter time.

Impact

Auction length of loan can be reduced by lender

Tools Used

Manual Review

Recommendations

Add a check to ensure that auction length of the new pool is not lower than the previous pool.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.