Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 5
sidebar_position: 6
title: AVS Contracts
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 5
sidebar_position: 7
title: AVS Security Models
---

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"position": 5,
"label": "Multichain"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
---
sidebar_position: 2
title: Architecture
---

The Multichain Verification framework uses the core contracts and templates in EigenLayer middleware described in the table.
These are not pluggable and are intended to interface with offchain, modular components.

| Contract Name | Deployment Target | Deployer | Description |
|-------------------------------|--------------------------------|--------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **`CertificateVerifier`** | One per target chain | EigenLayer Core Protocol | Enables AVS consumers to verify certificates signed by Operators against transported Operator tables. The `CertificateVerifier` is the single integration point between AVSs and their consumers |
| **`KeyRegistrar`** | Ethereum Singleton | EigenLayer Core Protocol | Unified module for managing and retrieving BN254 and ECDSA cryptographic keys for Operators with built-in key rotation support, extensible to additional curves like BLS381 |
| **`CrossChainRegistry`** | Ethereum Singleton | EigenLayer Core Protocol | Coordination contract that manages the registration and deregistration of Operator Sets to the multichain protocol and exposes read-only functions to generate the Operator Table. | |
| **`OperatorTableCalculator`** | Ethereum, One per Operator Set | AVS Middleware | Required middleware contract specified by an AVS (one per Operator Set) for calculating operator weights, or customizable to decorate weights with custom logic such as stake capping |
| **`OperatorTableUpdater`** | One per target chain | EigenLayer Core Protocol | Parses and verifies the global Stake Table Root and calculates individual Operator tables in the `CertificateVerifier` |


## CertificateVerifier

The `CertificateVerifier` is the core contract that AVSs need to integrate with, and consumers use to verify operator certificates against transported stake tables.
It is the gateway to EigenLayer services (that is, where offchain services come onchain), is deployed on every supported target chain, and holds
the weight values from Ethereum for verifying Operator certificates.

The `CertificateVerifier` has a stable, chain-agnostic integration pattern. You interact with the same
interface regardless of which chain you're deploying to, or which consumers are using your AVS. This enables a "code once,
deploy everywhere" workflow that reduces crosschain complexity, eases integration with other AVSs, and simplifies ongoing maintenance.

## KeyRegistrar

The `KeyRegistrar` manages cryptographic keys for Operators across different Operator Sets. It supports both ECDSA and BN254
key types and ensures global uniqueness of keys across all Operator Sets. The `KeyRegistrar` contract provides trusted,
protocol-controlled code for AVSs to register Operator keys for Operator Sets.

## CrossChainRegistry

The `CrossChainRegistry` is the core contract that manages the registration and deregistration of Operator Sets to the Multichain protocol.
The `CrossChainRegistry` contract exposes read-only functions for calculating Operator Tables that are used offchain to generate
the global Stake Table. The `CrossChainRegistry` is the entrypoint for AVSs using the Multichain protocol, and houses configuration
of staleness periods, and specifies the `OperatorTableCalculator` used to define operator weights for each Operator Set.

## OperatorTableCalculator

The `OperatorTableCalculator` is an AVS-deployed contract (one per Operator Set) that can be used for decorating stake weights with custom logic.
The contract interface allows AVSs to implement complex weighting features such as stake capping, differential asset weighting,
oracle integrations, and minimum requirements. [Default templates](https://github.com/Layr-Labs/eigenlayer-middleware?tab=readme-ov-file#current-middlewarev2-testnet-deployment) that require no interaction or custom logic are provided for
AVSs to specify as the `OperatorTableCalculator`.

## OperatorTableUpdater

The `OperatorTableUpdater` interfaces with offchain transport mechanisms. The `OperatorTableUpdater` confirms the data
that it receives from the global stake table and parses it into individual Operator Table updates on the `CertificateVerifier`.
This enables accurate, timely updates for individual AVS's Operator Tables as Operators are slashed or ejected.

## Contract Interaction
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we consider adding the larger mermaid somewhere ? Maybe when we have more content.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To give an 'it depends' answer -> is the additional context provided by the larger mermaid needed by AVS/app devs, or Operators implementing/operating multichain? If yes, I think we should include. But if it's largely showing more detailed views of the internal calls/contracts, I'd lean to no.

Let me know what you think.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some content from the integration guide. Will create another PR for the how to content.


The contracts interact as illustrated.

```mermaid
classDiagram
direction TD
namespace Middleware-on-Ethereum{
class OperatorTableCalculator {
StakeCapping
StakeWeighting (Multiplier, Oracle)
ProtocolVotingPowerCalc
}
class AVSAdmin {
metadataURI
Permissions/multisigs/governance
verificationDelay
transportPayments
}
class AVSRegistrar {
registerOperator
deregisterOperator
}
class SlasherEjector {
submitEvidence
slashOperator ()
ejectOperator ()
}
class RegistrationHooks{
RegistrationLogic
OperatorCaps
Churn
Sockets
}
}
namespace Ethereum-EigenLayer-Core{
class AllocationManager {
registerForOperatorSets
deregisterFromOperatorSets
allocateStake
deallocateStake
slashOperator()
}
class KeyRegistrar{
registerKey
deregisterKey
getKey (operator addr)
isRegistered (operator addr)
}
class CrossChainRegistry{
setOperatorTableCalculator
getOperatorTableCalculator
makeGenerationReservation
addTransportDestination
calculateOperatorTableBytes()
}
}
namespace TargetChain{
class OperatorTableUpdater{
confirmGlobalTableRoot
updateOperatorTable()
}
class CertificateVerifier{
n Operator Tables
updateOperatorTable()
verifyCert (bool)
}
class AVSConsumer{
requests Operator task
receives cert ()
}
}

namespace Offchain{
class Operator {
consumer input
return certificate()
}
class Transport{
getOperatorTables
n calculateOperatorTableBytes
calculateGlobalStakeTable()
}
}
AllocationManager --> AVSRegistrar
AVSAdmin --> CrossChainRegistry
CrossChainRegistry --> OperatorTableCalculator : Calculates Operator Tables
AVSRegistrar --> RegistrationHooks
RegistrationHooks --> KeyRegistrar
SlasherEjector --> AllocationManager : Slash or eject Operator
CrossChainRegistry --> Transport : Transports Operator tables
Transport --> OperatorTableUpdater: Update global stake root
OperatorTableUpdater --> CertificateVerifier: Update Operator Table
Operator --> AVSConsumer : Produces certificate
Operator <-- AVSConsumer : Requests task
AVS Consumer --> CertificateVerifier : Verifies Certificate
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
sidebar_position: 1
title: Overview
---

:::important
Multichain verification is early-access and in active development. Expect iterative updates before the mainnet release.

Multichain verification implements [ELIP-008 EigenLayer Multichain Verification](https://github.com/eigenfoundation/ELIPs/blob/elip-008v1/ELIPs/ELIP-008.md) and is available on testnet in v1.7.0.
:::

Multichain verification enables developers to build verifiable services that can operate across multiple chains and consumers of
those services to verify those services on supported chains with the same trust and security of restaked assets on Ethereum.

## Components

The multichain verification framework uses standardized infrastructure for key management, stake verification, and certificate
validation.

| **Component** | **Description** |
|---------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **Weight** | Standard process for stake weighting in the core and middleware. The AVS defines an array of numerical values representing an individual Operator's weight for work and reward distribution in the Operator Set. In the simplest form this may represent an Operator’s delegation or allocation of a single asset but is customizable for more complicated work distribution criteria. |
| **Operator table** | Data structure representing Operator weights of all Operators in a Operator Set (optionally custom-weighted). |
| **Table calculation** | To facilitate the generation of Operator weights by the core protocol, AVSs specify a `OperatorTableCalculator` for each Operator Set to decorate stake weighting of different assets and apply the formats required by the AVS. |
| **Stake table** | Data structure (merkle tree) representing the global view of all Operator Sets and their corresponding Operator Tables. One of these lives on each target chain. The root of the stake table is the global table root. |
| **Certificates & certificate verification** | Data structure for signed Operator outputs (certificates) and a core contract (`CertificateVerifier`) for verifying those outputs against the Operator Table and Operator consensus rules (for example, signed weight above nominal or proportional stake thresholds). |
| **Stake generation & transport** | Specification for generating and verifying the global stake table root and transporting it to core contracts on supported target chains. The process is pluggable by AVSs and other third-parties.

## Process

To have a single global root with up-to-date stake representation on target chains where an verifiable service is available:

1. On Ethereum, the developer of the verifiable service specifies the logic for calculating its single, weighted Operator Table.
2. Offchain, EigenLabs combines the many Operator Set representations to generate a global stake table.
3. Crosschain, the global stake table is transported to target chains, and Operator Tables calculated.
4. On target chains, Operater Tables are used for verifying Operator certificates.
5. Offchain and crosschain, weekly, or as forcible updates are needed (for example, when an Operator is ejected or slashed), the global stake table is regenerated and transported again.
This ensures up-to-date weight representations wherever the verifiable service is consumed.

Certificates are produced by Operators running a multichain verifiable service. To verify operator certificates against transported stake tables,
consumers use the `CertificateVerifier`.
2 changes: 1 addition & 1 deletion docs/products/eigenlayer/developers/concepts/task.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 8
sidebar_position: 9
title: Tasks
---

Expand Down