20,000 USDC
View results
Submission Details
Severity: high

Lender may not recieve the loan tokens back after updating the poolBalance with a balance less than the previous balance.

Summary

Lender might not recieve loan tokens but the lender contract will update the pool as if the loan tokens were transferred to the pool lender.

Vulnerability Details

There are some tokens that do not revert on failed to transfer tokens instead return boolean false but in the contract we don't check the value of the boolean returned due to which The lender.sol contract might not have enough loan tokens and if the contract tries to send the loanTokens like in line 159 of lender.sol contract then it would proceed the function and update the pool with new poolBalance inspite of the fact the lender didn't receive the loanTokens and the lender would not be able to get those loantokens back. Also when the lender calls the removeFromPool function it will update the pool balance even if the transfer of loan tokens to the lender failed.

Impact

This can cause the lender to loose the loan tokens.

Tools Used

Manual review

Recommendations

Add a check for the returned value of the transfer call and only proceed if the returned value is boolean true.

Support

FAQs

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