How jtapolcai/tycho-searcher works
Tycho Searcher consumes live pool updates, maintains a token-and-pool graph, isolates connected components, detects candidate arbitrage cycles, and evaluates their profitability with gas-aware trade sizing. Profitable opportunities can be logged or saved; graph export is also a documented capability. The sampled excerpts show the stream handoff, component build, quoting, optimization, and cycle evaluation, but omit some orchestration details, so uncertain internal links are left out.
Main entry points: mod.rs Searcher · main.rs Runtime Runner · bellman_ford.rs Cycle Detection · price_quoter.rs Pool Quoter
Components 17
Input and Updates
- CLI Configuration
src/command_line_parameters.rs - Runtime Runner
src/main.rs - Block Updates
src/main.rs
Market Graph
- Searcher
src/searcher/mod.rs - Token Pool Graph
src/searcher/graph_types.rs - Component Analysis
src/searcher/graph_components.rs - Pool Quoter
src/searcher/price_quoter.rs
Arbitrage Analysis
- Cycle Detection
src/searcher/bellman_ford.rs - Trade Optimization
src/searcher/one_dimensional_optimisation.rs - Cycle Merging
src/searcher/merge_cycles.rs - Opportunity Verification
src/searcher/arbitrage_save.rs
Results and Observability
- Arbitrage Export
src/searcher/arbitrage_save.rs - Logging
src/searcher/logging.rs - Graph Export
src/searcher/mod.rs
Other components
- Operator
- Tycho Feed
- Chain RPC
Connections 21
- Operator → CLI Configuration: sets options
- CLI Configuration → Runtime Runner: configures run
- Runtime Runner → Chain RPC: checks endpoint
- Runtime Runner → Tycho Feed: builds stream
- Tycho Feed → Block Updates: emits blocks
- Runtime Runner → Block Updates: sends updates
- Block Updates → Searcher: delivers updates
- Searcher → Token Pool Graph: updates pools
- Searcher → Component Analysis: builds components
- Searcher → Cycle Detection: runs detection
- Cycle Detection → Trade Optimization: optimizes candidates
- Cycle Detection → Pool Quoter: simulates trades
- Trade Optimization → Pool Quoter: queries prices
- Searcher → Cycle Merging: merges cycles
- Searcher → Opportunity Verification: verifies opportunities
- Opportunity Verification → Pool Quoter: simulates cycle
- Searcher → Arbitrage Export: saves opportunity
- Searcher → Graph Export: exports graph
- Searcher → Logging: reports activity
- Pool Quoter → Logging: reports quotes
- Cycle Detection → Logging: reports candidates