Closed sherlock-admin3 closed 2 months ago
Invalid, this issue is unclear and is pure speculation. Additionally, the relevant check for collateral sufficiency is eventually performed here, so function will revert if insufficient collateral is present.
If there are circumstances under which collateral withdrawal could result in some collateral becoming stuck, it poses a risk to the lending platform.
0xrobsol
high
Potential Risk in Collateral Withdrawal During Loan Repayment
Summary
The _repayLoan function includes a section for withdrawing collateral if the loan is being liquidated and backed by collateral. However, there is a concern regarding the safety of collateral withdrawal, as it may result in collateral becoming stuck, allowing the borrower to retain some collateral.
Vulnerability Detail
The function allows for the withdrawal of collateral if the loan is being liquidated and backed by collateral. However, there is no explicit verification or assurance provided regarding the safety of collateral withdrawal. If there are circumstances under which collateral withdrawal could result in some collateral becoming stuck, it poses a risk to the lending platform.
Impact
The potential risk associated with collateral withdrawal during loan repayment may lead to the following issues:
Code Snippet
https://github.com/sherlock-audit/2024-04-teller-finance/blob/main/teller-protocol-v2-audit-2024/packages/contracts/contracts/TellerV2.sol#L879
Tool used
Manual Review
Recommendation
Implement safety measures or checks within the collateral withdrawal process to prevent the loss of collateral or borrower misconduct.