the burn() function in DebtToken contract, calculates balanceIncrease which is part of return tuple.
userBalanceis already scaled as balanceOf()function already internally multiplies with the index.
multiplying userBalanceagain in balanceIncreasecalculation is incorrect, it over inflates the variable wrongly.
due to double multiplication with index, balanceIncrease variable stores inflated value. this can cause further accounting problem wherever balanceIncrease variable is used.
manual review
adjust the balanceIncrease calculations correctly. divide the userbalance with the index before multiplying with another index.
for example:
balanceIncrease = userBalance* (borrowIndex - _userState[from].index) / borrowIndex
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.