Closed sherlock-admin closed 1 year ago
sent = provision.amount + (interests / loan.nbOfPositions);
has interests = nbOfOffers * proto.minOfferCost[collatState.assetLent]
as evaluated at borrow time https://github.com/sherlock-audit/2023-02-kairos/blob/main/kairos-contracts/src/BorrowLogic/BorrowHandlers.sol#L180
this simplifies to provision.amount + minOfferCost
so cheating the lender out of its minimal interest is not possible for short times
duc
medium
Borrower can reduce the interest of shortly loans
Summary
Borrower can reduce the interest of quick loans by using multiple own offers.
Vulnerability Detail
interests
of loan will beloan.payment.minInterestsToRepay
.interests == loan.payment.minInterestsToRepay
, the interest will be equally distributed for all lenders.loan.nbOfPositions
will be very large.loanToValue
= 1e18loanToValue
loan.payment.minInterestsToRepay
. Then he can claim with 9 positions from 9 offers, and get 9/10 of the interest. Alice's gets only 1/10 of the interestImpact
The borrowers can reduce the interest to be paid for their quick loans.
Code Snippet
https://github.com/sherlock-audit/2023-02-kairos/blob/main/kairos-contracts/src/ClaimFacet.sol#L99
Tool used
Manual review
Recommendation
Should distribute the minimum interest based on the amount of each offer (povision.amount)