Core Contracts

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

RToken's Mint Event Omits Accrued Interest from total minted amount (`balanceIncrease`)

Summary

The RToken's mint function fails to include accrued interest (balanceIncrease) when emitting the Mint event, causing inaccurate tracking of actual tokens minted to users.

Vulnerability Details

RToken uses a scaled balance system where users receive additional tokens through interest accrual. When minting new tokens to a user who already has a balance, the function calculates both:

  1. New tokens to mint (amountToMint)

  2. Interest accrued on existing balance (balanceIncrease)

However in the current implementation, RToken::mint

uint256 balanceIncrease = 0;
if (_userState[onBehalfOf].index != 0 && _userState[onBehalfOf].index < index) {
// @audit this balanceIncrease is not exposed in anyway to the outside
balanceIncrease = scaledBalance.rayMul(index) - scaledBalance.rayMul(_userState[onBehalfOf].index);
}
_mint(onBehalfOf, amountToMint.toUint128());
// @audit balanceIncrease omitted when emitting Mint event
emit Mint(caller, onBehalfOf, amountToMint, index);

The issue is that the Mint event only includes amountToMint, omitting balanceIncrease.

PoC

  1. Alice has 100 RTokens

  2. Interest accrues (10%)

  3. Alice mints 50 more RTokens

  4. She receives 60 tokens (50 new + 10 interest)

  5. Event only shows 50 tokens minted

Impact

Incorrect accounting in systems relying on Mint events to track token distribution.

Tools Used

Manual review

Recommendations

emit Mint(caller, onBehalfOf, amountToMint + balanceIncrease, index);

or u could also add a separate parameter for the balanceIncrease variable in the Mint event

Updates

Lead Judging Commences

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

RToken::mint emits wrong info in the event

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

RToken::mint emits wrong info in the event

Support

FAQs

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