20,000 USDC
View results
Submission Details
Severity: high
Valid

`refinance()` does not consider when the loan is being auctioned

Summary

refinance() does not consider when the loan is being auctioned. And this function can only be called by the borrower. If the loan is being auctioned by lender. The borrower does not want to be auctioned. He will call the refinance() and reflesh the loans[loanId].auctionStartTimestamp = type(uint256).max;. And the Auction will be fail.

Vulnerability Details

https://github.com/Cyfrin/2023-07-beedle/blob/main/src/Lender.sol#L591

https://github.com/Cyfrin/2023-07-beedle/blob/main/src/Lender.sol#L692

Impact

It will cause lender unable to acution the loan

Tools Used

manual

Recommendations

check if loans[loanId].auctionStartTimestamp == type(uint256).max

Support

FAQs

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