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.
The main branches we use are:
dev (default)
: The most up-to-date branch, containing the work-in-progress code for upcoming releasestestnet-holesky
: Our current testnet deploymentmainnet
: Our current mainnet deloyment
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:
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.
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
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
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 using this script to read from config.yml
:
source source-env.sh [goerli|local]
Then run the tests:
forge test --fork-url [RPC_URL]
- Install solhint, then run:
solhint 'src/contracts/**/*.sol'
- Install slither, then run:
slither .
- Install surya and graphviz:
npm i -g surya
apt install graphviz
- Then, run:
surya inheritance ./src/contracts/**/*.sol | dot -Tpng > InheritanceGraph.png
surya mdreport surya_report.md ./src/contracts/**/*.sol
make bindings
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.
Name | Proxy | Implementation | Notes |
---|---|---|---|
EigenStrategy (EIGEN) |
0xaCB55C530Acdb2849e6d4f36992Cd8c9D50ED8F7 |
0x27e7...0428 |
Proxy: TUP@4.9.0 |
Name | Proxy | Implementation | Notes |
---|---|---|---|
EigenPod (beacon) |
0x5a2a4F2F3C18f09179B6703e63D9eDD165909073 |
0x2814...ffcc |
- Beacon: BeaconProxy - Pods: UpgradeableBeacon |
DelayedWithdrawalRouter |
0x7Fe7E9CC0F274d2435AD5d56D5fa73E47F6A23D8 |
0x4bb6...4226 |
Proxy: TUP@4.7.1 |
EigenLayerBeaconOracle |
- | 0x3439...5442 |
Provided by Succinct |
Name | Proxy | Implementation | Notes |
---|---|---|---|
Eigen |
0xec53bf9167f50cdeb3ae105f56099aaab9061f83 |
0x7ec3...700b |
Proxy: TUP@4.9.0 |
Backing Eigen |
0x83E9115d334D248Ce39a6f36144aEaB5b3456e75 |
0xB91c...FFE3 |
Proxy: TUP@4.9.0 |
SignedDistributor |
- | 0x035b...ad02 |
- |
The current testnet deployment is on holesky, and is from our M2 beta release. You can view the deployed contract addresses below, or check out the code itself on the testnet-holesky
branch.
Name | Proxy | Implementation | Notes |
---|---|---|---|
EigenStrategy (EIGEN) |
0x43252609bff8a13dFe5e057097f2f45A24387a84 |
0x9465...2697 |
Proxy: TUP@4.7.1 |
Name | Proxy | Implementation | Notes |
---|---|---|---|
EigenPod (beacon) |
0x7261C2bd75a7ACE1762f6d7FAe8F63215581832D |
0xe98f...641c |
- Beacon: BeaconProxy - Pods: UpgradeableBeacon |
DelayedWithdrawalRouter |
0x642c646053eaf2254f088e9019ACD73d9AE0FA32 |
0xcE8b...3407 |
Proxy: TUP@4.7.1 |
EigenLayerBeaconOracle |
- | 0x4C11...8f25 |
Provided by Succinct |
Name | Proxy | Implementation | Notes |
---|---|---|---|
Eigen |
0x3B78576F7D6837500bA3De27A60c7f594934027E |
0x083b...8c5a |
Proxy: TUP@4.7.1 |
Backing Eigen |
0x275cCf9Be51f4a6C94aBa6114cdf2a4c45B9cb27 |
0x4500...bce8 |
Proxy: TUP@4.7.1 |
Name | Proxy | Implementation | Notes |
---|---|---|---|
PauserRegistry |
- | 0x85Ef...2F06 |
|
Compound: Timelock |
- | 0xcF19...0A7D |
|
OZ: Proxy Admin |
- | 0xDB02...A6cf |