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

Borrower may borrow a loan with unexpected interest rate

Summary

Borrower may borrow a loan with unexpected interest rate.

Vulnerability Details

Borrower calls borrow(Borrow[] calldata borrows) to borrow a loan, the calldata borrows doesn't contain interestRate.

When borrower calls to borrow, the pool lender may also call setPool(Pool calldata p) to update the interest rate. Both the transactions will be in mempool, if the setPoolgets executed beforeborrowtransaction, borrower may get a loan with unexpectedinterestRate`.

Impact

Borrower gets a loan with unexpected interestRate.

Tools Used

Manual Review

Recommendations

Add the interestRate to calldata borrows, and check if pool interestRate is expected.

Support

FAQs

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

Give us feedback!