Core Contracts

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

Collect Fee is not enforced anywhere so no proper accounting can be done for distribution

Summary

In feeCollector.sol function CollectFee is not enforced anywhere so the proper collection and accounting will not happen .

Vulnerability Details

collectFee function purpose is to collect fees for the protocol and its stakers , but its not enforced anywhere .
feeCollector.sol is dependant on this function to record the type and amount of fees through _updateCollectedFees for distribution of rewards for users and sending it to the different types of funds that would not be feasable as is not used anywhere .

function collectFee(uint256 amount, uint8 feeType) external override nonReentrant whenNotPaused returns (bool) {
if (amount == 0 || amount > MAX_FEE_AMOUNT) revert InvalidFeeAmount();
if (feeType > 7) revert InvalidFeeType();
// Transfer tokens from sender
raacToken.safeTransferFrom(msg.sender, address(this), amount); //@note this function could be used to inflate rewards or some shit think in the future
// Update collected fees
_updateCollectedFees(amount, feeType);
emit FeeCollected(feeType, amount);
return true;
}

Impact
not enforcing the function anywhere to properly account for distribution of fee amount to correspoding fee type will render the functionality of FeeCollector.sol useless .

the only reference i see for sending the tax amount to feeCollector.sol is through RaacToken.sol function burn and function _update where both are sending the tax Directly to feeCollector not using the CollectFee to account properly the received amount of tax for distribution .
https://github.com/Cyfrin/2025-02-raac/blob/89ccb062e2b175374d40d824263a4c0b601bcb7f/contracts/core/tokens/RAACToken.sol#L80-L87,
https://github.com/Cyfrin/2025-02-raac/blob/89ccb062e2b175374d40d824263a4c0b601bcb7f/contracts/core/tokens/RAACToken.sol#L185-L205.

Tools Used

manual review

Recommendations

call CollectFee function when tax is applied and needs to be collected instead of Feecollector address .

Updates

Lead Judging Commences

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

RAACToken::burn sends tax directly to FeeCollector without using collectFee(), causing tokens to bypass accounting and remain undistributed. `collectFee` is not used anywhere.

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

RAACToken::burn sends tax directly to FeeCollector without using collectFee(), causing tokens to bypass accounting and remain undistributed. `collectFee` is not used anywhere.

Support

FAQs

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