Pool
Create a Pool Instance
- Geode.Portal.pool(poolID: int)
Initilize the Pool object with an existing pool id:
# You need pool id to create pool object poolID = 500191....78 myPool = geode.Portal.pool(poolID)
Pool Ownership
- property Pool.NAME
NAMEis the name of the pool that given from creator of the pool.myPool.NAME # Ice Pool
- property Pool.CONTROLLER
CONTROLLERethereum address of the controller of the poolmyPool.CONTROLLER # '0x2C95BC18Fd9382a07776D416EeF6c2FEb3AD2A8C'
- property Pool.initiated
initiated(uint256) is timestamp of initiation time.myPool.initiated # 1677379164 # (unix seconds)
- property Pool.maintainer
maintainer(address) is the address of the maintainer, set by the owner. Handles day to day operations like delegation of deposited funds.myPool.maintainer # 0x2C95BC18Fd9382a07776D416EeF6c2FEb3AD2A8C
- property Pool.yieldReceiver
yieldReceiver(address) indicates the ethereum address of the reward collecter.Warning
If the
yieldReceiveris not set (or set to0x0000000000000000000000000000000000000000), yield is distributed among token holders.myPool.yieldReceiver # 0x0000000000000000000000000000000000000000
Pool Configuration
- property Pool.withdrawalCredential
withdrawalCredentialis used while creating the validators to propose.Warning
Using modified withdrawalContract is not a safe assumption.
myPool.withdrawalCredential # 0x010000000000000000000000c82ed5ec571673e6b18c4b092c9cbc4ae86c786e
- property Pool.withdrawalContract
Any reward of the pool earns will be sent to this
withdrawalContractethereum address. According to Ethereum standards, this address is also at the end of the withdrawal credentials.myPool.withdrawalContract # 0xc82Ed5eC571673E6b18c4B092c9cbC4aE86C786e
- property Pool.whitelist
Sometimes some maintainers may want to define a
whitelistfor the pool. In this case, you can see it with the whitelist command. If there is no white list, you will see0x0000000000000000000000000000000000000000address.myPool.whitelist # 0x0000000000000000000000000000000000000000
- property Pool.liquidityPool
Address of the
liquidityPool.myPool.liquidityPool # 0xEC5B756326f161bdc6506c16800ddF56765E0f3b
Note
Not all pools have whitelist or liquidityPool features.
- property Pool.private
privateis the boolean value to either the pool is prived pool or public pool.myPool.private # False
Pool Fee
- property Pool.fee
Returns
fee(uint256) How much of the percentage from validator yield will received by the pool owner. DENOMINATOR: 1e10 (100%).myPool.fee # 500000000 # PERCENTAGE_DENOMINATOR = 100%
Note
If the pool owner or maintainer wants to update its
fee, the operations continue from the value namedpriorFeefor a certain period of time after the fee changes so that it does not manipulate the pool momentarily. This period is 3 days and must be kept in the variable namedfeeSwitch. At the end of thefeeSwitchperiod, the updatedfeecomes into play, so users have the freedom to leave the pool according to their own interests.
- property Pool.priorFee
priorFeereplacesfeewhenfeeSwitchis reached.myPool.priorFee # 400000000 # PERCENTAGE_DENOMINATOR = 100%
- property Pool.feeSwitch
feeSwitchis set to 3 days after the function call, meaning there will be 3 days delay on every time fee is changed.myPool.feeSwitch # 1709191201 # (unix seconds)
ERC20 Tokens (middlewares)
- Pool.middlewaresList()
middlewaresListlist of (address)esWarning
To avoid malfunctions, utilizing our standard middlewares is expected by the pool owners.
myPool.middlewaresList() # ['0xdaED82d9a6a0282D9084375eb1Dc8c09440e2aB3']
- Pool.middlewares(index: uint256)
middlewaresreturns you the middleware corresponding to the given index. If the index is too large, it will throw an error.myPool.middlewares(0) # 0xdaED82d9a6a0282D9084375eb1Dc8c09440e2aB3
- property Pool.middlewaresLen
middlewaresLenreturns the length of the middlewaresList. If you want to achieve multiple middlewares, it can be used to set the limits of the loop before executing the above code.myPool.middlewaresLen # 1
Operator Marketplace
- Pool.allowance(operatorId: int)
allowanceallowance’s of the operators that given ID.myOperator = geode.Portal.operator(operatorID) myPool.allowance(operator=myOperator.ID) ## 12
- Pool.validators(index: uint256)
validatorsReturns the pubkey of the validator corresponding to the given index.## In bytes print("Pubkey:",myPool.validators(0)) Pubkey: b'\x93&\xf6\xc0\x7f\x8a\xbd\x08.\xf8+\x19\'\x9c\xbb\xa7ak\x03\x95\xfb\x94}P\xcd-_\xef0=\xd6\x13\xab\xe3\x10\x87\x07zg\xfa\xa4w\xc0c\x1c\xc7"\x8d' ## In hex string print("Pubkey:", myPool.validators(0).hex()) Pubkey: '9326f6c07f8abd082ef82b19279cbba7616b0395fb947d50cd2d5fef303dd613abe31087077a67faa477c0631cc7228d'
- property Pool.validatorsList
Returns
validatorsList(List(bytes32)) All validator pubkeys that registered to this pool.myPool.validatorsList # [b'\x93&\xf6\xc0\x7f\x8a\xbd\x08.\xf8+\x19\'\x9c\xbb\xa7ak\x03\x95\xfb\x94}P\xcd-_\xef0=\xd6\x13\xab\xe3\x10\x87\x07zg\xfa\xa4w\xc0c\x1c\xc7"\x8d']
- property Pool.validatorsLen
validatorsLen(uint256) number of validators in the pool. Size of validatorsList array.myPool.validatorsLen # 1
- Pool.activeValidators(operatorId: int)
activeValidatorsNumber of validators that currently active, according to Portal.myOperator = geode.Portal.operator(operatorID) myPool.activeValidators(operator=myOperator.ID)
Note
More than one operator can work in a pool. And each operator will have their own validators. You can get this information with the operator’s ID.
- Pool.proposedValidators(operatorId: int)
proposedValidatorsNumber of validators that not active, but waiting to be activated, according to Portal.myOperator = geode.Portal.operator(operatorID) myPool.proposedValidators(operator=myOperator.ID)
- Pool.alienValidators(operatorId: int)
alienValidatorsNumber of validators that are dedected as faulty, according to Oracle.myOperator = geode.Portal.operator(operatorID) myPool.alienValidators(operator=myOperator.ID)
Internal Wallet
- property Pool.wallet
- Every ID has its own internal wallet within Portal.It accrues fees, makes things safer and easier for Node Operators when creating validators etc.
wallet(uint256) amount (inwei) in the internal wallet of the poolprint("wallet:",myPool.wallet) # wallet: 10000000000000 # (as wei) (1e18 = 1 ether)
Note
CONTROLLERof an ID can increase the internal wallet by depositing ether withportal.functions.increaseWalletBalance(id).Also, can decrease by reclaiming the ether that is accrued withportal.functions.decreaseWalletBalance(id).
Fallback Operator
Warning
Fallback Operator mechnanism is for advanced users. Most of the applications, will not need these functionalities.
- property Pool.fallbackOperator
fallbackOperator(uint256) is the ID of selected Operator asfallback.myPool.fallbackOperator # 500191....78
- property Pool.fallbackThreshold
fallbackThreshold(uint256) means whenfallbackThreshold``% of allowances are filled, ``fallbackOperatorwill have unlimited allowance.print("fallbackThreshold:",myPool.fallbackThreshold) # 800000000000 # 80% as PERCENTAGE_DENOMINATOR = 100%
More
Next step: Checkout Staking Pool Handbook.