Core Contracts

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

RAACMinter.mintRewards() emits incorrect event value when called

Summary

RAACMinter.mintRewards() emits incorrect event value when called

Vulnerability Details

RAACMinter.mintRewards() mint raacTokens if input amount is higher than excessTokens, the function emits RAACMinted event with the input amount value as parameter, however this is not the number of minted tokens.

Impact

Event is emitted with wrong value, the tokens that really were minted are not correctly represented.

Tools Used

Manual review

Recommendations

Use the correct parameter value for the event:

function mintRewards(address to, uint256 amount) external nonReentrant whenNotPaused {
if (msg.sender != address(stabilityPool)) revert OnlyStabilityPool();
uint256 toMint = excessTokens >= amount ? 0 : amount - excessTokens;
excessTokens = excessTokens >= amount ? excessTokens - amount : 0;
if (toMint > 0) {
raacToken.mint(address(this), toMint);
}
raacToken.safeTransfer(to, amount);
- emit RAACMinted(amount);
+ emit RAACMinted(toMint);
}
Updates

Lead Judging Commences

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

RAACMinter.mintRewards() emits incorrect event value when called

suggestion is something that is done by ERC20.mint() function

Appeal created

inallhonesty Lead Judge 3 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

RAACMinter.mintRewards() emits incorrect event value when called

suggestion is something that is done by ERC20.mint() function

Support

FAQs

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