Initiating an Operator

Operator ID

Every Operator has a unique ID.

This ID will be used to distinguish you from other entities within Geode.

// 4? the TYPE parameter that defines Operators
const type_operator = 4; 
const pool_ID = Portal.generateId(operator_name, type_operator);

Want to see all the IDs of a type?

const type_operator = 4; 
const type_pool = 5; 
const allIds= Portal.allIdsByType(_type, index);
// index = [0,n] : probably stop calling when you see uint256(0)

What are Maintainers?

Maintainers are useful to automate an operator's daily tasks, such as creating validators!

⛏️Maintainers

Initiate Your Operator!

You can totally do this from Etherscan if you want.

Portal uses an initiator function to set some parameters for your unique ID.

You can send some Ether on initiation! It will be added to your internal wallet.

Internal wallet will come handy on validator creation. Don't worry, you can take it out later.

// EDIT THESE
const fee = 5; // 5%, [0, 10]
const validatorPeriod = 180; // 180 days, [90, 1825]
const maintainer_address= <your_address_here>;
const initial_wallet = 5e18; // you might use Bignumber.js for this one

// KEEP THESE
const denominator = 10**10;
const dayToSecond = 86400;

await Portal.initiateOperator(
    id,
    Math.floor((fee * denominator) / 100),
    validatorPeriod * 86400,
    maintainer_address,
    {value: initial_wallet }
);
  1. ID: your operator ID

  2. FEE: Maintenance fee that will be charged from validator rewards, block rewards, and MEV rewards. 10^10 represents 100%, can be set to up to 10% (10^9). Can be changed later.

  3. Validator Period: Every validator has an expiration date. Should be between 90 - 1825 days, given in seconds. Can be changed later.

  4. Maintainer: Your automation script's address. Can be changed later.

Last updated