In the burn function of the DebtToken contract, the calculated balanceIncrease (accrued interest) is not added to the burn amount, leading to incorrect burn calculations and potential accounting discrepancies.
The issue occurs in the interest calculation section:
The problem exists because:
The code calculates balanceIncrease correctly
But then has a no-op assignment amount = amount
The balanceIncrease should be added to amount to account for accrued interest
This leads to burning less than the actual debt amount
Correct implementation should be:
Users burn less debt tokens than they should
Accrued interest is not properly burned
Protocol's debt accounting becomes inaccurate
Creates discrepancy between actual debt and recorded debt
Could lead to unbacked debt in the system
Users might retain debt tokens that should have been burned
Manual Review
Interest IS applied through the balanceOf() mechanism. The separate balanceIncrease calculation is redundant/wrong. Users pay full debt including interest via userBalance capping.
Interest IS applied through the balanceOf() mechanism. The separate balanceIncrease calculation is redundant/wrong. Users pay full debt including interest via userBalance capping.
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.