Core Contracts

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

Reentrancy Risk in collectFee on FeeCollector.sol

Summary

The collectFee function calls external contracts (such as transferring tokens) and performs state updates afterward. Although the nonReentrant modifier is applied, there's still a potential reentrancy vulnerability because the state update is done after the external call.

Vulnerability Details

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

Impact

This can allow a malicious contract to call back into the collectFee function before the state update, leading to multiple fee collections, potentially draining the contract’s balance.

Tools Used

Recommendations

Always update the state before making external calls to prevent reentrancy attacks. This can be fixed by updating the fee tracking state before transferring the tokens.

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

Lead Judging Commences

inallhonesty Lead Judge 4 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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