This repository has been archived by the owner on Mar 3, 2024. It is now read-only.
deadrxsezzz - Lender can front-run rollLoan
and call provideNewTermsForRoll
with unfavorable terms
#243
Labels
Has Duplicates
A valid issue with 1+ other issues describing the same vulnerability
Medium
A valid Medium severity issue
Reward
A payout will be made for this issue
Will Fix
The sponsor confirmed this issue will be fixed
deadrxsezzz
high
Lender can front-run
rollLoan
and callprovideNewTermsForRoll
with unfavorable termsSummary
Lender can front-run
rollLoan
and result in borrower accepting unfavorable terms.Vulnerability Detail
After a loan is created, the lender can provide new loan terms via
provideNewTermsForRoll
. If they are reasonable, the user can then accept them. However this opens up a risky scenario:rollLoan
to accept themprovideNewTermsForRoll
will an extremely high interest rateImpact
User may get mislead in to accepting unfavorable terms and overpaying interest
Code Snippet
https://github.com/sherlock-audit/2023-08-cooler/blob/main/Cooler/src/Cooler.sol#L192
https://github.com/sherlock-audit/2023-08-cooler/blob/main/Cooler/src/Cooler.sol#L282
Tool used
Manual Review
Recommendation
When calling
rollLoan
let the user pass a parameter consisting of the max interest rate they are willing to accept to prevent from such incidents.The text was updated successfully, but these errors were encountered: