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
issuer_
address
The issuer of the LRT instance that this contract is deployed for.
strategyManager_
address
The primary entry and exit-point for funds into and out of EigenLayer.
eigenPodManager_
address
The contract used for creating and managing EigenPods.
delegationManager_
address
The primary delegation contract for EigenLayer.
initialize
Initializes the contract by delegating to the provided EigenLayer operator.
Parameters
token_
address
The address of the liquid restaking token.
operator
address
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
oracleTimestamp
uint64
The Beacon Chain timestamp whose state root the proof
will be proven against.
stateRootProof
IBeaconChainProofs.StateRootProof
Proves a beaconStateRoot
against a block root fetched from the oracle.
validatorIndices
uint40[]
The list of indices of the validators being proven, refer to consensus specs.
validatorFieldsProofs
bytes[]
Proofs against the beaconStateRoot
for each validator in validatorFields
.
validatorFields
bytes32[][]
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
strategy
address
The strategy to stake the tokens into.
token_
address
The token to stake.
amount
uint256
The amount of tokens to stake.
stakeETH
Stake ETH via the operator delegator's EigenPod, using the provided validator information.
Parameters
validatorCount
uint256
The number of validators to deposit into.
pubkeyBatch
bytes
Batched validator public keys.
signatureBatch
bytes
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
strategy
address
The strategy from which to withdraw.
shares
uint256
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
strategy
address
The strategy from which to withdraw.
shares
uint256
The amount of shares to withdraw.
completeQueuedWithdrawal
Completes a queued withdrawal of the specified queuedWithdrawal
for the given asset
.
Parameters
queuedWithdrawal
IDelegationManager.Withdrawal
The withdrawal to complete.
asset
address
The asset to withdraw.
middlewareTimesIndex
uint256
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
strategy
address
The strategy from which to withdraw.
shares
uint256
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
strategy
address
The strategy to withdraw from.
shares
uint256
The amount of shares to withdraw.
_increaseETHQueuedForUserSettlement
Increase the amount of ETH queued from EigenLayer for user settlement.
Parameters
amountWei
uint256
The amount of ETH to increase by, in wei.
_decreaseETHQueuedForUserSettlement
Decrease the amount of ETH queued from EigenLayer for user settlement.
Parameters
amountWei
uint256
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
amountWei
uint256
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
amountWei
uint256
The amount of ETH to decrease by, in wei.
_computeWithdrawalCredentials
Compute withdrawal credentials for the given EigenPod.
Parameters
pod
address
The EigenPod to compute the withdrawal credentials for.
_computeWithdrawalRoot
Returns the keccak256 hash of an EigenLayer withdrawal
.
Parameters
withdrawal
IDelegationManager.Withdrawal
The withdrawal.
_computeDepositDataRoot
Computes the deposit_root_hash required by the Beacon Deposit contract.
Parameters
withdrawalCredentials_
bytes32
Credentials to withdraw ETH on Consensus Layer.
publicKey
bytes
A BLS12-381 public key.
signature
bytes
A BLS12-381 signature.
Last updated