The mint()
function is responsible for minting tokens based on the scaled debt balance. However, it does not include balanceIncrease
in the amountToMint
before updating the index and minting the tokens. This means that accrued interest is not accounted for correctly, leading to incorrect token balances and potential loss of rewards.
The function calculates balanceIncrease
, which represents the accumulated interest from the previous index to the new index. However, balanceIncrease
is not added to amountToMint
before updating the index and minting, this results in under-minting and incorrect reward calculations.
The system does not account for previously accrued interest when minting, leading to an incorrect balance.
Manual Review
Modify the _mint()
function call to correctly account for accrued interest:
The balanceIncrease is the interest that has already accrued on the user's existing scaledBalance since their last interaction. It's not something you mint as new tokens in the _mint function.
The balanceIncrease is the interest that has already accrued on the user's existing scaledBalance since their last interaction. It's not something you mint as new tokens in the _mint function.
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.