EigenLayer Multi-AVS Framework
High-level framework for running multiple EigenLayer AVS services with a single operator.
Overview
This crate provides Rust APIs for:
- Managing multiple AVS registrations with persistent state
- Discovering operator AVS registrations on-chain
- Monitoring rewards and slashing events
- Configuring blueprint execution runtimes (native, hypervisor, container)
For CLI usage, see the CLI README.
Architecture
Multi-AVS Support
Each registered AVS gets:
- Unique Blueprint ID: Derived from service_manager address
- Separate Process: Independent blueprint binary instance
- Isolated State: No shared state between AVS services
- Contract-Specific Args: Each blueprint receives its AVS contract addresses
- Configurable Runtime: Choose execution environment per AVS
Runtime Targets
Each AVS can specify its execution runtime:
-
native- Bare process (no sandbox)- Fastest startup and lowest overhead
- For testing only - no isolation
-
hypervisor- cloud-hypervisor VM (default)- Production-ready VM isolation
- Strong security boundaries
- Resource limits enforced
- Recommended for production
-
container- Docker/Kata containers (Coming Soon)- Not yet implemented
- For now, use
nativefor testing orhypervisorfor production
Registration State
Stored in ~/.tangle/eigenlayer_registrations.json:
Background Services
Operator-level monitoring (runs once per operator):
- Rewards: Check claimable rewards every hour
- Slashing: Monitor for slashing events every 5 minutes
API
Discovery
use AvsDiscoveryService;
let service = new;
// Discover all AVS registrations for an operator
let discovered = service.discover_avs_registrations.await?;
// Check specific AVS registration
let is_registered = service.is_operator_registered_to_avs.await?;
Registration Management
use ;
// Load registrations
let manager = load?;
// Register new AVS
let registration = new;
manager.register?;
// Deregister
manager.deregister?;
// List all registrations
let registrations = manager.registrations;
Rewards & Slashing
use ;
// Check claimable rewards
let rewards_manager = new;
let amount = rewards_manager.get_claimable_rewards.await?;
// Monitor slashing
let slashing_monitor = new;
let is_slashed = slashing_monitor.is_operator_slashed.await?;
Configuration
AVS Registration Config
Examples
See examples/incredible-squaring-eigenlayer/ for a complete AVS blueprint example.
Testing
# Run all tests
# Run manager tests