You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 3, 2024. It is now read-only.
sherlock-admin opened this issue
Aug 28, 2023
· 0 comments
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA valid Medium severity issueRewardA payout will be made for this issue
If new terms reduce collateral ratio, no collateral is refunded
Summary
If new terms reduce collateral ratio, no collateral is refunded
Vulnerability Detail
After a loan is active, the lender can propose new terms for it, which the borrower can then accepted. The problem is that if the new terms are accepted and collateralRatio is reduced enough so the needed collateral is less than what it was originally, no collateral is then refunded to the user, although it should be.
sherlock-admin2
changed the title
Generous Juniper Mink - If new terms reduce collateral ratio, no collateral is refunded
deadrxsezzz - If new terms reduce collateral ratio, no collateral is refunded
Sep 12, 2023
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA valid Medium severity issueRewardA payout will be made for this issue
deadrxsezzz
medium
If new terms reduce collateral ratio, no collateral is refunded
Summary
If new terms reduce collateral ratio, no collateral is refunded
Vulnerability Detail
After a loan is active, the lender can propose new terms for it, which the borrower can then accepted. The problem is that if the new terms are accepted and
collateralRatio
is reduced enough so the needed collateral is less than what it was originally, no collateral is then refunded to the user, although it should be.It only checks if
neededCollateral
is more and new collateral should be deposited.Impact
User isn't refunded their collateral when they should be.
Code Snippet
https://github.com/sherlock-audit/2023-08-cooler/blob/main/Cooler/src/Cooler.sol#L282C1-L300C6
Tool used
Manual Review
Recommendation
If the new collateral ratio is less than what it was originally, refund the needed part of the collateral to the user
Duplicate of #26
The text was updated successfully, but these errors were encountered: