Caution
The code has not been audited yet—tread with caution.
Caution
Once the minimum thawing period has passed, the losing party of a dispute may be able to withdraw its stake from the HorizonStaking contract.
In consequence, disputes should be resolved before that period ends to ensure that funds are slashable.
EBO is a mechanism for clock synchronization in a multichain environment. It enables The Graph to permissionlessly synchronize clocks between Arbitrum (where the protocol contracts are deployed), and multiple other supported chains, allowing rewards to be paid to indexers.
| Yarn command | Description |
|---|---|
yarn build |
Compile all contracts. |
yarn coverage |
See forge coverage report. |
yarn deploy:arbitrum |
Deploy the contracts to Arbitrum Mainnet. |
yarn deploy:arbitrum-sepolia |
Deploy the contracts to Arbitrum Sepolia. |
yarn test |
Run all unit and integration tests. |
yarn test:unit |
Run unit tests. |
yarn test:unit:deep |
Run unit tests with 5000 fuzz runs. |
yarn test:integration |
Run integration tests. |
To clone this repository locally, run:
git clone [email protected]:defi-wonderland/EBO.gitThis project uses Foundry.
- Install Foundry by following the instructions from their repository.
- Copy the
.env.examplefile to.envand fill in the variables. - Install the dependencies by running:
yarn install. In case there is an error with the commands, runfoundryupand try them again.
The default way to build the code is suboptimal but fast, you can run it via:
yarn buildIn order to build a more optimized code (via IR), run:
yarn build:optimizedUnit tests are built based on the Branched-Tree Technique using Bulloak, while formal verification and property-based fuzzing are achieved with Halmos and Medusa, respectively.
Make sure to set ARBITRUM_SEPOLIA_RPC environment variable before running integration tests.
In order to run both unit and integration tests, run:
yarn testIn order to just run unit tests, run:
yarn test:unitIn order to run unit tests and run way more fuzzing than usual (5x), run:
yarn test:unit:deepIn order to just run integration tests, run:
yarn test:integrationTo run only the Medusa fuzzing campaign (which requires having Medusa installed), run:
yarn test:fuzzIn order to just run the symbolic execution tests (which requires having Halmos installed), run:
yarn test:symbolicIn order to check your current code coverage, run:
yarn coverageConfigure the .env variables.
Import your private keys into Foundry's encrypted keystore:
cast wallet import $ARBITRUM_DEPLOYER_NAME --interactivecast wallet import $ARBITRUM_SEPOLIA_DEPLOYER_NAME --interactiveyarn deploy:arbitrumyarn deploy:arbitrum-sepoliaThe deployments are stored in ./broadcast.
See the Foundry Book for available options.
The addresses of the contracts deployed on Arbitrum will be listed here.
The primary license for EBO contracts is MIT, see LICENSE.
EBO was built with ❤️ by Wonderland.
Wonderland is a team of top Web3 researchers, developers, and operators who believe that the future needs to be open-source, permissionless, and decentralized.
DeFi sucks, but Wonderland is here to make it better.