20,000 USDC
View results
Submission Details
Severity: medium
Valid

Ownable: Does not implement 2-Step-Process for transferring ownership

Summary

Ownership of the contract can easily be lost when making a mistake when transferring ownership.

Vulnerability Details

The contract at path src/utils/Ownable.sol does not implement a 2-Step-Process for transferring ownership. So 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. Refer the above Ownable2Step.sol for more details.

Impact

Ownership can be lost

Tools Used

Manual

Recommendations

Implement 2-Step-Process for transferring ownership.

Support

FAQs

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