Core Contracts

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

Uncallable `mintRewards` Function in RAACMinter.sol

Summary

The mintRewards function in RAACMinter.sol is intended to be called exclusively by the stabilityPool. However, there is no invocation of mintRewards within StabilityPool.sol, rendering the function uncallable. As a result, rewards cannot be minted as intended.

Vulnerability Details

In RAACMinter.sol, the function mintRewards is restricted to be callable only by the stabilityPool. However, upon reviewing StabilityPool.sol, there is no reference to mintRewards, which means that no contract actually calls this function. This results in the minting mechanism for RAAC tokens being non-functional, preventing the distribution of rewards.

Code Reference

In RAACMinter.sol:

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);
}

In StabilityPool.sol, there is no function that invokes mintRewards, effectively leaving it unused.

Impact

Rewards are never minted, preventing users from receiving incentives.

Tools Used

Manual code review

Recommended Mitigation

To resolve this issue, ensure that StabilityPool.sol properly calls mintRewards when appropriate.

Updates

Lead Judging Commences

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

RAACMinter::mintRewards function is never called by StabilityPool despite being the only authorized caller, leaving intended reward functionality unused

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

RAACMinter::mintRewards function is never called by StabilityPool despite being the only authorized caller, leaving intended reward functionality unused

Support

FAQs

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