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

Refinance decreases new pool's `poolBalance` twice.

Summary

Upon refinancing, the new pool's poolBalance will be decreased twice.

Vulnerability Details

Both of the following codeblocks are within the refinance method

_updatePoolBalance(poolId, pools[poolId].poolBalance - debt);
pools[poolId].poolBalance -= debt;

Upon refinancing debt will be reduced twice. If there is enough liquidity for the transaction not to revert, these funds will be lost forever and remain stuck at the contract.

Impact

Permanent loss of funds for the pool.lender

Tools Used

Manual review

Recommendations

Remove either one of the codeblocks.

Support

FAQs

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

Give us feedback!