The DebtToken.sol contract incorrectly includes accrued interest in the amount being minted, which results in double interest accrual since this interest amount is being minted as new debt.
In DebtToken.sol, when minting new tokens, the contract adds the accrued interest to the amount being minted:
The _mint function will then call the overridden _update function the RAAC team wrote that will scale down the amount.
Looking at Aave's implementation, the balanceIncrease (accrued interest) is only used for event emission purposes and not included in the actual minting:
Users accrue double interest since the interest is being minted as new debt
Makes the debt accounting system incorrect
Affects all users who have existing debt positions when taking on new debt
Modify the minting logic to match Aave's implementation, where balanceIncrease is only used for event emission:
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.