In the DebtToken's mint function, there is a critical error in calculating amountToMint
. The function incorrectly adds the raw amount
with balanceIncrease
the mint() function contains following lines of code
amount
is the raw, unscaled input amount
balanceIncrease
is already scaled according to the index
Adding these mismatched values leads to incorrect debt token minting
Incorrect Debt Accounting: Users will receive excessive amounts of debt tokens due to mixing scaled and unscaled values, as unscaled amount
is way higher than amountScaled
.
Protocol Insolvency Risk: The mismatch between actual debt and minted tokens could lead to protocol insolvency
Instead of amount
use amountScaled
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.