For Loan Terms with No partial repay (maxDelayBetweenPartialRepay = 0), there is no way to liquidate the loan #921
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
downgraded by judge
Judge downgraded the risk level of this issue
duplicate-1057
satisfactory
satisfies C4 submission criteria; eligible for awards
sufficient quality report
This report is of sufficient quality
Lines of code
https://github.com/volt-protocol/ethereum-credit-guild/blob/main/src/loan/LendingTerm.sol#L634-L675
Vulnerability details
Impact
There is no way to liquidate the loan for terms with no partial repayment (maxDelayBetweenPartialRepay = 0).
Hence, it results in either of two things:
Proof of Concept
https://github.com/volt-protocol/ethereum-credit-guild/blob/main/src/loan/LendingTerm.sol#L634-L675
The call function only allows calling loans based on two conditions:
But if the maxDelayBetweenPartialRepay is set to 0, the
partialRepayDelayPassed
function always returns false, which results in the call function getting reverted as well.https://github.com/volt-protocol/ethereum-credit-guild/blob/main/src/loan/LendingTerm.sol#L240-L241
Hence liquidation never happens for the loans in terms with maxDelayBetweenPartialRepay set to 0.
Tools Used
Manual
Recommended Mitigation Steps
There should be a way to liquidate specific loans in terms where maxDelayBetweenPartialRepay is set to 0.
Assessed type
Other
The text was updated successfully, but these errors were encountered: