In the flow LendingPool::_repay the function calls DebtToken::burn. This function contains two issues in handling debt repayment:
interest accrual is not properly added to the repayment amount due to a redundant assignment (amount = amount)
the function burns the non-scaled amount instead of the scaled amount
leading to incorrect debt accounting.
The burn function miss to add balanceIncrease to amount, causing accrued interest to be ignored. Additionally it uses amount instead of amountScaled causing incorrect token burning.
Users can repay less than their actual debt due to unaccounted interest. The protocol's total debt accounting becomes inaccurate over time.
Manual review
Fix interest accrual calculation and useScaled amount for burning.
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.