-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
10 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,100 +92,6 @@ Key features include: | |
Specific functionalities about the restaking protocols are handled inside | ||
the `IBoltMiddleware` contracts, such as `BoltSymbioticMiddleware` and `BoltEigenlayerMiddleware`. | ||
|
||
### Symbiotic Integration guide for Staking Pools | ||
|
||
As a staking pool, it is assumed that you are already in control of a Symbiotic Vault. | ||
If not, please refer to the [Symbiotic docs](https://docs.symbiotic.fi/handbooks/Handbook%20for%20Vaults) | ||
on how to spin up a Vault and start receiving stake from your node operators. | ||
|
||
Opting into Bolt works as any other Symbiotic middleware integration. Here are the steps: | ||
|
||
1. Make sure your vault collateral is whitelisted in `BoltSymbioticMiddleware` by calling `isCollateralWhitelisted`. | ||
2. Register as a vault in `BoltSymbioticMiddleware` by calling `registerVault`. | ||
3. Verify that your vault is active in `BoltSymbioticMiddleware` by calling `isVaultEnabled`. | ||
4. Set the network limit for your vault in Symbiotic with `Vault.delegator().setNetworkLimit()`. | ||
5. You can now start approving operators that opt in to your vault directly in Symbiotic. | ||
6. When you assign shares to operators, they are able to provide commitments on behalf of your collateral. | ||
|
||
### Symbiotic Integration guide for Operators | ||
|
||
As an operator, you will need to opt-in to the Bolt Network and any Vault that trusts you to provide | ||
commitments on their behalf. | ||
|
||
The opt-in process requires the following steps: | ||
|
||
1. register in Symbiotic with `OperatorRegistry.registerOperator()`. | ||
2. opt-in to the Bolt network with `OperatorNetworkOptInService.optIn(networkAddress)`. | ||
3. opt-in to any vault with `OperatorVaultOptInService.optIn(vaultAddress)`. | ||
4. register in Bolt with `BoltSymbioticMiddleware.registerOperator(operatorAddress)`. | ||
5. get approved by the vault. | ||
6. start providing commitments with the stake provided by the vault. | ||
|
||
### EigenLayer Integration Guide for Node Operators and Solo Stakers | ||
|
||
> [!NOTE] | ||
> Without loss of generality, we will assume the reader of this guide is a Node | ||
> Operator (NO), since the same steps apply to solo stakers. | ||
As a Node Operator you will be an ["Operator"](https://docs.eigenlayer.xyz/eigenlayer/overview/key-terms) | ||
in the Bolt AVS built on top of EigenLayer. This requires | ||
running an Ethereum validator and the Bolt sidecar in order issue | ||
preconfirmations. | ||
|
||
The Operator will be represented by an Ethereum address that needs | ||
to follow the standard procedure outlined in the | ||
[EigenLayer documentation](https://docs.eigenlayer.xyz/) to opt into EigenLayer. Let's go through the steps: | ||
|
||
1. As an Operator, you register into EigenLayer using [`DelegationManager.registerAsOperator`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/mainnet/src/contracts/core/DelegationManager.sol#L107-L119). | ||
|
||
2. As an Ethereum validator offering precofirmations a NO needs some collateral in | ||
order to be economically credible. In order to do that, some entities known as a "stakers" | ||
need to deposit whitelisted Liquid Staking Tokens (LSTs) | ||
into an appropriate "Strategy" associated to the LST via the | ||
[`StrategyManager.depositIntoStrategy`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/mainnet/src/contracts/core/StrategyManager.sol#L105-L110), | ||
so that the Operator has a `min_amount` (TBD) of collateral associated to it. | ||
Whitelisted LSTs are exposed by the `BoltEigenLayerMiddleware` contract | ||
in the `getWhitelistedCollaterals` function. | ||
Note that NOs and stakers can be two different entities | ||
_but there is fully trusted relationship as stakers will be slashed if a NO misbehaves_. | ||
|
||
3. After the stakers have deposited their collateral into a strategy they need | ||
to choose you as their operator. To do that, they need to call the function | ||
[`DelegationManager.delegateTo`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/mainnet/src/contracts/core/DelegationManager.sol#L154-L163). | ||
|
||
4. As an Operator you finally opt into the Bolt AVS by interacting with the `BoltEigenLayerMiddleware`. | ||
This consists in calling the function `BoltEigenLayerMiddleware.registerOperatorToAVS`. | ||
The payload is a signature whose digest consists of: | ||
|
||
1. your operator address | ||
2. the `BoltEigenLayerMiddleware` contract address | ||
3. a salt | ||
4. an expiry 2. | ||
|
||
The contract will then forward the call to the [`AVSDirectory.registerOperatorToAVS`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/mainnet/src/contracts/core/AVSDirectory.sol#L64-L108) | ||
with the `msg.sender` set to the Bolt AVS contract. Upon successful verification of the signature, | ||
the operator is considered `REGISTERED` in a mapping `avsOperatorStatus[msg.sender][operator]`. | ||
|
||
Lastly, a NO needs to interact with both the `BoltValidators` and `BoltEigenLayerMiddleware` | ||
contract. This is needed for internal functioning of the AVS and to make RPCs aware that you are a | ||
registered operator and so that they can forward you preconfirmation requests. | ||
|
||
The steps required are the following: | ||
|
||
1. Register all the validator public keys you want to use with Bolt via the `BoltValidators.registerValidator`. | ||
If you own more than one validator public key, | ||
you can use the more gas-efficient `BoltValidators.batchRegisterValidators` function. | ||
The `authorizedOperator` argument must be the same Ethereum address used for | ||
opting into EigenLayer as an Operator. | ||
|
||
2. Register the same Operator address in the `BoltEigenLayerMiddleware` contract by calling | ||
the `BoltEigenLayerMiddleware.registerOperator` function. This formalizes your role within the Bolt network | ||
and allows you to manage operations effectively, such as pausing or resuming | ||
your service. | ||
|
||
3. Register the EigenLayer strategy you are using for restaking _if it has not been done by someone else already_. | ||
This ensures that your restaked assets are correctly integrated with Bolt’s system. | ||
|
||
## Fault Proof Challenge: `BoltChallenger` | ||
|
||
The [`BoltChallenger`](./src/contracts/BoltChallenger.sol) contract is the component responsible | ||
|
@@ -248,6 +154,16 @@ the slashing request before it is executed on-chain. | |
Subscribing to breached challenge events from the `BoltChallenger` is a trustless way to determine if a slashing | ||
request is valid according to Bolt Protocol rules. --> | ||
|
||
## Holesky Deployments | ||
|
||
| Name | Address | Notes | | ||
| ---------------------- | -------------------- | ----------------------- | | ||
| [`BoltParametersV1`](./src/contracts/BoltParametersV1.sol) | [0x20d1cf3A5BD5928dB3118b2CfEF54FDF9fda5c12](https://holesky.etherscan.io/address/0x20d1cf3A5BD5928dB3118b2CfEF54FDF9fda5c12) | Proxy: [`[email protected]`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v5.0/contracts/proxy/ERC1967/ERC1967Proxy.sol) | | ||
| [`BoltValidatorsV1`](./src/contracts/BoltValidatorsV1.sol) | [0x47D2DC1DE1eFEFA5e6944402f2eda3981D36a9c8](https://holesky.etherscan.io/address/0x47D2DC1DE1eFEFA5e6944402f2eda3981D36a9c8) | Proxy: [`[email protected]`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v5.0/contracts/proxy/ERC1967/ERC1967Proxy.sol) | | ||
| [`BoltManagerV1`](./src/contracts/BoltManagerV1.sol) | [0x440202829b493F9FF43E730EB5e8379EEa3678CF](https://holesky.etherscan.io/address/0x440202829b493F9FF43E730EB5e8379EEa3678CF) | Proxy: [`[email protected]`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v5.0/contracts/proxy/ERC1967/ERC1967Proxy.sol) | | ||
| [`BoltEigenLayerMiddlewareV1`](./src/contracts/BoltEigenLayerMiddlewareV1.sol) | [0xa632a3e652110Bb2901D5cE390685E6a9838Ca04](https://holesky.etherscan.io/address/0xa632a3e652110Bb2901D5cE390685E6a9838Ca04) | Proxy: [`[email protected]`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v5.0/contracts/proxy/ERC1967/ERC1967Proxy.sol) | | ||
| [`BoltSymbioticMiddlewareV1`](./src/contracts/BoltSymbioticMiddlewareV1.sol) | [0x04f40d9CaE475E5BaA462acE53E5c58A0DD8D8e8](https://holesky.etherscan.io/address/0x04f40d9CaE475E5BaA462acE53E5c58A0DD8D8e8) | Proxy: [`[email protected]`](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v5.0/contracts/proxy/ERC1967/ERC1967Proxy.sol) | | ||
|
||
## Testing | ||
|
||
We use Forge, a fast and flexible Ethereum testing framework, for our smart contract tests. | ||
|