Core Contracts

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

`_mintRAACRewards` is called 2 times when depositing RTokens in the stability pool through `deposit` function, but only one call is needed.

Summary

deposit function in the Stability pool is defined as follows:

function deposit(uint256 amount) external nonReentrant whenNotPaused validAmount(amount) {
_update();
rToken.safeTransferFrom(msg.sender, address(this), amount);
uint256 deCRVUSDAmount = calculateDeCRVUSDAmount(amount);
deToken.mint(msg.sender, deCRVUSDAmount);
userDeposits[msg.sender] += amount;
_mintRAACRewards();
emit Deposit(msg.sender, amount, deCRVUSDAmount);
}

First it calls _update()which will call _mintRAACRewards in order to mint pending RAAC rewards for depositors.

But deposit function calls _mintRAACRewards again, which is superfluous and can be removed.

Impact

The impact of this issue is low.

Tools Used

Manual review.

Recommendations

Remove the second call to _mintRAACRewards which is not necessary.

Updates

Lead Judging Commences

inallhonesty Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
inallhonesty Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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

Give us feedback!