Core Contracts

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

In DebtToken.sol contract `_update` function emit `amount` in place of `scaledAmount`

Summary

in DebtToken.sol contract _update function emits amount but while updating it uses scaledAmount . so the emit amount is different .

Vulnerability Details

In DebtToken.sol contract _update function emits amount but while updating it uses scaledAmount . so the emit amount is different .

In super._update it takes scaledAmount and updates the parameters , but while emiting it emits amount .

super._update(from, to, scaledAmount);
emit Transfer(from, to, amount);// q why emit amount not scaledAmount .
function _update(address from, address to, uint256 amount) internal virtual override {
if (from != address(0) && to != address(0)) {
revert TransfersNotAllowed(); .
}
uint256 scaledAmount = amount.rayDiv(ILendingPool(_reservePool).getNormalizedDebt());
super._update(from, to, scaledAmount);
emit Transfer(from, to, amount);// q why emit amount not scaledAmount .

https://github.com/Cyfrin/2025-02-raac/blob/89ccb062e2b175374d40d824263a4c0b601bcb7f/contracts/core/tokens/DebtToken.sol#L263

Impact

  1. It will emit the amount in place of scaledAmount .

Tools Used

Manual Review

Recommendations

  1. Emit the scaledAmount in place of amount .

Updates

Lead Judging Commences

inallhonesty Lead Judge 3 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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