How pablosinyores/aether works
Aether is an Ethereum arbitrage engine with two paths: block-driven cycle detection and pending-transaction backrunning. Both validate opportunities through EVM simulation and deliver them over gRPC to a Go executor for risk checks, bundle construction, and builder submission. Rust ingestion, pool models, and price state support detection; the mempool path also predicts victim post-state and validates a backrun. Go services provide risk control, monitoring, and prediction reconciliation. Several subsystem links rely on README architecture statements because the relevant source excerpts are incomplete; the contract source is not present in the supplied tree.
Main entry points: main.go Executor orchestration · lib.rs EVM simulation · opportunity.rs Cycle detection · mempool_pipeline.rs Mempool decode pipeline
Components 25
Rust market analysis
- Chain ingestion
crates/ingestion/src - DEX pools and decoders
crates/pools/src - Pool state and price graph
crates/state/src/price_graph.rs - Engine and cycle gating
crates/grpc-server/src/engine.rs - Cycle detection
crates/detector/src/opportunity.rs - EVM simulation
crates/simulator/src/lib.rs - Fork state and caches
crates/simulator/src/fork.rs - Bytecode cache
crates/simulator/src/bytecode_cache.rs - gRPC arb service
crates/grpc-server/src/service.rs - Arb conversion
crates/grpc-server/src/pipeline.rs
Mempool backrun
- Pending transaction ingestion
crates/ingestion/src/mempool.rs - Mempool decode pipeline
crates/grpc-server/src/mempool_pipeline.rs - Victim post-state prediction
crates/simulator/src/post_state_replay.rs - Backrun validation
crates/simulator/src/mempool_backrun.rs
Go execution
- Executor orchestration
cmd/executor/main.go - Risk management
internal/risk/manager.go - Bundle construction
cmd/executor/bundle.go - Builder submission
cmd/executor/submitter.go
Persistence and operations
- PostgreSQL ledger
internal/db/ledger_pg.go - Prediction reconciliation
cmd/reconciler/main.go - Monitoring and alerting
cmd/monitor
Other components
- Ethereum nodes
- Alchemy pending feed
- Block builders
- On-chain executor
Connections 26
- Ethereum nodes → Chain ingestion: streams events
- Chain ingestion → DEX pools and decoders: decodes updates
- DEX pools and decoders → Pool state and price graph: updates pool state
- Pool state and price graph → Engine and cycle gating: supplies graph state
- Engine and cycle gating → Cycle detection: finds cycles
- Cycle detection → EVM simulation: simulates candidates
- Fork state and caches → Bytecode cache: loads cached code
crates/simulator/src/fork.rs - EVM simulation → Fork state and caches: uses fork state
crates/simulator/src/lib.rs - Alchemy pending feed → Pending transaction ingestion: streams pending transactions
- Pending transaction ingestion → Mempool decode pipeline: feeds pending events
crates/grpc-server/src/mempool_pipeline.rs - Mempool decode pipeline → Victim post-state prediction: predicts post-state
crates/grpc-server/src/mempool_pipeline.rs - Victim post-state prediction → Backrun validation: validates backrun
crates/simulator/src/post_state_replay.rs - Backrun validation → EVM simulation: uses fork simulation
crates/simulator/src/lib.rs - Cycle detection → Arb conversion: converts opportunity
crates/grpc-server/src/pipeline.rs - EVM simulation → Arb conversion: converts simulation result
crates/grpc-server/src/pipeline.rs - Arb conversion → gRPC arb service: provides arb payload
crates/grpc-server/src/pipeline.rs - gRPC arb service → Executor orchestration: streams validated arbs
- Executor orchestration → Risk management: checks preflight
cmd/executor/main.go - Executor orchestration → Bundle construction: builds transaction bundle
- Executor orchestration → Builder submission: submits bundle
- Builder submission → Block builders: fans out bundles
- Block builders → On-chain executor: delivers transaction
- Executor orchestration → PostgreSQL ledger: persists trades
- Mempool decode pipeline → PostgreSQL ledger: persists predictions
- Prediction reconciliation → PostgreSQL ledger: reconciles predictions
cmd/reconciler/main.go - Prediction reconciliation → Monitoring and alerting: reports outcomes