Skip to content

Latest commit

 

History

History
102 lines (68 loc) · 6.63 KB

README.md

File metadata and controls

102 lines (68 loc) · 6.63 KB

EigenLayer M2 Docs

EigenLayer M2 extends the functionality of EigenLayer M1 (which is live on mainnet). M2 is currently on the Goerli testnet, and will eventually be released on mainnet.

This repo contains the EigenLayer core contracts, which enable restaking of liquid staking tokens (LSTs) and beacon chain ETH to secure new services, called AVSs (actively validated services). For more info on AVSs, check out the EigenLayer middleware contracts here.

This document provides an overview of system components, contracts, and user roles. Further documentation on the major system contracts can be found in /core.

Contents

System Components

EigenPodManager

File Type Proxy
EigenPodManager.sol Singleton Transparent proxy
EigenPod.sol Instanced, deployed per-user Beacon proxy
DelayedWithdrawalRouter.sol Singleton Transparent proxy
succinctlabs/EigenLayerBeaconOracle.sol Singleton UUPS proxy

These contracts work together to enable native ETH restaking:

  • Users deploy EigenPods via the EigenPodManager, which contain beacon chain state proof logic used to verify a validator's withdrawal credentials, balance, and exit. An EigenPod's main role is to serve as the withdrawal address for one or more of a user's validators.
  • The EigenPodManager handles EigenPod creation and accounting+interactions between users with restaked native ETH and the DelegationManager.
  • The DelayedWithdrawalRouter imposes a 7-day delay on completing partial beacon chain withdrawals from an EigenPod. This is primarily to add a stopgap against a hack being able to instantly withdraw funds (note that all withdrawals from EigenLayer -- other than partial withdrawals earned by validators -- are initiated via the DelegationManager).
  • The EigenLayerBeaconOracle provides beacon chain block roots for use in various proofs. The oracle is supplied by Succinct's Telepathy protocol (docs link).

See full documentation in /core/EigenPodManager.md.

StrategyManager

File Type Proxy
StrategyManager.sol Singleton Transparent proxy
StrategyBaseTVLLimits.sol One instance per supported LST Transparent proxy

These contracts work together to enable restaking for LSTs:

  • The StrategyManager acts as the entry and exit point for LSTs in EigenLayer. It handles deposits into each of the 3 LST-specific strategies, and manages accounting+interactions between users with restaked LSTs and the DelegationManager.
  • StrategyBaseTVLLimits is deployed as multiple separate instances, one for each supported LST. When a user deposits into a strategy through the StrategyManager, this contract receives the tokens and awards the user with a proportional quantity of shares in the strategy. When a user withdraws, the strategy contract sends the LSTs back to the user.

See full documentation in /core/StrategyManager.md.

DelegationManager

File Type Proxy
DelegationManager.sol Singleton Transparent proxy

The DelegationManager sits between the EigenPodManager and StrategyManager to manage delegation and undelegation of Stakers to Operators. Its primary features are to allow Operators to register as Operators (registerAsOperator), to keep track of shares being delegated to Operators across different strategies, and to manage withdrawals on behalf of the EigenPodManager and StrategyManager.

See full documentation in /core/DelegationManager.md.

Slasher

File Type Proxy
Slasher.sol - -

🚧 The Slasher contract is under active development and its interface expected to change. We recommend writing slashing logic without integrating with the Slasher at this point in time. Although the Slasher is deployed, it will remain completely paused/unusable during M2. No contracts interact with it, and its design is not finalized. 🚧


Roles and Actors

To see an example of the user flows described in this section, check out our integration tests: /src/test/integration.

Staker

A Staker is any party who has assets deposited (or "restaked") into EigenLayer. Currently, these assets can be:

  • Native beacon chain ETH (via the EigenPodManager)
  • Liquid staking tokens (via the StrategyManager): cbETH, rETH, stETH, ankrETH, OETH, osETH, swETH, wBETH

Stakers can restake any combination of these: a Staker may hold ALL of these assets, or only one of them.

Flows:

  • Stakers deposit assets into EigenLayer via either the StrategyManager (for LSTs) or EigenPodManager (for beacon chain ETH)
  • Stakers withdraw assets via the DelegationManager, no matter what assets they're withdrawing
  • Stakers delegate to an Operator via the DelegationManager

Unimplemented as of M2:

  • Stakers earn yield by delegating to an Operator as the Operator provides services to an AVS
  • Stakers are at risk of being slashed if the Operator misbehaves
Operator

An Operator is a user who helps run the software built on top of EigenLayer (AVSs). Operators register in EigenLayer and allow Stakers to delegate to them, then opt in to provide various services built on top of EigenLayer. Operators may themselves be Stakers; these are not mutually exclusive.

Flows:

  • User can register as an Operator via the DelegationManager
  • Operators can deposit and withdraw assets just like Stakers can
  • Operators can opt in to providing services for an AVS using that AVS's middleware contracts. See the EigenLayer middleware repo for more details.

Unimplemented as of M2:

  • Operators earn fees as part of the services they provide
  • Operators may be slashed by the services they register with (if they misbehave)