As per the docs/natspec :
This contract aligns with Aave's VariableDebtToken implementation, scaling balances by the usage index.
So basically there is an index - _usageIndex which is always used with the supplied amount for the scaling purpose. So the mint and burn are expected to have the amount + balanceIncrease which is calculated based on delta index. It is implemented in the mint function however, it seems like in the burn the developers forgot to add the balanceIncrease for the burn function.
mint() function code :
burn() function code :
Burn less tokens than intended
Manual review
Add this to burn function code :
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.