The mint function in DebtToken.sol returns amountToMint (which includes interest) instead of amountScaled as specified in its documentation, violating the function's interface specification.
The mint function's documentation specifies that it should return the amount of scaled tokens minted as its second return value:
https://github.com/Cyfrin/2025-02-raac/blob/89ccb062e2b175374d40d824263a4c0b601bcb7f/contracts/core/tokens/DebtToken.sol#L167
The function calculates amountScaled correctly but returns amountToMint which includes both the new amount and accrued interest. This doesn't match the documented behavior which should return the scaled amount of new tokens minted.
Low. While this is technically incorrect and violates the interface specification with the lending pool receiving this variable after the minting, it is not used.
Return amountScaled instead of amountToMint to match the documented behavior:
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.