Stakehouse protocol is an inventory management platform for staked assets and its flagship application Liquid Staking Derivative Networks (LSD), continue to push the boundaries of what is possible on Ethereum without the need for new EIPs in order to achieve its most critical operations including but not limited to: BLS verification, ad hoc balance reporting without an oracle and now trustless unstaking of ETH available 24/7 and settled permissionlessly at a smart contract level. All powered by Ethereum.
Let’s explore how validator ownership can be shared (trustlessly) amongst many parties that can contribute as little as 0.01 ETH to the validator stake and yet when the validator exits the same user that contributed 0.01 ETH can receive that back from that specific validator that exited with the help of the rage quit assistant. The rage quit assistant ensures that solo stakers and LSD users (protected stakers, fees and MEV users and node operators) get the correct allocation of unstaked ETH based on the Stakehouse derivatives they hold.
Validator lifecycle status in the Stakehouse protocol
Following the Stakehouse position paper here, a validator registered in the protocol can transition through the following lifecycle statuses tracked by the account manager smart contract:
- UNBEGUN (0)
- BLS CREDENTIALS REGISTERED (1)
- STAKED WITH ETHEREUM DEPOSIT CONTRACT (2)
- STAKEHOUSE DERIVATIVES MINTED (3)
- RAGE QUIT (EXITED) (4)
- UNSTAKED (5)
The Stakehouse position paper covers all of the lifecycle statuses except UNSTAKED given at the time of writing the position paper, withdrawals had not yet shipped on the Ethereum consensus layer. Fast forward today and withdrawals are shipped to Stakehouse on mainnet and users are actively unstaking their ETH.
It’s worth revisiting the last 2 lifecycle statuses and their importance in the Stakehouse protocol: RAGE QUIT and UNSTAKED.
Rage quitting a validator is the first mandatory step towards unstaking ETH from the Ethereum consensus layer for a specific validator registered in the Stakehouse protocol. As per the following flow here there are 3 requirements that need to be satisfied in order to achieve RAGE QUIT lifecycle status:
- Voluntary exit from the consensus layer - already broadcast and exit epoch assigned
- Balance reporting - this ensures that the consensus layer validator state is replicated to the execution layer in order to account for any leakage penalties for example
- Burning derivatives - burning the derivatives minted in the Stakehouse protocol after the validator was activated. This part is key, ETH can only be released by the validator account manager smart contract after derivatives are burned to ensure solvency of the protocol. This is also the case when partially burning dETH to skim validator rewards
In the simplest case for a solo staker supplying the full 32 ETH stake for a validator, 24 dETH and 8 SLOT is minted and those tokens (plus any additional dETH minted from consensus layer partial withdrawal sweeps) need to be burned in order to withdraw the unstaked ETH that is returned from the consensus layer to the execution layer upon the exit of a validator. In the case of LSD the 3 user buckets: protected stakers (24 ETH), fees and MEV (4 ETH) and node operator (4 ETH) with the exception of node operators, may have many liquidity providers.
Let’s dive a bit deeper into the different user buckets for LSD: Protected stakers (LPs collectively supply 24 ETH per validator):
- Get an LP token when depositing ETH for staking
- When the derivatives are minted, the LP tokens can be burnt for dETH (the Stakehouse protocol liquid staking token) but only if the user wants. Alternatively, the LP tokens can be held and they will accrue more dETH over time whilst managed by the LSD pools. Users are free to report the balance of a validator as often as they would like.
- These users will get a pro rata share of 24 ETH plus inflation rewards based on how many tokens a user holds upon the exit of a validator
Fees and MEV (LPs collectively supply 4 ETH per validator):
- Get an LP token when depositing ETH for staking
- Cannot burn this LP token for derivative (sETH) but keeping the token allows the holder to accrue a pro rata share of 50% of all MEV earned by the active validators in a LSD network
- Will get a pro rata share of 4 ETH back from unstaked ETH based on how many LP tokens a user has
Node operator (One single account supplies 4 ETH per validator):
- Does not get an LP token but gets a smart wallet to manage all of its validators in an LSD network
- Entitled to 50% of the MEV of a LSD network
- Will get 4 ETH back after unstaking ETH minus any consensus layer penalties incurred
The protected stakers have at their disposal the ability to keep their liquid staking token (dETH) under LSD management or withdraw dETH by burning their LSD LP token whilst the validator is active.
All of this information becomes relevant when it comes to rage quitting. Take a node operator user, they funded 4 ETH towards the stake of the validator. As per the Stakehouse protocol rule of rage quit, they need to supply all of the other derivatives minted (dETH + sETH) for a validator upon exit in order to burn them. Without access directly to capital, how is this possible?
This is where the rage quit assistant steps in.
Rage quit assistant is all about facilitating the exit of a validator by allowing outside parties to lend the necessary derivatives required to allow a validator to perform a rage quit. External liquidity providers (individuals and entire protocols in the future) are able to deposit dETH and in exchange for lending dETH they receive rdETH which is the rage quit LP token (ERC20) that will receive a pro rata share of the unstaked ETH earmarked for protected stakers. sETH (free floating slot relating to 4 out of the 8 SLOT) can also be lent in exchange for LP tokens. Collateralised SLOT owners automatically opt in to the rage quit assistant when they broadcast the exit on the consensus layer since collateralised SLOT retains the management rights of the validator.
Depending on the individual validator and the stake liquidity providers in an LSD network, the amount of dETH and sETH required from lenders may differ from validator to validator. This is because LSD networks opt into lending derivatives to the rage quit assistant of a validator if there are derivatives under the management of an LSD network at the time that the rage quit assistant is deployed. In order to deploy a rage quit assistant, the rage quit conditions must be satisfied meaning that the validator is either exiting or has exited the consensus layer. Due to this the validator is no longer yielding and it is better to facilitate the fast exit of the validator with an LSD lending facility so that liquidity providers have a rapid path to rotating their ETH into another validator of their choosing to restart the yield generation.
Once all of the derivatives have been accounted for in the rage quit assistant, the rage quit assistant can interact with the Stakehouse protocol to execute the rage quit. This allows the validator to transition into the EXITED (4) lifecycle status.
There is a consensus layer enforced delay between the exiting of a validator and the issuance of the withdrawal to pay out the full balance of a validator and take the consensus layer balance to zero. This is achieved after the designated withdrawal epoch which is after the exit epoch of the validator. Both pieces of information can be queried by fetching the validator state on the fly. When the withdrawal finally arrives in the validator account manager, this can be reported to the rage quit assistant and the ETH will be transferred. This allows for every holder of a rage quit LP token to burn their tokens and receive their unstaked ETH. Node operators don’t have to burn their token but have a dedicated claim function for their ETH. Programmatically interacting with Rage Quit Assistant The lsd.joinstakehouse.com dApp, using the help of our SDKs, has done as much heavy lifting as it can to make the process of interacting with the protocol and the Rage Quit assistant as smooth as is possible and it caters to technical and non-technical users alike.
For expert and technical users that want to programmatically interact with the Rage Quit assistant and the entire protocol, SDKs and Solidity APIs are available in the following packages:
- Typescript LSD SDK here
- LSD protocol ABIs: here
- Solidity API here
- NPM Package here
- Foundry installation:
forge install stakehouse-dev/stakehouse-solidity-api
- Solidity contract interfaces only here
- NPM Package here
- Foundry installation:
forge install stakehouse-dev/stakehouse-contract-interfaces
IRageQuitAssistant.sol available from the Solidity Interface library is the simplest view of the functionality available. Key functions to point out:
- blsPublicKey() - Returns the BLS public key that the Rage quit assistant is associated with. Rage quit assistants are associated 1:1 with a validator
- dETHRageQuitLP() - Returns the address of the LP token minted when dETH is lent to the rage quit assistant
- sETHRageQuitLP - Returns the address of the LP token that is minted when sETH is lent to the rage quit assistant
- dETHDeposit(weiAmount) - dETH lending takes place with this function whilst the validator is in lifecycle status 3 - DERIVATIVES minted
- dETHWithdrawal(weiAmount) - Function for clawing back dETH either before rage quit or post rage quit if less dETH was required than expected
- sETHDeposit(weiAmount) - sETH lending functionality. LSD protocol takes care of this via auto lending so LSD users dont need to worry about it but this may be applicable for Stakehouse solo stakers
- sETHWithdrawal(weiAmount) - Function for clawing back sETH directly deposited
- dETHRequiredForIsolation() - Function for returning the maximum amount of dETH that the contract can accept from lenders.
- totalDETHDeposited() - Function for returning the total dETH currently deposited which can be used in conjunction with dETHRequiredForIsolation() to determine how much more dETH needs to be deposited
- dETHClaimPreview(address liquidityProviderAddress, uint256 liquidityProviderRageQuitLPTokenBalance) - Preview for how much dETH would be received during claim
- dETHClaim(amountOfRageQuitLPTokenBeingBurnt) - ETH claim function (post rage quit when the validator is in lifecycle status 5 i.e. UNSTAKED) passing how much of the LP token that the user owns is going to be burnt. There is an equivalent function for sETH users. This is the final function called to received ETH.
- nodeOperatorClaim() - Claim function for node operators to receive back unstaked ETH minus any penalties incurred on the consensus layer. If you are a collateralised SLOT holder because you topped up slot (see section below), then the collateralisedSlotOwnerClaim(index) function needs to be called to claim your ETH passing in your collateralised slot index.
Some final closing notes on balance reporting
As mentioned, validator balance reporting is a user level action that can be executed ad hoc whenever users like without the need for an oracle. Many different types of validator state can be reported to the Stakehouse protocol but the core reporting falls mainly into two categories:
- Reporting consensus layer withdrawals (partial and full) triggered by the automatic sweep
- Reporting penalties incurred by offline and slashed validators that causes validators to have their active balance fall below 32 ETH
Any penalties due to slashing reported to the Stakehouse protocol will slash collateralised SLOT that can be topped up where on rage quit, the rage quit assistant will ensure that protected stakers (dETH hodlers) will get all of the top ups that account for the inflation earnings they were projected to receive. Additionally, collateralised slot owners will receive any unknown ETH sent directly to the Ethereum Deposit contract for a BLS public key registered in the stakehouse protocol. That ‘donation’ will be redirected by default to the collateralised slot owners. Finally, if the ETH received by the rage quit assistant is less than 32 ETH, the pay out will automatically be adjusted first for the SLOT owners protecting the protected stakers as much as possible.
Stakehouse Protocol and LSD are truly autonomous protocols with solid mechanism design that fosters an open and permissionless system even for node operators operating in the most hostile of environments.
Rage quit assistants in the wild
The following subgraph query can be executed on the LSD subgraph to get the list of deployed rage quit assistants:
Where the subgraph information can be found here
But here is one example rage quit assistant on mainnet: https://etherscan.io/address/0x2201386e37f64faf53d23f0af40e0a3574f87e31