20,000 USDC
View results
Submission Details
Severity: medium

`giveLoan` and `buyLoan` don't change the loan's `auctionLength`.

Summary

Upon giving/ buying a loan, the loan's auction length is not changed.

Vulnerability Details

Although, both methods make a check assuring the new pool's auction length isn't less than the one of the old pool, the loan's auctionLength value is not changed and remains the one of the old pool.

loans[loanId].lender = pool.lender;
loans[loanId].interestRate = pool.interestRate;
loans[loanId].startTimestamp = block.timestamp;
loans[loanId].auctionStartTimestamp = type(uint256).max;
loans[loanId].debt = totalDebt;

Impact

auctionLength's value is not changed although it should be.

Tools Used

Manual review

Recommendations

Upon buying/ giving a loan, change the value of auctionLength.

Support

FAQs

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

Give us feedback!