AVS Middleware Contracts
AVS Middleware Contracts
Comparison of AVS Types
Feature | ValidatorAVS | GatewayAVS |
---|---|---|
Purpose | For validators with minimal setup changes | For operators handling preconfirmations |
Registration | Simple operator registration | Requires BLS key registration |
Slashing Risk | No slashing risk | Can be slashed for missed duties |
Duties | Basic block proposal | Preconfirmation tasks |
State Management | Basic operator tracking | Complex state with BLS keys |
Rewards | From block proposals | From preconfirmation fees |
Software Requirements | Basic ETH client + Commit-boost | Advanced pricing & preconf logic |
Setup Complexity | Basic EL + CL setup | Sophisticated Gateway setup |
ValidatorAVS External Functions
Registration Functions
Registers multiple validators for multiple pod owners in a single transaction. Each validator must be active in EigenLayer and the pod owner must have an active EigenPod. The function also handles self-delegation scenarios where the pod owner acts as their own GatewayAVS operator.
Opt-Out Functions
Initiates the opt-out process for a validator. Only registered operators can call this function. Starts the cooldown period before the validator can fully opt out.
Confirms a validator’s opt-out after the cooldown period has elapsed. Can be called by anyone once the cooldown is complete.
Batch Operations
Batch version of initiateValidatorOptOut for multiple validators. Requires caller to be a registered operator.
Batch version of confirmValidatorOptOut for multiple validators. Can be called after cooldown period.
Reward Management
Handles validator-based reward distribution logic. Can only be invoked by the gateway AVS during reward distribution. Distributes rewards among operators proportional to their validator count.
GatewayAVS External Functions
Registration Functions
Registers a new gateway operator with their BLS public key. The operator must provide a valid signature proving control of both their address and BLS key.
Reward Management
Handles distribution of gateway rewards to operators. Calculates and distributes rewards based on operator performance and stake.
Operator Management
Updates the BLS public key for an existing gateway operator. Requires a valid signature proving control of both the operator address and new BLS key.
Records a preconfirmation from a gateway operator. Used to track operator performance and calculate rewards.
Records slashing for a gateway operator who failed to fulfill their duties. Only callable by authorized slashing contracts.
Architecture Overview
Events
ValidatorAVS Events
GatewayAVS Events
Integration with EigenLayer
Both contracts inherit from EigenLayerMiddleware and implement required interfaces:
This ensures proper integration with EigenLayer’s core functionality while maintaining distinct responsibilities for each AVS type.