IEigenPodManager
Author: Layr Labs, Inc.
Terms of Service: https://docs.eigenlayer.xyz/overview/terms-of-service
Functions
createPod
Creates an EigenPod for the sender.
Function will revert if the msg.sender
already has an EigenPod.
Returns EigenPod address.
stake
Stakes for a new beacon chain validator on the sender's EigenPod. Also creates an EigenPod for the sender if they don't have one already.
Parameters
pubkey
bytes
The 48 bytes public key of the beacon chain validator.
signature
bytes
The validator's signature of the deposit data.
depositDataRoot
bytes32
The root/hash of the deposit data for the validator's deposit.
recordBeaconChainETHBalanceUpdate
Changes the podOwner
's shares by sharesDelta
and performs a call to the DelegationManager to ensure that delegated shares are also tracked correctly
Callable only by the podOwner's EigenPod contract.
Reverts if sharesDelta
is not a whole Gwei amount
Parameters
podOwner
address
is the pod owner whose balance is being updated.
sharesDelta
int256
is the change in podOwner's beaconChainETHStrategy shares
updateBeaconChainOracle
Updates the oracle contract that provides the beacon chain state root
Callable only by the owner of this contract (i.e. governance)
Parameters
newBeaconChainOracle
IBeaconChainOracle
is the new oracle contract being pointed to
ownerToPod
Returns the address of the podOwner
's EigenPod if it has been deployed.
getPod
Returns the address of the podOwner
's EigenPod (whether it is deployed yet or not).
ethPOS
The ETH2 Deposit Contract
eigenPodBeacon
Beacon proxy to which the EigenPods point
beaconChainOracle
Oracle contract that provides updates to the beacon chain's state
getBlockRootAtTimestamp
Returns the beacon block root at timestamp
. Reverts if the Beacon block root at timestamp
has not yet been finalized.
strategyManager
EigenLayer's StrategyManager contract
slasher
EigenLayer's Slasher contract
hasPod
Whether the podOwner
has an EigenPod deployed.
podOwnerShares
Mapping from Pod owner owner to the number of shares they have in the virtual beacon chain ETH strategy.
The share amount can become negative. This is necessary to accommodate the fact that a pod owner's virtual beacon chain ETH shares can decrease between the pod owner queuing and completing a withdrawal. When the pod owner's shares would otherwise increase, this "deficit" is decreased first instead. Likewise, when a withdrawal is completed, this "deficit" is decreased and the withdrawal amount is decreased; We can think of this as the withdrawal "paying off the deficit".
beaconChainETHStrategy
returns canonical, virtual beaconChainETH strategy
removeShares
Used by the DelegationManager to remove a pod owner's shares while they're in the withdrawal queue. Simply decreases the podOwner
's shares by shares
, down to a minimum of zero.
This function reverts if it would result in podOwnerShares[podOwner]
being less than zero, i.e. it is forbidden for this function to result in the podOwner
incurring a "share deficit". This behavior prevents a Staker from queuing a withdrawal which improperly removes excessive shares from the operator to whom the staker is delegated.
Reverts if shares
is not a whole Gwei amount
addShares
Increases the podOwner
's shares by shares
, paying off deficit if possible. Used by the DelegationManager to award a pod owner shares on exiting the withdrawal queue
Returns the number of shares added to podOwnerShares[podOwner]
above zero, which will be less than the shares
input in the event that the podOwner has an existing shares deficit (i.e. podOwnerShares[podOwner]
starts below zero)
Reverts if shares
is not a whole Gwei amount
withdrawSharesAsTokens
Used by the DelegationManager to complete a withdrawal, sending tokens to some destination address
Prioritizes decreasing the podOwner's share deficit, if they have one
Reverts if shares
is not a whole Gwei amount
Events
BeaconOracleUpdated
Emitted to notify the update of the beaconChainOracle address
PodDeployed
Emitted to notify the deployment of an EigenPod
BeaconChainETHDeposited
Emitted to notify a deposit of beacon chain ETH recorded in the strategy manager
MaxPodsUpdated
Emitted when maxPods
value is updated from previousValue
to newValue
BeaconChainETHWithdrawalCompleted
Emitted when a withdrawal of beacon chain ETH is completed
Last updated