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
The rollLoan() function must be called only by the borrower
Summary
The lender can create new terms via provideNewTermsForRoll() and the same lender accept them using the rollLoan() function making the borrower to increase his loan interests.
The problem is that the malicious lender can create new malicious terms and accept them without restriction making the borrower to pay more interests. See the next scenario:
The lender provide new terms for the loan using the provideNewTermsForRoll(). He increases the interests to 20%.
The malicious lender can increment the interests, then accept them via rollLoan() making the borrower to pay more interests. The borrower may lose his collateral due an unpayable debt.
sherlock-admin2
changed the title
Calm Alabaster Tapir - The rollLoan() function must be called only by the borrower
0xbepresent - The rollLoan() function must be called only by the borrower
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
0xbepresent
high
The
rollLoan()
function must be called only by the borrowerSummary
The lender can create new terms via
provideNewTermsForRoll()
and the same lender accept them using therollLoan()
function making the borrower to increase his loan interests.Vulnerability Detail
The lender can create new terms via provideNewTermsForRoll(). Then those new terms are accepted using the rollLoan() function.
The problem is that the malicious lender can create new malicious terms and accept them without restriction making the borrower to pay more interests. See the next scenario:
provideNewTermsForRoll()
. He increases the interests to 20%.rollLoan()
function and those new terms are accepted.Impact
The malicious lender can increment the interests, then accept them via
rollLoan()
making the borrower to pay more interests. The borrower may lose his collateral due an unpayable debt.Code Snippet
The provideNewTermsForRoll() function:
The rollLoan() function:
Tool used
Manual review
Recommendation
The borrower should be the only who can accept the new lender's terms:
function rollLoan(uint256 loanID_) external { ++ if (msg.sender != owner()) rever(); ... ... ...
Duplicate of #26
The text was updated successfully, but these errors were encountered: