The mint() function incorrectly calculates the amount of debt tokens to mint by adding both unscaled amount and balance increase.
The issue occurs in the mint() function where the minting amount calculation is incorrect.
The function adds the unscaled amount with balanceIncrease instead of using the amountScaled value, which leads to minting excessive debt tokens for borrowers.
All borrowers receive significantly more debt tokens than they should when borrowing against their collateral, leading to systematic loss of funds.
The mint() function should use amountScaled instead of amountToMint when calling the _mint() function to ensure correct debt token minting.
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.