The DebtToken.burn() function burns a specified amount of debt tokens but emits a Burn event with an incorrect burn amount (amountScaled). The amountScaled value represents the scaled version of the burned amount, which does not accurately reflect the actual amount burned. This discrepancy can mislead users and external systems monitoring the contract events.
The Burn event emits amountScaled, which is calculated as amount.rayDiv(index). This scaled value does not represent the actual amount of debt tokens burned.
The actual amount burned is amount, but the event logs the scaled value, leading to incorrect information in the event logs.
contracts/core/tokens/DebtToken.sol:206~211
Users and external systems relying on the Burn event will see an incorrect burn amount, leading to confusion and potential misinterpretation of the contract's state.
vscode
Emit the actual burned amount (amount) in the Burn event instead of the scaled value (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.