The amountToMint
should be calculated using amountScaled
instead of amount
to ensure that the minting process correctly reflects the interest accrued. Using amount directly would ignore the scaling factor, leading to incorrect debt token balances. amountScaled
represents the amount of debt tokens to be minted, scaled by the usage index. This scaling is necessary to account for the interest accrued over time, which is represented by the usage index.
The usage index represents the cumulative interest accrued over time. It scales the debt balances to account for this interest. When minting debt tokens, the amount needs to be scaled by dividing it by the current usage index. This ensures that the debt tokens minted reflect the correct amount of debt, including the interest accrued.
Debt tokens minted do not reflect the correct amount of debt, including the interest accrued.
Use amountScaled
instead of amount
when calculating amountToMint
:
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.