-
Notifications
You must be signed in to change notification settings - Fork 6
y4y - When APR late rate is lower than APR, an OCC locker bullet loan borrower can pay way less interests by calling the loan #97
Comments
1 comment(s) were left on this issue during the judging contest. panprog commented:
|
This is not a valid issue - calling a loan is much different than making a payment as it requires the full amount of principal vs. (in the case of bullet loans) a single payment with interest only |
Yes, it's much different from making a payment, but it still allows to bypass paying additional interests/late fees, for example, when only a few payment periods are remaining and it makes sense to simply Keeping this as medium. |
Sponsor response:
|
This is from docs:
So it's possible that grace period is longer than payment interval. Example: payment interval = 7 days, grace period = 28 days. If lateFee is less than APR, then borrower is better off skipping the last 4 payments and doing Keeping this medium. |
y4y
medium
When APR late rate is lower than APR, an OCC locker bullet loan borrower can pay way less interests by calling the loan
Summary
A bullet loan borrower can pay less interests by calling
callLoan
at the end of payment period.Vulnerability Detail
In
OCC_Modular
contract, the protocol can create loan offers, and users can accept them. The loan has two types, one being bullet, and the other being amortization. In the bullet loan, borrowers only need to pay back interests for each interval, and principle at the last term.amountOwed
returns the payment amount needed for each loan id:And we see, there is a
lateFee
for any loans which is overdue. The later the borrower pays back the loan, the more late fees will be accumulated. Plus, the under writer role can always set the loan to default when it's way passed grace period.callLoan
provides an option for borrowers to payback all he/she owes immediately and settles the loan. In this function,amountOwed
is called once:This means, only one interval's late fee is taken into account for this calculation. When the late fee rate is less than APR, and the payment is way overdue, it's possible for such borrower to skip a few interests and late fee payment.
In the above test cases, all three of them will have the same borrower, and borrow the same loan, with same details and everything. One of them simulating when a borrower pays all charges normally till the end of term, another one waits till the very end to pay back the loan with late fees, and the last one also wait till the end, except calls
callLoan
to settle the loan instead of normally paying back each interval's amount.After running the test cases, the following will be logged:
As we can see, while
callLoan
also needs to pay the late fee penalty, it still charges way less than normally paying back the loan. This makes a borrower being able to skip a few interests fee, with the cost of little late fees.Impact
The PoC provided above is certainly an exaggerated edge case, but it's also possible when late fees are aribitrary, as long as the loan is not set to default by under writers, the borrower can skip paying quite some interest fees by exploiting this at the cost of a few late fees. This is more likely to happen when intervals are set to 7 days, as the minimum grace period is 7 days.
Code Snippet
Tool used
Manual Review, foundry
Recommendation
Prohibits bullet loan borrowers from calling
callLoan
when the loan is late and still has more than 1 intervals to finish.The text was updated successfully, but these errors were encountered: