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

Possible loss of ownership

Summary

Possible loss of ownership.

See here a reference for this exact issue.

Vulnerability Details

When transferring the ownership of the protocol, no checks are performed
on whether the new address is valid and active.

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

https://github.com/Cyfrin/2023-07-beedle/blob/main/src/utils/Ownable.sol#L19C4-L22C6

Impact

In case there is a mistake
when transferring the ownership, the whole protocol is locked out of its
permissioned functionalities.

Tools Used

Manual review

Recommendations

The transfer of ownership process should be divided into two separate transactions. The first transaction involves calling the requestTransferOwnership function to propose a new owner for the protocol. The second transaction requires the new owner to accept the proposal by calling the acceptsTransferOwnership function. This approach ensures a secure and controlled transfer of ownership for the protocol.

Support

FAQs

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