RioLRTOperatorDelegator
Inherits: IRioLRTOperatorDelegator, RioLRTCore
State Variables
WITHDRAWALS_ENABLED_PREFIX
The withdrawal credentials prefix, which signals that withdrawals are enabled.
MIN_EXCESS_FULL_WITHDRAWAL_ETH_FOR_SCRAPE
The minimum amount of excess ETH from full withdrawals that can be scraped from the EigenPod.
strategyManager
The primary entry and exit-point for funds into and out of EigenLayer.
eigenPodManager
The contract used for creating and managing EigenPods.
delegationManager
The primary delegation contract for EigenLayer.
eigenPod
The operator delegator's EigenPod.
withdrawalCredentials
Credentials to withdraw ETH on Consensus Layer via the EigenPod.
ethQueuedForUserSettlementGwei
The amount of ETH queued for withdrawal to the withdrawal queue, intended for settling user withdrawals, in gwei.
ethQueuedForOperatorExitsAndScrapesGwei
The amount of ETH queued for withdrawal to the deposit pool, specifically for facilitating operator exits and excess full withdrawal scrapes, in gwei.
authorizedClaimerByWithdrawalRoot
The mapping of withdrawal roots to the address that's allowed to claim them.
Functions
constructor
Parameters
Name | Type | Description |
---|---|---|
|
| The issuer of the LRT instance that this contract is deployed for. |
|
| The primary entry and exit-point for funds into and out of EigenLayer. |
|
| The contract used for creating and managing EigenPods. |
|
| The primary delegation contract for EigenLayer. |
initialize
Initializes the contract by delegating to the provided EigenLayer operator.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the liquid restaking token. |
|
| The operator's address. |
getEigenPodShares
Returns the number of shares in the operator delegator's EigenPod.
getETHQueuedForWithdrawal
The amount of ETH queued for withdrawal from EigenLayer, in wei.
getETHUnderManagement
Returns the total amount of ETH under management by the operator delegator.
This includes EigenPod shares (verified validator balances minus queued withdrawals) and ETH queued for withdrawal from EigenLayer. Returns 0
if the total is negative.
verifyWithdrawalCredentials
Verifies withdrawal credentials of validator(s) owned by this operator. It also verifies the effective balance of the validator(s).
Parameters
Name | Type | Description |
---|---|---|
|
| The Beacon Chain timestamp whose state root the |
|
| Proves a |
|
| The list of indices of the validators being proven, refer to consensus specs. |
|
| Proofs against the |
|
| The fields of the "Validator Container", refer to consensus specs. |
scrapeNonBeaconChainETHFromEigenPod
Scrapes non-beacon chain ETH sitting in the operator delegator's EigenPod to the reward distributor.
Anyone can call this function.
scrapeExcessFullWithdrawalETHFromEigenPod
Scrapes excess full withdrawal ETH from the operator delegator's EigenPod to the deposit pool. ETH from full withdrawals may accumulate in the EigenPod over time as full withdrawals contain more ETH than was requested from the withdrawal queue.
Anyone can call this function.
emergencyScrapeExcessFullWithdrawalETHFromEigenPod
Scrapes excess full withdrawal ETH from the operator delegator's EigenPod to the deposit pool WITHOUT checking whether the minimum excess ETH amount is met.
Only the operator registry owner can call this function.
stakeERC20
Approve EigenLayer to spend an ERC20 token, then stake it into an EigenLayer strategy.
Parameters
Name | Type | Description |
---|---|---|
|
| The strategy to stake the tokens into. |
|
| The token to stake. |
|
| The amount of tokens to stake. |
stakeETH
Stake ETH via the operator delegator's EigenPod, using the provided validator information.
Parameters
Name | Type | Description |
---|---|---|
|
| The number of validators to deposit into. |
|
| Batched validator public keys. |
|
| Batched validator signatures. |
queueWithdrawalForUserSettlement
Queues a withdrawal of the specified amount of shares
from the given strategy
for claim by the withdrawal queue, intended for settling user withdrawals.
Parameters
Name | Type | Description |
---|---|---|
|
| The strategy from which to withdraw. |
|
| The amount of shares to withdraw. |
queueWithdrawalForOperatorExit
Queues a withdrawal of the specified amount of shares
from the given strategy
for claim by the deposit pool, specifically for facilitating operator exits.
Parameters
Name | Type | Description |
---|---|---|
|
| The strategy from which to withdraw. |
|
| The amount of shares to withdraw. |
completeQueuedWithdrawal
Completes a queued withdrawal of the specified queuedWithdrawal
for the given asset
.
Parameters
Name | Type | Description |
---|---|---|
|
| The withdrawal to complete. |
|
| The asset to withdraw. |
|
| The index of the middleware times to use for the withdrawal. |
receive
Forwards ETH rewards to the reward distributor. We consider any ETH sent from the delayed withdrawal router as a reward - this includes partial withdrawals, any amount in excess of 32 ETH for full withdrawals, and non-beacon chain ETH.
_queueWithdrawalForOperatorExitOrScrape
Queues a withdrawal of the specified amount of shares
from the given strategy
for claim by the deposit pool, specifically for facilitating operator exits or excess full withdrawal scrapes.
Parameters
Name | Type | Description |
---|---|---|
|
| The strategy from which to withdraw. |
|
| The amount of shares to withdraw. |
_queueWithdrawal
Queue a withdrawal of the given amount of shares
to the withdrawer
from the provided strategy
.
EigenLayer enforces that the withdrawer
is the staker
(this contract).
Parameters
Name | Type | Description |
---|---|---|
|
| The strategy to withdraw from. |
|
| The amount of shares to withdraw. |
_increaseETHQueuedForUserSettlement
Increase the amount of ETH queued from EigenLayer for user settlement.
Parameters
Name | Type | Description |
---|---|---|
|
| The amount of ETH to increase by, in wei. |
_decreaseETHQueuedForUserSettlement
Decrease the amount of ETH queued from EigenLayer for user settlement.
Parameters
Name | Type | Description |
---|---|---|
|
| The amount of ETH to decrease by, in wei. |
_increaseETHQueuedForOperatorExitOrScrape
Increase the amount of ETH queued for operator exit or excess full withdrawal scrape from EigenLayer.
Parameters
Name | Type | Description |
---|---|---|
|
| The amount of ETH to increase by, in wei. |
_decreaseETHQueuedForOperatorExitOrScrape
Decrease the amount of ETH queued for operator exit or excess full withdrawal scrape from EigenLayer.
Parameters
Name | Type | Description |
---|---|---|
|
| The amount of ETH to decrease by, in wei. |
_computeWithdrawalCredentials
Compute withdrawal credentials for the given EigenPod.
Parameters
Name | Type | Description |
---|---|---|
|
| The EigenPod to compute the withdrawal credentials for. |
_computeWithdrawalRoot
Returns the keccak256 hash of an EigenLayer withdrawal
.
Parameters
Name | Type | Description |
---|---|---|
|
| The withdrawal. |
_computeDepositDataRoot
Computes the deposit_root_hash required by the Beacon Deposit contract.
Parameters
Name | Type | Description |
---|---|---|
|
| Credentials to withdraw ETH on Consensus Layer. |
|
| A BLS12-381 public key. |
|
| A BLS12-381 signature. |
Last updated