Core Contracts

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

Improper Validation of Fee Amount in collectFee on FeeCollector.sol

Summary

The collectFee function does not check if the fee amount exceeds the available balance in the contract. This could allow users to collect more tokens than are available in the contract.

Vulnerability Details

raacToken.safeTransferFrom(msg.sender, address(this), amount);

Impact

This could lead to an overdraw of the contract balance, causing issues in distributing fees or paying rewards.

Tools Used

Recommendations

Validate that the contract has enough balance before transferring tokens from the sender. This ensures that the contract does not accumulate more fees than it can distribute.

uint256 contractBalance = raacToken.balanceOf(address(this));
if (amount > contractBalance) revert InsufficientBalance();
raacToken.safeTransferFrom(msg.sender, address(this), amount);
Updates

Lead Judging Commences

inallhonesty Lead Judge 4 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.