Incorrect amountToMint
calculation in DebtToken::mint()
In DebtToken::mint(), we will mint debt token for the borrowers. In the mint()
function, we will calculate the borrow interest from last borrow timestamp to current block.timestamp and mint the debt token for these borrow interest. This is incorrect. We should not mint any extra debt tokens for these borrow interest. Because the debt token is the normalized token.
Although we mint more debt token for the borrower, this will not have the impact for the borrower's position's health status. Because we will use user.scaledDebtBalance
to record the normalization debt in lending pool.
The actual impact here is that we mint more debt token than expected. And we will use the debt token's totalSupply
to record the reserve.totalUsage
. And we will use reserve.totalUsage
to record the asset utilization. This will cause that the asset utilization is higher than expected, because we have one higher total debt than expected.
The utilization may be higher than expected. Borrowers need to pay more interest than expected.
Manual
Do not mint the debt token for the accrued borrow intereset.
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.