This documentation and vSuite Smart Contracts are under the BUSL-1.1 licence, some smart contract public interfaces are under MIT licence.
To stake, it is required to deposit any multiple of 32 ETH to the Staking Contract. The deposited ETH will be used by the Staking Contract to fund available validation keys registered by the Operator(s). There is 2 ways to do this:
Transfer the multiple of 32 ETH to the Staking Contract address
Call the deposit()
function of the Staking Contract
Both will fund the validators by depositing them on the official Staking Contract and will set the owner of the validator in the Contract to the wallet which signed the deposit or transfer transaction.
Due to gas cost limitation, it is not recommended to deposit more than 40 validators (ie more than 1280 ETH) at once.
A validator(s) owner can claim the accrued EL and CL (Post-Shanghai) rewards on the Staking contract for its validator(s). When withdrawing available rewards, the commission dispatch is performed to the different partners defined in the contract (globalFee and operatorFee).
withdrawCLFee(bytes _publicKey)
performs commission dispatching on the available CL Recipient balance of the validator (accrued through EL fees earn when a block is proposed with or without MEV) and sends the rest to the validator owner. Pre-Shanghai this function reverts.
withdrawELFee(bytes _publicKey)
performs commission dispatching on the available EL Recipient balance of the validator (accrued through EL fees earn when a block is proposed with or without MEV) and sends the rest to the validator owner.
withdraw()
performs both of the above (reverts pre-Shanghai)
These 3 functions can be called by SYS_ADMIN or the validator owner, the net available rewards will always go to the registered validator owner.
This feature is disabled by default and must be enabled by SYS_ADMIN using setWithdrawerCustomizationEnabled(true)
The owner of a validator can transfer its ownership to an other address if this feature is enabled by SYS_ADMIN. This can be done by calling the following function from the validator owner wallet:
setWithdrawer(validatorPubkey, newOwner)
After this call, newOwner
will be the recipient of redeemed net rewards of the validator validatorPubkey
and the only wallet able to trigger the exit of the validator.
Role | Description |
---|
Kiln recommends that the PROXY_ADMIN is setup as a multi-sig between multiple parties within the partner or including trusted third parties.
Contract | Action | Description | Regularity |
---|
Kiln recommends that the SYS_ADMIN is setup as a multi-sig between multiple parties within the partner or including trusted third parties.
Contract | Action | Description | Regularity |
---|
Kiln recommends that the OPERATOR is setup as a hot wallet for use in scripts and automation.
It's rights are limited to changing the validators list, changes must then be approved by the admin.
The address can be changed by OPERATOR_FEE_RECIPIENT
Kiln recommends that the OPERATOR_FEE_RECIPIENT is setup as a multi-sig between multiple parties inside the Operator entity, this is where the operator fee will flow to.
Contract | Action | Description | Regularity |
---|
Contract | Action | Description | Regularity |
---|
PROXY_ADMIN | Responsible for upgrades operations (pause/unpause/add new logic or fix contract data/freeze contract upgrades) |
SYS_ADMIN | Responsible for Operation administration: set commissions, add / remove Operator(s), approve / remove Operator validation keys before they are funded |
OPERATOR (can be multiple) | Add / Remove validation key deposit data |
StakingContract | pause | pause Staking Contract (no non-view functions can be called) | Exception |
StakingContract | unpause | unpause Staking Contract | Exception |
StakingContract | changeAdmin | change PROXY_ADMIN address | Exception |
StakingContract | upgradeTo | change implementation address | Exception |
StakingContract | upgradeToAndCall | change implentation address and performs an additional setup call | Exception |
StakingContract | setWithdrawerCustomizationEnabled | Enable or disable the ability for users to modify their withdrawer address | Exception |
StakingContract | setTreasury | Set new treasury recipient address | Rare |
StakingContract | transferOwnership | Set new SYS_ADMIN | Exception |
StakingContract | addOperator | Register Operator address and commission recipient address | At Setup time |
StakingContract | setOperatorLimit | Set Operator number of keys to be exposed to the end users for deposit | Often |
StakingContract | deactivateOperator | Deactivate operator, its commission recipient and key limit | Exception |
StakingContract | activateOperator | Activate operator, without changing the 0 limit | Exception |
StakingContract | setOperatorFee | Change the operator fee | Rare |
StakingContract | setGlobalFee | Change the Global fee | Rare |
StakingContract | setDepositsStopped | Pause or Resume the deposit feature | Exception |
StakingContract | batchWithdrawCLFee | Withdraw CL Recipients of multiple staked positions | Rare |
StakingContract | batchWithdrawELFee | Withdraw EL Recipients of multiple staked positions | Rare |
StakingContract | withdrawELFee | Withdraw EL Recipient of a staked position | Rare |
StakingContract | withdrawCLFee | Withdraw CL Recipient of a staked position | Rare |
StakingContract | addValidators | Add new validator deposit data to be approved by the SYS_ADMIN | 1/mth (depends on the deposit volume) |
StakingContract | removeValidators | Remove validators that are not funded | Exception |
StakingContract | setOperatorAddresses | Change Operator Address and/or Operator Commission recipient address | Exception |