geonius internal structure is explained.
Pool owners can delegate any amount of validators to Node Operators. When there are enough funds (32 ETH per validator) in the pool, any of the Node Operators that is registered in the Operator Marketplace, can create validators up to their allowance.
Then,
- Validator pubkey is proposed by the Node Operator
- Initiates the validator on beaconchain.
- Operator uses 1 eth to secure the proposal, no funds leave the staking pool yet.
- The proposal is approved by the Oracle.
- This happens regularly with at most 24 hours delay.
- The Node Operator finalizes the validator creation.
- Node Operator gets the 1 ETH back into their internal wallet.
To make the above process happen we use multiple daemons which just mostly watch the Portal smart contract for events, or the beacon chain for changes.
There are 3 type of daemons:
- Time Daemon: triggers the provided task every x second.
- Block Daemon: triggers the provided task every x block.
- Event Daemon: triggers the provided task every time there is a new event from the provided smart contract. Mostly, Portal or gETH contracts.
Watches the IdInitiated events.
Triggered when a new pool is created. Creates and/or updates the new pool on the database.
Checks if there are any new possible validators to propose.
Watches the Deposit events.
Triggered when there is a new deposit for the pool, which increases the surplus.
Updates the database with the latest info.
Checks if there are any new possible validators to propose for given pool.
Watches the Delegation events.
Triggered when a pool changes the Allowance for the operator.
Updates the database with the latest info by saving delegation events.
Checks if there are any new possible validators to propose.
Watches the FallbackOperator events.
Triggered when a pool changes it's fallback operator.
Checks if there are any new possible validators to propose.
Watches the StakeProposal events.
Triggered when a new validator is proposed.
Just updates the validator on the database, when the deposit is processed by the beacon chain.
Watches the Stake events.
Triggered when a validator is activated on Portal.
Only functions to update the validator on the database when the balance change is detected on the beacon chain.
Watches the Alienated events.
Alienation is important because when a validator is Alienated it's Operator will be prisoned.
This is a time daemon that runs every 15 minutes.
It checks if a deposit is processed according to the provided filter. Then, it updates the database accordingly.
Watches the ExitRequest events.
Inititates the validator exit.
