Skip to content

Layr-Labs/eigenlayer-contracts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EigenLayer

EigenLayer is a set of smart contracts deployed on Ethereum that enable restaking of assets to secure new services. This repo contains the EigenLayer core contracts, whose currently-supported assets include beacon chain ETH and several liquid staking tokens (LSTs). Users use these contracts to deposit and withdraw these assets, as well as delegate them to operators providing services to AVSs.

Getting Started

Deployment Matrix

The deployments on mainnet, holesky, and sepolia are on the below versions:

Environment Version Notes
Mainnet v0.5.4
Holesky v1.4.1
Sepolia v1.3.0

Branching

Branches we use:

  • main: The canonical, most up-to-date branch, containing the work-in-progress code for upcoming releases
  • release-dev/xxx: A development branch for a large feature to be released, the branch should eventually be deleted after merge to main
  • Vx.y.z: Release branch with version x.y.z that matches a release of EigenLayer, release branch is always cut from main via cherry-picking

Documentation

Basics

To get a basic understanding of EigenLayer, check out You Could've Invented EigenLayer. Note that some of the document's content describes features that do not exist yet (like the Slasher). To understand more about how restakers and operators interact with EigenLayer, check out these guides:

Deep Dive

The most up-to-date and technical documentation can be found in /docs. If you're a shadowy super coder, this is a great place to get an overview of the contracts before diving into the code.

To get an idea of how users interact with these contracts, check out our integration tests: /src/test/integration.

Building and Running Tests

This repository uses Foundry. See the Foundry docs for more info on installation and usage. If you already have foundry, you can build this project and run tests with these commands:

foundryup

forge build
forge test

Contributor Setup

To set up this repo for the first time, run:

make deps

This will:

  • Install the pre-commit hook
  • Install foundry and its tools
  • Install abigen

Running Fork Tests

We have a few fork tests against ETH mainnet. Passing these requires the environment variable RPC_MAINNET to be set. See .env.example for an example. Once you've set up your environment, forge test should show these fork tests passing.

Additionally, to run all tests in a forked environment, install yq. Then, set up your environment by running the following command.

source bin/source-env.sh [local]

Then run the tests:

forge test --fork-url [RPC_URL]

Running Static Analysis

  1. Install solhint, then run:

solhint 'src/contracts/**/*.sol'

  1. Install slither, then run:

slither .

Generate Inheritance and Control-Flow Graphs

  1. Install surya and graphviz:
npm i -g surya

apt install graphviz
  1. Then, run:
surya inheritance ./src/contracts/**/*.sol | dot -Tpng > InheritanceGraph.png

surya mdreport surya_report.md ./src/contracts/**/*.sol

Generate Go bindings

make bindings

Generate updated Storage Report

To update the storage reports in /docs/storage-report run:

make storage-report

Deployments

Current Mainnet Deployment

The current mainnet deployment is our M2 release. You can view the deployed contract addresses below, or check out the code itself on the mainnet branch.

Core
Name Proxy Implementation Notes
DelegationManager 0x39053D51B77DC0d36036Fc1fCc8Cb819df8Ef37A 0x1784...9dda Proxy: [email protected]
StrategyManager 0x858646372CC42E1A627fcE94aa7A7033e7CF075A 0x70f4...619b Proxy: [email protected]
EigenPodManager 0x91E677b07F7AF907ec9a428aafA9fc14a0d3A338 0x731A...3FEa Proxy: [email protected]
AVSDirectory 0x135dda560e946695d6f155dacafc6f1f25c1f5af 0xdabd...a5b7 Proxy: [email protected]
Slasher 0xD92145c07f8Ed1D392c1B88017934E301CC1c3Cd 0xf323...6614 Proxy: [email protected]
RewardsCoordinator 0x7750d328b314EfFa365A0402CcfD489B80B0adda 0x5bf7...8785 Proxy: [email protected]
Strategies

Anyone can deploy and whitelist strategies for standard ERC20s by using the StrategyFactory deployed to the address below (see docs). Strategies deployed from the StrategyFactory are deployed using the beacon proxy pattern:

Name Proxy Implementation Notes
StrategyFactory 0x5e4c39ad7a3e881585e383db9827eb4811f6f647 0x3e07...5c74 Proxy: [email protected]
StrategyBase 0x0ed6703C298d28aE0878d1b28e88cA87F9662fE9 0xe9fa...7827 - Beacon: BeaconProxy
- Strategies: UpgradeableBeacon

The following strategies were originally deployed and whitelisted outside of the StrategyFactory:

Name Proxy Implementation Notes
StrategyBase (cbETH) 0x54945180dB7943c0ed0FEE7EdaB2Bd24620256bc 0xdfdA...46d3 Proxy: [email protected]
StrategyBase (stETH) 0x93c4b944D05dfe6df7645A86cd2206016c51564D 0xdfdA...46d3 Proxy: [email protected]
StrategyBase (rETH) 0x1BeE69b7dFFfA4E2d53C2a2Df135C388AD25dCD2 0xdfdA...46d3 Proxy: [email protected]
StrategyBase (ETHx) 0x9d7eD45EE2E8FC5482fa2428f15C971e6369011d 0xdfdA...46d3 Proxy: [email protected]
StrategyBase (ankrETH) 0x13760F50a9d7377e4F20CB8CF9e4c26586c658ff 0xdfdA...46d3 Proxy: [email protected]
StrategyBase (OETH) 0xa4C637e0F704745D182e4D38cAb7E7485321d059 0xdfdA...46d3 Proxy: [email protected]
StrategyBase (osETH) 0x57ba429517c3473B6d34CA9aCd56c0e735b94c02 0xdfdA...46d3 Proxy: [email protected]
StrategyBase (swETH) 0x0Fe4F44beE93503346A3Ac9EE5A26b130a5796d6 0xdfdA...46d3 Proxy: [email protected]
StrategyBase (wBETH) 0x7CA911E83dabf90C90dD3De5411a10F1A6112184 0xdfdA...46d3 Proxy: [email protected]
StrategyBase (sfrxETH) 0x8CA7A5d6f3acd3A7A8bC468a8CD0FB14B6BD28b6 0xdfdA...46d3 Proxy: [email protected]
StrategyBase (lsETH) 0xAe60d8180437b5C34bB956822ac2710972584473 0xdfdA...46d3 Proxy: [email protected]
StrategyBase (mETH) 0x298aFB19A105D59E74658C4C334Ff360BadE6dd2 0xdfdA...46d3 Proxy: [email protected]
Strategies - Special

The following strategies differ significantly from the other strategies deployed/used above:

Name Proxy Implementation Notes
EigenStrategy (EIGEN) 0xaCB55C530Acdb2849e6d4f36992Cd8c9D50ED8F7 0x27e7...0428 Proxy: [email protected]
Beacon Chain ETH 0xbeaC0eeEeeeeEEeEeEEEEeeEEeEeeeEeeEEBEaC0 - - Used for Beacon Chain ETH shares
- Not a real contract!
EigenPods
Name Proxy Implementation Notes
EigenPod (beacon) 0x5a2a4F2F3C18f09179B6703e63D9eDD165909073 0x6D22...6430 - Beacon: BeaconProxy
- Pods: UpgradeableBeacon
EIGEN/bEIGEN
Name Proxy Implementation Notes
Eigen 0xec53bf9167f50cdeb3ae105f56099aaab9061f83 0x17f5...26A0 Proxy: [email protected]
Backing Eigen 0x83E9115d334D248Ce39a6f36144aEaB5b3456e75 0xF2b2...9b17 Proxy: [email protected]
SignedDistributor - 0x035b...ad02 -
Multisigs
Name Proxy Implementation Notes
PauserRegistry - 0x0c43...7060
Pauser Multisig 0x5050389572f2d220ad927CcbeA0D406831012390 0xd9db...9552 Proxy: [email protected]
Community Multisig 0xFEA47018D632A77bA579846c840d5706705Dc598 0xd9db...9552 Proxy: [email protected]
Executor Multisig 0x369e6F597e22EaB55fFb173C6d9cD234BD699111 0xd9db...9552 Proxy: [email protected]
Operations Multisig 0xBE1685C81aA44FF9FB319dD389addd9374383e90 0xd9db...9552 Proxy: [email protected]
Compound: Timelock - 0xA6Db...0EAF
OZ: Proxy Admin - 0x8b95...2444

Current Testnet Holesky Deployment

You can view the deployed contract addresses below, or check out the code itself on the testnet-holesky branch.

Core
Name Proxy Implementation Notes
DelegationManager 0xA44151489861Fe9e3055d95adC98FbD462B948e7 0xDa6F...BF48 Proxy: [email protected]
StrategyManager 0xdfB5f6CE42aAA7830E94ECFCcAd411beF4d4D5b6 0x7798...7679 Proxy: [email protected]
EigenPodManager 0x30770d7E3e71112d7A6b7259542D1f680a70e315 0x35b7...f304 Proxy: [email protected]
AVSDirectory 0x055733000064333CaDDbC92763c58BF0192fFeBf 0x6966...8a0b Proxy: [email protected]
RewardsCoordinator 0xAcc1fb458a1317E886dB376Fc8141540537E68fE 0xA3c3...0d69 Proxy: [email protected]
AllocationManager 0x78469728304326CBc65f8f95FA756B0B73164462 0xe03d...4ee2 Proxy: [email protected]
PermissionController 0x598cb226B591155F767dA17AfE7A2241a68C5C10 0x7ab0...a2b9 Proxy: [email protected]
Strategies

Anyone can deploy and whitelist strategies for standard ERC20s by using the StrategyFactory deployed to the address below (see docs). Strategies deployed from the StrategyFactory are deployed using the beacon proxy pattern:

Name Proxy Implementation Notes
StrategyFactory 0x9c01252B580efD11a05C00Aa42Dd3ac1Ec52DF6d 0x62e3...7aDE Proxy: [email protected]
StrategyBase 0xd3c6C6BA4E40dB9288c6a2077e5635344F8aFA4F 0xcaF7...C7E2 - Beacon: BeaconProxy
- Strategies: UpgradeableBeacon

The following strategies were originally deployed and whitelisted outside of the StrategyFactory:

Name Proxy Implementation Notes
StrategyBase (stETH) 0x7D704507b76571a51d9caE8AdDAbBFd0ba0e63d3 0x5FdD...3C1e Proxy: [email protected]
StrategyBase (rETH) 0x3A8fBdf9e77DFc25d09741f51d3E181b25d0c4E0 0x5FdD...3C1e Proxy: [email protected]
StrategyBase (WETH) 0x80528D6e9A2BAbFc766965E0E26d5aB08D9CFaF9 0x5FdD...3C1e Proxy: [email protected]
StrategyBase (lsETH) 0x05037A81BD7B4C9E0F7B430f1F2A22c31a2FD943 0x5FdD...3C1e Proxy: [email protected]
StrategyBase (sfrxETH) 0x9281ff96637710Cd9A5CAcce9c6FAD8C9F54631c 0x5FdD...3C1e Proxy: [email protected]
StrategyBase (ETHx) 0x31B6F59e1627cEfC9fA174aD03859fC337666af7 0x5FdD...3C1e Proxy: [email protected]
StrategyBase (osETH) 0x46281E3B7fDcACdBa44CADf069a94a588Fd4C6Ef 0x5FdD...3C1e Proxy: [email protected]
StrategyBase (cbETH) 0x70EB4D3c164a6B4A5f908D4FBb5a9cAfFb66bAB6 0x5FdD...3C1e Proxy: [email protected]
StrategyBase (mETH) 0xaccc5A86732BE85b5012e8614AF237801636F8e5 0x5FdD...3C1e Proxy: [email protected]
StrategyBase (ankrETH) 0x7673a47463F80c6a3553Db9E54c8cDcd5313d0ac 0x5FdD...3C1e Proxy: [email protected]
StrategyBase (reALT) 0xAD76D205564f955A9c18103C4422D1Cd94016899 0x5FdD...3C1e Proxy: [email protected]
StrategyBase (EO) 0x78dBcbEF8fF94eC7F631c23d38d197744a323868 0x5FdD...3C1e Proxy: [email protected]
Strategies - Special

The following strategies differ significantly from the other strategies deployed/used above:

Name Proxy Implementation Notes
EigenStrategy (EIGEN) 0x43252609bff8a13dFe5e057097f2f45A24387a84 0x917F...8Fd0 Proxy: [email protected]
Beacon Chain ETH 0xbeaC0eeEeeeeEEeEeEEEEeeEEeEeeeEeeEEBEaC0 - - Used for Beacon Chain ETH shares
- Not a real contract!
EigenPods
Name Proxy Implementation Notes
EigenPod (beacon) 0x7261C2bd75a7ACE1762f6d7FAe8F63215581832D 0x68bd...6D37 - Beacon: BeaconProxy
- Pods: UpgradeableBeacon
EIGEN/bEIGEN
Name Proxy Implementation Notes
Eigen 0x3B78576F7D6837500bA3De27A60c7f594934027E 0x01cb...3050 Proxy: [email protected]
Backing Eigen 0x275cCf9Be51f4a6C94aBa6114cdf2a4c45B9cb27 0x05ad...E05c Proxy: [email protected]
Multisigs
Name Proxy Implementation Notes
PauserRegistry - 0x41Db...ec1D
OZ: TimelockController - 0x5e83...F6fD
OZ: Proxy Admin - 0xDB02...A6cf

Current Testnet Sepolia Deployment

Core
Name Proxy Implementation Notes
DelegationManager 0xD4A7E1Bd8015057293f0D0A557088c286942e84b 0xa722...67f3 Proxy: [email protected]
StrategyManager 0x2E3D6c0744b10eb0A4e6F679F71554a39Ec47a5D 0x8845...EB1b Proxy: [email protected]
EigenPodManager 0x56BfEb94879F4543E756d26103976c567256034a 0x8b1D...11a0 Proxy: [email protected]
AVSDirectory 0xa789c91ECDdae96865913130B786140Ee17aF545 0xD88b...C188 Proxy: [email protected]
RewardsCoordinator 0x5ae8152fb88c26ff9ca5C014c94fca3c68029349 0xcC30...7940 Proxy: [email protected]
AllocationManager 0x42583067658071247ec8CE0A516A58f682002d07 0x742A...927b Proxy: [email protected]
PermissionController 0x44632dfBdCb6D3E21EF613B0ca8A6A0c618F5a37 0x59B1...f525 Proxy: [email protected]
Strategies

Anyone can deploy and whitelist strategies for standard ERC20s by using the StrategyFactory deployed to the address below (see docs). Strategies deployed from the StrategyFactory are deployed using the beacon proxy pattern:

Name Proxy Implementation Notes
StrategyFactory 0x066cF95c1bf0927124DFB8B02B401bc23A79730D 0xEE41...ca1A Proxy: [email protected]
StrategyBase 0x427e627Bc7E83cac0f84337d3Ad94230C32697D3 0x9E05...7C5c - Beacon: BeaconProxy
- Strategies: UpgradeableBeacon
StETH Strategy 0x8b29d91e67b013e855EaFe0ad704aC4Ab086a574 0x9E05...7C5c Strategy Factory deployed
WETH Strategy 0x424246eF71b01ee33aA33aC590fd9a0855F5eFbc 0x9E05...7C5c Strategy Factory deployed
Strategies - Special

The following strategies differ significantly from the other strategies deployed/used above:

Name Proxy Implementation Notes
EigenStrategy (EIGEN) 0x8E93249a6C37a32024756aaBd813E6139b17D1d5 0x46CF...16db Proxy: [email protected]
Beacon Chain ETH 0xbeaC0eeEeeeeEEeEeEEEEeeEEeEeeeEeeEEBEaC0 - - Used for Beacon Chain ETH shares
- Not a real contract!
EigenPods

NOTE: Due to the permissioned validator set on Sepolia, all EigenPod functionality is PAUSED.

Name Proxy Implementation Notes
EigenPod (beacon) 0x0e19E56E41D42137d00dD4f51EC2F613E50cAcf4 0xd85d...6bCf - Beacon: BeaconProxy
- Pods: UpgradeableBeacon
EIGEN/bEIGEN
Name Proxy Implementation Notes
Eigen 0x0011FA2c512063C495f77296Af8d195F33A8Dd38 0xF83a...8725 Proxy: [email protected]
Backing Eigen 0xc5B857A92245f64e9D90cCc5b096Db82eB77eB5c 0x1298...3173 Proxy: [email protected]
Multisigs
Name Proxy Implementation Notes
PauserRegistry - 0x63AA...20f3
OZ: TimelockController - 0x1BEF...1b5B
OZ: Proxy Admin - 0x56E8...6Fa1