Skip to content

security-alliance/drill-template-multichain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multichain Drill Infrastructure

A framework for conducting cross-chain incident response drills, focusing on Ethereum L1 and Optimism L2 interactions.

Motivation

DeFi protocols increasingly operate across multiple chains, making incident response more complex. When incidents occur, responders often need to coordinate actions across both L1 and L2 chains simultaneously.

This project provides infrastructure to:

  • Set up realistic test environments across chains
  • Simulate user activities including bridging and transfers
  • Monitor and relay cross-chain messages
  • Track bridge transactions and volume

Architecture

image

Test Networks

  • Configurable forks of Ethereum mainnet and Optimism
  • Uses Tenderly Virtual Testnets for testing environments (could be extended to use Anvil)
  • Maintains state consistency across both chains

Components

  1. Message Relayer

    • Monitors L1 CrossDomainMessenger for events
    • Relays messages to L2
    • Handles message passing between chains
  2. User Simulation Bots

    • Simulates bridging operations
    • Performs ERC20 and ETH transfers
    • Operates on both L1 and L2
  3. Monitoring Service

    • Tracks bridge transactions
    • Measures transaction volume
    • Provides metrics for drill evaluation

Limitations

  • Currently only supports L1 → L2 deposits and transactions
  • Withdrawals (L2 → L1) not yet implemented
  • Assumes normal rollup operation

Architecture Details

Message Passing

Monitoring

  • Tracks bridge events on both chains
  • Compares transaction data with mainnet
  • Provides real-time metrics

Setup

Prerequisites

  • Node.js >= 20
  • Docker
  • Foundry
  • Tenderly API access

Repository Structure

├── foundry/           
│   ├── src/           # Smart contracts
│   └── ts/          
│       ├── lib/          # Shared libraries
│       └── scripts/      # Deployment and management scripts
|   
├── services/          # Backend services
│   └── src/          
│       ├── message-relayer/     # Message relayer service
│       ├── bot/                 # User simulation bots
│       └── monitor/             # Monitoring service
|   
└── monitoring/          # Monitoring service
    └── compose.yaml      # Docker compose file for monitoring service with Grafana and Prometheus

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published