Core Contracts

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

Incorrect parameters return order during RToken minting

Summary

Currently the functions returns the variables in the following order:

return (isFirstMint, amountToMint, totalSupply(), amountScaled); //@audit swap places amountToMint and amountScaled

The natspec specifies the following oder:

* @return A tuple containing:
* - bool: True if this is the first mint for the recipient, false otherwise
* - uint256: The amount of scaled tokens minted
* - uint256: The new total supply after minting
* - uint256: The amount of underlying tokens minted

Vulnerability Details

Impact

The Deposit event in the lending pool will emit the underlying tokens minted instead of the scaled amount.

Tools Used

Manual review.

Recommendations

Swap the order to match what is specified in the comments.

Updates

Lead Judging Commences

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

RToken::mint doesn't return data in the right order, making the protocol emit wrong events

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

RToken::mint doesn't return data in the right order, making the protocol emit wrong events

Support

FAQs

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