Sparkn

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

Use 2 step Ownable by OpenZeppelin

Summary

The contracts ProxyFactory.sol does not implement a 2-Step-Process for transferring ownership which can result in lose of ownership.

Vulnerability Details

Ownership of the contract can easily be lost when making a mistake when transferring ownership. Since the privileged roles have critical function roles assigned to them. Assigning the ownership to a wrong user can be disastrous.

So Consider using the Ownable2Step contract from OZ (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable2Step.sol) instead. The way it works is there is a transferOwnership to transfer the ownership and acceptOwnership to accept the ownership.

##Impact

If ownership is lost, The onlyOwner functions like setContest, deployProxyAndDistributeByOwner and distributeByOwner will be inaccessible.

Tools Used

Manual Review

Remediation Steps

Implement 2-Step-Process for transferring ownership via Ownable2Step contract from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable2Step.sol)

Support

FAQs

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