Pool

StakeWise Pool smart contract details.

The Pool contract is an entry point for deposits into the StakeWise Pool. This contract stores ETH collected from the users before it is sent to the ETH2 Validator Registration Contract.

Add Deposit

By calling the addDeposit function in the Pool contract, the user will add ether to the Pool. The contract will mint stETH tokens 1 to 1 with the deposited amount. For example, if you deposited 10 ether, you will get 10 stETH that represents the amount of ETH you staked in the StakeWise Pool.

Register Validator

When there is 32 ETH or more collected in the Pool contract, a user with an operator role can register a new validator. It is possible to create multiple validators in one batch if there is enough ether collected. In order to register a new validator, the operator must generate the deposit data for every validator and submit it by calling the registerValidator function. Note that the StakeWise Pool will use its own withdrawal credentials, which remain the same for every Pool's validator. The withdrawal credentials are stored in the Settings contract and the private key is distributed among trusted entities and stored in the cold storage. This method of custody will be replaced with a different mechanism as soon as withdrawal to ETH1 addresses becomes supported.

Operator generates deposit data for every validator and initiates validator registration

The operator runs in the cluster and listens to the Pool's events. As soon as there is enough ETH collected, the operator will spin up the validator nodes and register their deposit data through the Pool contract. The Validators contract keeps track of all the validators registered by the Pool and Solos contracts. It rejects registering the validators with already used public keys as there should be only one validator registration call per public key. The ETH2 Validator Registration Contract is an official contract for registering new validators.