20,000 USDC
View results
Submission Details
Severity: medium

auctionLength restriction is not strict

Summary

The only restriction to auctionLength is that it can't be 0, but, a low auctionLength can result in a rug-pull of the borrower, as the lender could set a few seconds long auctionLength, which would result in an inability for anyone to participate in the dutch auction, resulting in the lender adquiring the borrower collateral.

Vulnerability Details

File: src/Lender.sol
// the only check to auctionLength
136: p.auctionLength == 0 ||
471: if (block.timestamp > loan.auctionStartTimestamp + loan.auctionLength)
472: revert AuctionEnded();

Impact

Borrower can lose its collateral in any moment the lender decides to.

Tools Used

Manual review

Recommendations

Check a considerable require statement where auctionLength cannot be lower than 1 day for example.

Support

FAQs

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