Skip to content
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

No way to liquidate a position that is underwater due to interests growing up over time #1002

Closed
c4-bot-8 opened this issue Dec 28, 2023 · 6 comments
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 insufficient quality report This report is not of sufficient quality unsatisfactory does not satisfy C4 submission criteria; not eligible for awards

Comments

@c4-bot-8
Copy link
Contributor

Lines of code

https://github.com/code-423n4/2023-12-ethereumcreditguild/blob/2376d9af792584e3d15ec9c32578daa33bb56b43/src/loan/LendingTerm.sol#L653

Vulnerability details

Impact

In this protocol, a position can only be liquitated if the current term is offboarded or partial payment is overdue. This means that a position cannot be liquidated if it is underwater due to accumulated interests.

Proof of Concept

https://github.com/code-423n4/2023-12-ethereumcreditguild/blob/2376d9af792584e3d15ec9c32578daa33bb56b43/src/loan/LendingTerm.sol#L653

Tools Used

VSCode

Recommended Mitigation Steps

Allow liquidation for these types of positions.

Assessed type

Context

@c4-bot-8 c4-bot-8 added 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 labels Dec 28, 2023
c4-bot-8 added a commit that referenced this issue Dec 28, 2023
@0xSorryNotSorry
Copy link

The submission does not provide any demonstration of the issue, reasoning and code blocks.

@c4-pre-sort
Copy link

0xSorryNotSorry marked the issue as insufficient quality report

@c4-pre-sort c4-pre-sort added the insufficient quality report This report is not of sufficient quality label Jan 3, 2024
@c4-judge c4-judge added the unsatisfactory does not satisfy C4 submission criteria; not eligible for awards label Jan 21, 2024
@c4-judge
Copy link
Contributor

Trumpero marked the issue as unsatisfactory:
Insufficient quality

@RunSoul22
Copy link

RunSoul22 commented Feb 3, 2024

Hi @Trumpero

I believe this issue is a duplicate of #1057

A malicious user can abuse this by not repaying his loan or by not adding collateral to his loan when interest accrues above maxDebtPerCollateralToken. There will be no way to do anything with such positions, the only possible solution would be to offboard a full term.

In the impact section, I have clearly stated that there are only two ways to liquidate a position:

In this protocol, a position can only be liquitated if the current term is offboarded or partial payment is overdue

And the following reasoning is straightforward, there is no way to liquidate a position that is underwater due to interests growing up over time:

This means that a position cannot be liquidated if it is underwater due to accumulated interests.

Although this report is shorter and of lower quality compared to others, I have identified the core issue. Therefore, I believe a partial credit of 25% would be more appropriate than considering it completely unsatisfactory.

@Trumpero
Copy link

Trumpero commented Feb 6, 2024

@RunSoul22 I consider this issue invalid due to its lack of quality. This report has too low quality and unclear description, and it doesn't point out any case where maxDebtPerCollateral will be surpassed, to be a duplicate of #1057

@RunSoul22
Copy link

thanks. I will do better next time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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 insufficient quality report This report is not of sufficient quality unsatisfactory does not satisfy C4 submission criteria; not eligible for awards
Projects
None yet
Development

No branches or pull requests

6 participants