Core Contracts

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

the share that was transfered to the treasury will be locked in the treasury contract

Summary

Vulnerability details

this is the function that transfered the share to the treasury

function _processDistributions(uint256 totalFees, uint256[4] memory shares) internal {
uint256 contractBalance = raacToken.balanceOf(address(this));
if (contractBalance < totalFees) revert InsufficientBalance();
if (shares[0] > 0) {
uint256 totalVeRAACSupply = veRAACToken.getTotalVotingPower();
if (totalVeRAACSupply > 0) {
TimeWeightedAverage.createPeriod(
distributionPeriod,
block.timestamp + 1,
7 days,
shares[0],
totalVeRAACSupply
);
totalDistributed += shares[0];
} else {
shares[3] += shares[0]; // Add to treasury if no veRAAC holders
}
}
if (shares[1] > 0) raacToken.burn(shares[1]);
if (shares[2] > 0) raacToken.safeTransfer(repairFund, shares[2]);
>> if (shares[3] > 0) raacToken.safeTransfer(treasury, shares[3]);
}

the processdistributions function in feecollector.sol contracts makes some transfer of the treasury share to the treasury contract, but in the treasury contract there is no way to remove the shares from the contract, the issue here is that the treasury share that was transfered to the treasury contract will be locked in the contract

link to the affected contract

https://github.com/Cyfrin/2025-02-raac/blob/89ccb062e2b175374d40d824263a4c0b601bcb7f/contracts/core/collectors/Treasury.sol#L2

Impact

since there is no way to track, update and withdraw the treasury share that was transfered into the treasury contract, the shares will be locked in the contract

Tools Used

manual review

Recommendations

implement a way to update and remove(withdraw) the treasury share from the treasury contract

Updates

Lead Judging Commences

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