The DebtToken contract's mint function contains an accounting error where interest is double-counted, leading to borrowers being overcharged when borrowing again . This occurs because accrued interest is both added directly to the operation amount and then scaled again by the current interest index.
The vulnerability exists in debtToken contract , in its mint function, where interest is accounted for twice:
First through direct addition of balanceIncrease to the operation amount
Then through scaling by the current interest index
In mint():
Consider a scenario where :
Initial debt: 100 tokens
Interest index increase: 1.0 → 1.1 (10% interest)
New borrow amount: 50 tokens
Current Implementation (Incorrect):
Correct Implementation:
Double interest accounting causes Users get charged extra interest immediately , the impact depends on how much the index have grown , the more the UsageIndex the more the user gets charged unfairly.
Manual code review
Mathematical analysis
Remove direct interest addition in mint :
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.