Core Contracts

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

Inconsistent State Updates

Summary

The _update function is called in some functions (e.g., deposit, withdraw, liquidateBorrower) but not in others (e.g., addManager, removeManager, updateAllocation). This could lead to inconsistent state updates.

Vulnerability Details

function addManager(address manager, uint256 allocation) external onlyOwner validAmount(allocation) {
if (managers[manager]) revert ManagerAlreadyExists();
managers[manager] = true;
managerAllocation[manager] = allocation;
totalAllocation += allocation;
managerList.push(manager);
emit ManagerAdded(manager, allocation);
}
/**
* @notice Removes an existing manager.
* @param manager Address of the manager to remove.
*/
function removeManager(address manager) external onlyOwner {
if (!managers[manager]) revert ManagerNotFound();
totalAllocation -= managerAllocation[manager];
delete managerAllocation[manager];
managers[manager] = false;
_removeManagerFromList(manager);
emit ManagerRemoved(manager);
}

Impact

inconsistent state updates.

Tools Used

Recommendations

Ensure that _update is called in all functions that modify state or interact with external contracts.

Updates

Lead Judging Commences

inallhonesty Lead Judge 4 months ago
Submission Judgement Published
Invalidated
Reason: Design choice
inallhonesty Lead Judge 4 months ago
Submission Judgement Published
Invalidated
Reason: Design choice

Support

FAQs

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