Core Contracts

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

no checks for amount in allocatefunds function in treasury

Summary

in treasury contract allocatefunds function should be check the msg.sender have amount to allocate tot he recipient.

Vulnerability Details

in that function

function allocateFunds(
address recipient,
uint256 amount
) external override onlyRole(ALLOCATOR_ROLE) {
if (recipient == address(0)) revert InvalidRecipient();
if (amount == 0) revert InvalidAmount();
// here it should check allocater or msg.sender carry that much amount
_allocations[msg.sender][recipient] = amount;
emit FundsAllocated(recipient, amount);
}

this function should check msg.sender should check the amount which is going to allocate.

Impact

without check the amount 'msg.sender' carry or not that is missing so even if msg.sender does not have that amount it gets allocated over their.

Recommendations

add check for amount of msg.sender which he going to allocate money.

Updates

Lead Judging Commences

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

Treasury::allocateFunds doesn't say what token you are actually allocating, doesn't check balances, or existing allocations to other recipients

Support

FAQs

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