20,000 USDC
View results
Submission Details
Severity: medium

`auctionLength` is not updated ub `giveLoan` and `buyLoan` methods.

Summary

auctionLength is not updated ub giveLoan and buyLoan methods.

Vulnerability Details

The action length is not updated in the give loan and buy loan methods.

This will cause inconsistency as the loan is moved between the pools. The loan's auction length will not match the pools' auction length after the loan is moved from one pool ao the other.

File: src/Lender.sol
419: loans[loanId].auctionStartTimestamp = type(uint256).max;
521: loans[loanId].auctionStartTimestamp = type(uint256).max;

Link to code - https://github.com/Cyfrin/2023-07-beedle/blob/main/src/Lender.sol

Tools Used

Manual Code Review by SolSaver

Recommendations

Update the methods to set auctionLength to the pool's value as well.

Support

FAQs

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