A high-performance arbitrage bot written in Rust that monitors DEX pools for profitable trading opportunities. Stopped on development due to lack of time and the profitability of arbitrage opportunities.
- Real-time mempool monitoring for pending transactions
- Uniswap V2 pool integration and state tracking
- Negative cycle detection using Bellman-Ford algorithm
- Concurrent transaction processing with semaphore-based rate limiting
- Efficient graph-based token relationship tracking
- Checkpoint system for fast pool state recovery
- USD value-based pool filtering
- Support for other DEX protocols (currently only Uniswap V2)
- Gas optimization for backrunning transactions
- Multi-hop arbitrage execution
- Slippage protection mechanisms
- Position sizing and risk management
- Exution of arbitrage trades
There is currently a deadlock issue in the mempool state updates that affects the Bellman-Ford calculation performance. This occurs when:
- The mempool watcher attempts to update pool states
- Concurrent access to the shared token graph causes lock
- This leads to slower negative cycle detection than optimal
The deadlock particularly impacts the arbitrage opportunity detection speed when there are many pool state changes happening simultaneously.
Priority fixes needed:
- Implement fine-grained locking for graph updates
- Add lock-free data structures where possible
- Optimize the concurrency model for mempool updates