Core Contracts

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

Missing Reward Token Transfer in createMarket Function

Summary

The createMarket function does not transfer the specified reward tokens (RAACToken) to the newly created market. This could result in the market being initialized without sufficient rewards, potentially leading to unexpected behavior when users interact with it.

Vulnerability Details

function createMarket(address _quoteAsset, uint256 _lockDuration, uint256 _reward) external onlyOwner {
if (_quoteAsset == address(0)) revert InvalidQuoteAsset();
if (_lockDuration == 0 || _lockDuration > MAX_LOCK_DURATION) revert InvalidLockDuration();
if (_reward == 0 || _reward > MAX_REWARD) revert InvalidReward();
marketCount++;
markets[marketCount] = Market(IERC20(_quoteAsset), _lockDuration, _reward, 0);
emit MarketCreated(marketCount, _quoteAsset, _lockDuration, _reward);//@audit create markey not transfer reward token raactoken into it.
}
  • The function allows the owner to create a new market by specifying a _quoteAsset, _lockDuration, and _reward amount.

  • However, while _reward is set in the market’s storage, there is no actual token transfer from the caller (msg.sender or contract owner) to the market contract.

  • This means the reward pool remains unfunded, and users expecting to receive rewards may not be able to claim them.

Impact

user is unable to redeem assets

Tools Used

Foundry

Recommendations

deposit reward token into marketCreator

Updates

Lead Judging Commences

inallhonesty Lead Judge 4 months ago
Submission Judgement Published
Invalidated
Reason: Out of scope
inallhonesty Lead Judge 4 months ago
Submission Judgement Published
Invalidated
Reason: Out of scope

Support

FAQs

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