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

Lender.refinance decreases target pool 2 times

Summary

Lender.refinance decreases target pool 2 times. So malicious borrower can use this function just to burn funds.

Vulnerability Details

Lender.refinance function is used to repay 1 loan and then create new loan.
This function decreases new pool balance 2 times: here and here. This is error and this is very severe error for the owner of the pool and it allows for malicious borrower to burn all available funds, by refinancing to new pool.

Impact

Funds are lost

Tools Used

VsCode

Recommendations

Remove second pool balance decrease.

Support

FAQs

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