StakeWise
Search…
Pool
StakeWise Pool smart contract details.
The Pool contract is an entry point for deposits into the StakeWise Permissioned Pool. This contract stores ETH collected from the users before it is sent to the ETH2 Validator Registration Contract.
Interactions with the Pool contract are limited only to the addresses included in the WhiteListManager contract.

Stake

By calling the stake function in the Pool contract, the user will add ether to the Permissioned Pool. The contract will mint psETH (permissioned staked ETH) tokens 1 to 1 with the deposited amount of ETH. For example, if the user deposited 10 ether, they would get 10 psETH that represents the amount of ETH they staked in the StakeWise Permissioned Pool.
The user's address must be included in the whitelistedAccounts list contained in the WhiteListManager contract in order to call the stake function and receive psETH tokens. The call will fail if the caller's address or the token recipient's address have not been added to the whitelistedAccounts list.

Variations of stake function

There are variations of the stake function available in the contract, such as:
  • stakeOnBehalf - allows to set a recipient address that is different to the caller address.
  • stakeWithPartner - allows to continuously reward a partner address with a portion of the revenue generated from the user.
  • stakeWithPartnerOnBehalf - allows to continuously reward a partner address with a portion of the revenue generated from the user, while setting a recipient address that is different from the caller address.
  • stakeWithReferrer - allows to reward a referrer address with a pre-agreed lump-sum payment.
  • stakeWithReferrerOnBehalf - allows to reward a referrer address with a pre-agreed lump-sum payment, while setting a recipient address that is different from the caller address.

Timing of minting psETH

While the functionality explained below has been included in the contract, for the purposes of a smoother customer experience minActivatingDeposit & pendingValidatorsLimit variables have been set to their upper limit.
In other words, psETH tokens are expected to be minted immediately upon staking at all times.
The timing of minting psETH for the user depends on several parameters:
  • the value of minActivatingDeposit variable, set by the Admin role using setMinActivatingDeposit function in the Pool contract;
  • the value of pendingValidatorsLimit variable, calculated based on the proportion of pending validators relative to the total number of validators, set by the Admin role using setPendingValidatorsLimit function in the Pool contract.
If the amount of ETH staked by the user is lower than minActivatingDeposit, the psETH tokens will be minted for the user immediately.
If the amount of ETH staked by the user is higher than minActivatingDeposit, but the total number of pending validators as a result of the user's deposit is lower than pendingValidatorsLimit, the psETH tokens will be minted for the user immediately.
Else, the user will be required to wait until the validators that contain their stake have been activated to receive the psETH tokens. To receive the tokens, the user will need to call the activate or activateMultiple functions.

Register Validator

When there is 32 ETH or more collected in the Pool contract, users with an Oracle role can register a new validator. Oracles are automated entities that run off-chain and listen to the Pool's events. As soon as there is enough ETH collected, the following sequence of events occurs:
  1. 1.
    Oracles will submit a vote containing the next deposit data (previously registered by the Operators) to the Oracles contract for aggregation & consensus.
  2. 2.
    The Oracles contract will pass the deposit data on to the PoolValidators contract for verification.
  3. 3.
    Upon successful approval of submitted information, PoolValidators contract will call the registerValidator function in the Pool contract to register the validator by sending ether and the verified deposit data to the ETH2 Validator Registration Contract.
It is also possible to create multiple validators in one batch if there is enough ether collected.
Note that the StakeWise Permissioned Pool uses its own withdrawal credentials, which point to a PoolEscrow contract (i.e. an ETH1 address) and remain the same for every Pool's validator.
Copy link
On this page
Stake
Variations of stake function
Timing of minting psETH
Register Validator