The DebtToken.sol's burn function only reduces the base debt while ignoring accrued interest, leading to a situation where users cannot fully repay their debt. Once the base debt becomes zero, the remaining interest becomes permanently unrepayable, creating bad debt for the protocol.
The vulnerability exists in the burn function:
The issue manifests in three key components:
Interest Calculation:
The function calculates interest (balanceIncrease) but never uses it
The no-op line amount = amount suggests missing interest handling logic
Debt Display vs Reality:
balanceOf() shows the full debt (base * index)
But burn() only reduces the base debt
Creates a mismatch between displayed and burnable debt
Unrepayable State:
}
When base debt becomes 0:
balanceOf returns 0 (0 * any_index = 0)
Interest debt becomes invisible and unrepayable
Further interest may still accrue but can never be paid
Protocol Level:
Accumulation of bad debt
Inaccurate total debt accounting
Potential protocol insolvency
Affects liquidation calculations
User Level:
Unable to fully repay debts
Trapped in debt positions
Multiple transactions needed for partial repayments
Economic:
Interest keeps accruing on unpayable debt
Protocol's economic model becomes unsustainable
Potential for strategic defaults
Manual code review
Fix Interest Handling:
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.