Changing Your Pool's Owner

CONTROLLER

The "CONTROLLER" key stands for the owner of the ID of a given staking pool.

Who Is the Current Owner?

 const getBytes32 = (key) => {
    return ethers.utils.formatBytes32String(key);
  };

const owner = Portal.readAddressForId(id, getBytes32("CONTROLLER"))

Set a New Owner

1. Which address is the new owner?

This might be a developer's address, a developers' multisig, or a token address.

2. Double check the address of your new Controller.

3. Call changeIdCONTROLLER() in Portal with the ID of your Pool, and the address of your new Controller.

Portal.changeIdCONTROLLER(uint256 id, address newCONTROLLER)

4. Change the Owner of Your Withdrawal Contract

Since the Withdrawal Contracts do not trust Portal, you will need to transfer its ownership as well.

const getBytes32 = (key) => {
    return ethers.utils.formatBytes32String(key);
};

const wcAddress = Portal.readAddressForId(id, getBytes32("withdrawalContract");

await wcAddress.changeController(newController);

If your Pool's Owner is not the Withdrawal Pool's Owner, it will go into Recovery Mode until you change it's ownership:

Changing your Controller is easy, however it will override the ability of the previous Controller immediately.

After changing your CONTROLLER, you will not be able to take this action back by using your old CONTROLLER address.

Last updated