-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Borrowers can pay as lower as they want if minPartialRepayPercent set as zero and cannot be called for auction. #575
Comments
0xSorryNotSorry marked the issue as sufficient quality report |
0xSorryNotSorry marked the issue as duplicate of #1174 |
0xSorryNotSorry marked the issue as duplicate of #1057 |
Trumpero marked the issue as not a duplicate |
Trumpero marked the issue as unsatisfactory: |
Trumpero marked the issue as duplicate of #1057 |
Trumpero marked the issue as satisfactory |
Trumpero marked the issue as not a duplicate |
After reviewing it again, I believe this issue isn't a duplicate of #1057, as it reflects the correct behavior of a lending term with minPartialRepayment == 0. This configuration is intended for such cases where maxDelayBetweenPartialRepay shouldn't be too long. So this scenario represents an admin mistake or a governance issue during the configuration of a lending term, making it an invalid issue due to C4's criteria. |
Trumpero removed the grade |
Trumpero marked the issue as unsatisfactory: |
I hope you are doing well. I agree this report is not duplicate of #1057 and in our report we didn't mean that We highlighted that if I appreciate your consideration and look forward to any further feedback. |
@pavankv241 |
Lines of code
https://github.com/code-423n4/2023-12-ethereumcreditguild/blob/main/src/governance/LendingTermOnboarding.sol#L128
Vulnerability details
Summary
Below we can see code of there is no restriction to set
minPartialRepayPercent
as zero butmaxDelayBetweenPartialRepay
as can be set below one year.Take a scenario :-
minPartialRepayPercent
set as zeromaxDelayBetweenPartialRepay
set as31557600
Borrower takes the
20_000e18
credit tokesn by giving the 12+ collateral tokens.Now borrower can call
partialReapy()
with as lower amount0.5e18
.This will extends the
partialRepayDelayedPassed()
function means it will always returnfalse
then borrower can pay his debt more than 2-3 years but governor can callforgive()
function on this loan but it make bad debt for ECG protocol this makes permanent loss for protocol.This loan cannot called for auction because
_call()
function have below checkThe above check means only gauge(term) off-boarded or loan missed partial repayment.
5.Loan hasn't missed partial payment so cannot be
_call()
.Impact
This mechanism cause permanent loss for ECG and loyal borrowers also if one or more borrower makes partial payment as much as lower amount. That loan cannot be called for auction also it can be only after gauge is off-boarded.
Proof of Concept
output :-
Tools Used
Manual view , foundry
Recommended Mitigation Steps
Implement the mechaism before initialising the lending term if term wish to have partial repayment then minimum value has to be set.
1.Add boolean type to
LendingTermParams
structbool hasPartialRepayment
.2.Add check in
createTerm()
fucntion on LendingOnboard contractAssessed type
Context
The text was updated successfully, but these errors were encountered: