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.
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
Lender can carefully craft a new Request that will not require newCollateral when rollLoan() is called:
// Check whether rolling the loan requires pledging more collateral or not (if there was a previous repayment).uint256 newCollateral =newCollateralFor(loanID_);
uint256 newDebt =interestFor(loan.amount, loan.request.interest, loan.request.duration);
// Update memory accordingly.
loan.amount += newDebt;
loan.collateral += newCollateral;
loan.expiry += loan.request.duration;
loan.request.active =false;
// Save updated loan info in storage.
loans[loanID_] = loan;
Since there is not sanity check, Lender is able to call rollLoan() on behalf of borrower. As a consequence, to increase the amount that has to be repaid.
Impact
Borrower has to repay more than expected in order to avoid
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
HChang26
high
Malicious lender can increase loan.amount
Summary
Lender can
provideNewTermsForRoll
androllLoan
on behalf of borrower when no new collateral is needed.Vulnerability Detail
Let's take a look at
provideNewTermsForRoll
:Lender can carefully craft a new
Request
that will not requirenewCollateral
whenrollLoan()
is called:Since there is not sanity check, Lender is able to call
rollLoan()
on behalf of borrower. As a consequence, to increase the amount that has to be repaid.Impact
Borrower has to repay more than expected in order to avoid
Code Snippet
https://github.com/sherlock-audit/2023-08-cooler/blob/main/Cooler/src/Cooler.sol#L282
https://github.com/sherlock-audit/2023-08-cooler/blob/main/Cooler/src/Cooler.sol#L192
Tool used
Manual Review
Recommendation
Duplicate of #26
The text was updated successfully, but these errors were encountered: