Core Contracts

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

Untracked Token Transfers from FeeCollector to Treasury Result in Stuck Funds

Summary

The FeeCollector contract transfers raacToken to the Treasury contract using safeTransfer, but the Treasury contract does not automatically update its _balances and _totalValue state variables. This results in a mismatch between the actual token balance in the contract and the recorded balance, preventing the withdrawal of these funds.

Vulnerability Details

The FeeCollector contract executes:

raacToken.safeTransfer(treasury, balance);

This transfers raacToken to the Treasury contract without calling its deposit function.

  • Since deposit is the only function that updates _balances[token] and _totalValue, the transferred funds are not reflected in the state variables.

  • The withdraw function in Treasury only allows withdrawals up to _balances[token]. Thus, any tokens sent directly from FeeCollector (or any other contract) remain inaccessible.

Impact

Permanent fund lock: Any raacToken transferred from FeeCollector to Treasury is effectively stuck and cannot be withdrawn.

Tools Used

Manual code review

Recommendations

Modify withdraw to consider the actual token balance instead of relying solely on _balances[token]

Updates

Lead Judging Commences

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

FeeCollector::_processDistributions and emergencyWithdraw directly transfer funds to Treasury where they get permanently stuck

Support

FAQs

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