Help please? possible scam?

Hello! I have recently found a BSC smart contract that has a “transferOwnership” function
So, I just started with smart contract programming 201, and I was wondering, why would anyone want to be able to transfer the ownership of the contract?
In my mind this seems like a rugpull?
Can someone explain please?

function in contract:

    /**
     * @dev Allows the current owner to transfer control of the contract to a newOwner.
     * @param _newOwner The address to transfer ownership to.
     */
    function transferOwnership(address _newOwner) public onlyOwner {
        require(_newOwner != address(0));
        emit onOwnershipTransferred(owner, _newOwner);
        owner = _newOwner;
    }

Here’s the link to the full code:
https://bscscan.com/address/0x05137854F050e809F0Bf013d60BDb89bB18Cd580#code

update: also I’ve found that the contract owner is just a regular wallet address… isn’t this extra dangerous as well?
here’s the link for the owner address:
https://bscscan.com/address/0x1a4f8f8e2669b87d5d017dda4cdc46acff34953c

Hi @Alex_Chaz

Actually transferOwnership is quite common and is also included in the openzeppelin ownable contract:
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol

Imagine I am coding a contract for you, I deploy it and once you pay me I can transfer the ownership to you.

Also we are in a team, and the guy the deployed the contract is fired or finds another job, he will need to move the ownership to someone else.

Cheers,
Dani

2 Likes