Sparkn

CodeFox Inc.
DeFiFoundryProxy
15,000 USDC
View results
Submission Details
Severity: medium

ProxyFactory Contract never initializes the owner for Ownable.sol

Summary

The latest update of OZ's Ownable.sol now requires the owner to be explicitly set, rather than assuming msg.sender as before.
The current implementation never passes the owner as a parameter when initializing the Ownable contract, this leaves the contract's owner to be left as address(0).
This makes setContest, deployProxyAndDistributeByOwner and distributeByOwner to be completely nonfunctional

Vulnerability Details

constructor(address initialOwner) {
_transferOwnership(initialOwner);
}

The Ownable.sol constructor now requires the owner to be explicitly set rather than always defaulting to msg.sender.

Impact

Key functionalities like setContest, deployProxyAndDistributeByOwner and distributeByOwner will be non functional

Tools Used

Manual Review

Recommendations

Call the Ownable.sol constructor to set the owner or implicitly specify the version to import, if the plan is to make use of an older version, where owner is set to the deployer/msg.sender by default.

Support

FAQs

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