When the user borrows, poolId is passed in without checking the current pool status. The pool lender can listen to tx in mempool, and then immediately adjust interestRate to the maximum value to steal part of interest funds.
As the code above shows, the current state of the pool may not be consistent with the state when the user initiated the transaction, which may result in the loss of the user's funds.
The same goes for other parameters, such as auctionLength.
When the pool lender frontrun to modify interestRate, the user needs to bear high interest.
Manual review
Support user intent through parameters, specify interestRate.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.