MorpheusAI

MorpheusAI
Foundry
22,500 USDC
View results
Submission Details
Severity: low
Valid

`createPool` on `DistributionV2` lack of role modifier unlike `Distribution` contract, thus open for public to create pool

Summary

createPool on DistributionV2 lack of role modifier, open for public to create pool

Vulnerability Details

createPool on DistributionV2 lack of role modifier, thus anyone can create pool, unlike Distribution contract which has onlyOwner.

File: DistributionV2.sol
18: function createPool(IDistribution.Pool calldata pool_) public {
19: pools.push(pool_);
20: }
File: Distribution.sol
73: function createPool(Pool calldata pool_) public onlyOwner {
74: require(pool_.payoutStart > block.timestamp, "DS: invalid payout start value");
75:
76: _validatePool(pool_);
77: pools.push(pool_);
78:
79: emit PoolCreated(pools.length - 1, pool_);
80: }

This is clearly a missed oversight, opening createPool accessible by public

Impact

Anyone can create pool which is not expected by protocol

Tools Used

Manual analysis

Recommendations

Add onlyOwner modifier just like Distribution::createPool

Updates

Lead Judging Commences

inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

`createPool` from DistributionV2.sol misses all the checks and access control available in Distribution.sol

inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

`createPool` from `DistributionV2.sol` misses all the checks and access control available in `Distribution.sol`

Support

FAQs

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