At DebtToken::mint()
, the balanceIncrease
is wrongly calculated as the code does a rayMul()
twice over the scaledBalance of a user.
This happens because when fetching scaledBalance
here. Balance of is called which already multiplies by index, see here.
And then in the next lines of code, if some debt was accrued and a balanceIncrease
must be calculated the code uses the same scaledBalance
multiplied again, see here.
User is minted more accrued debt than it should.
Only do the rayMul()
once when calculating the balanceIncrease
.
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.