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

Lender can cancel onging Auctions by GivingLoan to another address when the auction is in progress

Vulnerability Details

When giveLoan() is called to give a loan to another address, the auctionStartTimestamp is reset:

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

There are no checks that there is an auction ongoing when giveLoan() is called. The lender has an incentive to cancel auction and then restart the auction to their own advantage. They can transfer the loan to another address/pool that they also own

Impact

Lender can always cancel their ongoing auctions

Tools Used

Foundry

Recommendations

Add a check for giveLoan() to ensure that it cannot be executed when an auction has already started

Support

FAQs

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