burn function in DebtToken contract is defined as follows:
The issue arises because balanceIncrease is incorrectly computed. Indeed, userBalance corresponds to the balance in underlying asset units (after one index multiplication). But userBalance is then multiplied again by the index, which is incorrect and corresponds to a double multiplication scaling by the index.
balanceIncrease is wrongly computed, with an over-estimated result. Consequences are not important because balanceIncrease return value is never used. Originally, aToken AAVE implementation uses balanceIncrease for event emission to track balance variations.
The impact of this issue is low.
Manual review.
Make sure to properly compute balanceIncrease and properly use it.
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.