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

Two-step owner transferring in contract `Ownable`

Summary

The focus is on assessing whether the contract follows the preferred practice of a two-step ownership transfer, which enhances security and minimizes risks associated with abrupt ownership changes.

Vulnerability Details

This implementation allows the owner to transfer ownership directly to a new address. However, a two-step ownership transfer is generally preferred for enhanced security.

function transferOwnership(address _owner) public virtual onlyOwner {
owner = _owner;
emit OwnershipTransferred(msg.sender, _owner);
}

Impact

The absence of a two-step ownership transfer process may lead to accidental Ownership Loss. If an incorrect address is provided, ownership could be irrevocably lost.

Tools Used

Manual review

Recommendations

Consider implementing a two-step ownership transfer process where the new owner must first be nominated and then accept the ownership.

Support

FAQs

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