Core Contracts

Regnum Aurum Acquisition Corp
HardhatReal World AssetsNFT
77,280 USDC
View results
Submission Details
Severity: low
Valid

Incorrect Burn Amount Emitted in `DebtToken.burn()` Event

Summary

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.

Vulnerability Details

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

uint256 amountScaled = amount.rayDiv(index);
if (amountScaled == 0) revert InvalidAmount();
_burn(from, amount.toUint128());
emit Burn(from, amountScaled, index);

Impact

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.

Tools Used

vscode

Recommendations

Emit the actual burned amount (amount) in the Burn event instead of the scaled value (amountScaled).

Updates

Lead Judging Commences

inallhonesty Lead Judge 2 months ago
Submission Judgement Published
Validated
Assigned finding tags:

DebtToken::burn emits Burn event with scaled amount instead of raw amount, contradicting documentation and causing incorrect off-chain data

inallhonesty Lead Judge 2 months ago
Submission Judgement Published
Validated
Assigned finding tags:

DebtToken::burn emits Burn event with scaled amount instead of raw amount, contradicting documentation and causing incorrect off-chain data

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.