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

Malicious lender can front-runs to set interest rate to MAX_INTEREST_RATE

Summary

Malicious lender can front-runs to set interest rate to MAX_INTEREST_RATE, results in a bad loan for the borrower.

Vulnerability Details

When a borrower create a loan by calling borrow, there is no check for the pool interest rate, imagine the following scenario:

  1. Alice submits a transaction to create a loan from a pool;

  2. The pool lender Bob sees Alice's transaction in the mempool, and front-runs to increase the pool interest rate;

  3. Bob's transaction gets executed, pool interest rate is set to MAX_INTEREST_RATE;

  4. Alice's transaction gets executed, loan is created but loan interest rate is MAX_INTEREST_RATE.

Impact

More interest rate means more interest, borrower has to pay more tokens to repay.

Tools Used

Manual Review

Recommendations

When a loan is created from a pool, should check if the pool interest rate is expected.

Support

FAQs

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