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

If a borrower wants to refinance in the same pool, pool has to have 2x the needed liquidity

Summary

User who wants to refinance in the same pool, might be unable to do so if the pool doesn't have 2x the borrow value.

Vulnerability Details

There are many cases in which a user who has taken out a borrow might want to refinance in the same pool (e.g. the current interest rate is lower than what it was when the user took out the loan). The problem is that there is an unnecessary check which forces the pool to have at least 2x the needed borrow amount.
An example would be:

  1. Initial poolBalance = 2500 USDC

  2. User A takes a borrow for 2000 USDC at high interest rate.

  3. The pool owner significantly lowers the pool's interest rate.

  4. User A wants to refinance in the same pool in order to be at the lower interest rate.

  5. Attempting to refinance in the same pool for 2000 USDC, the transaction reverts, as the current poolBalance is < 2000 USDC, although technically this is unnecessary as the user already has the borrow they're refinancing.

if (pool.poolBalance < debt) revert LoanTooLarge();

Impact

User might be unable to refinance in the same pool if the pool has low liquidity

Tools Used

Manual review

Recommendations

Restructure the refinance method

Support

FAQs

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

Give us feedback!