A high-performance C++ console application for scanning, analyzing, and identifying arbitrage opportunities across decentralized exchanges (DEX) on multiple blockchains.
- Multi-Blockchain Support: Ethereum, BSC, Polygon, Fantom, Avalanche, Solana
- DEX Discovery: Automatic detection of factory contracts and pools
- Real-time Scanning: Multithreaded blockchain scanning with configurable ranges
- Free RPC Integration: Uses only free, public RPC endpoints
- Cross-platform: Windows, Linux, and macOS support
- Performance Monitoring: Built-in statistics and performance metrics
- Configuration Management: JSON-based configuration with automatic setup
- Comprehensive Testing: 100% test coverage with 3 test suites (18+ tests)
- C++20 compatible compiler (GCC 10+, Clang 12+, MSVC 2022+)
- CMake 3.16 or higher
- libcurl development libraries
- Google Test framework for C++ testing
Ubuntu/Debian:
sudo apt install build-essential cmake libcurl4-openssl-devmacOS:
brew install cmake curlWindows:
# Using vcpkg
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg && ./bootstrap-vcpkg.bat
./vcpkg install curl:x64-windowsThe project includes container runners for different environments:
# Make scripts executable
chmod +x scripts/containers/*.sh
# Run in Alpine Linux (lightweight)
./scripts/containers/run-alpine-simple.sh
# Run in Ubuntu Linux (full compatibility)
./scripts/containers/run-ubuntu-container.sh
# Run Windows apps in Ubuntu via Wine
./scripts/containers/run-windows-in-ubuntu-wine.sh --create
# Show help for any runner
./scripts/containers/run-ubuntu-container.sh --helpgit clone <repository-url>
cd DEXArb
mkdir build && cd build
cmake ..
cmake --build . --config Release
# Binary will be created in build/bin/NeoZorKDEXArbThe project includes comprehensive C++ unit tests using Google Test framework with 100% success rate:
# Build and run all tests
mkdir cmake-build-debug && cd cmake-build-debug
cmake -G "Unix Makefiles" ..
make -j$(sysctl -n hw.ncpu) # macOS
# or
make -j$(nproc) # Linux
# Run all tests
ctest --output-on-failure
# Run individual test suites
./NeoZorKDEXArbTests # Basic functionality tests
./ModernResultTests # Modern Result<T,E> class tests
./ModernFormatTests # Formatting utilities tests- Total Test Suites: 3
- Total Tests: 18+
- Success Rate: 100%
- Execution Time: <0.01 seconds
- Coverage: Modern utilities, core functionality, error handling
The project includes organized build scripts in the scripts/ directory:
# Make scripts executable
chmod +x scripts/**/*.sh
# Modern build (recommended)
./scripts/build/build-modern.sh
# Multi-platform build
./scripts/build/build-multi-platform.sh
# Apple Silicon container build
./scripts/build/build-apple-container.sh
# Basic CMake build
./scripts/build/cmake.shFor containerized development:
# Run in lightweight Alpine container (recommended)
./scripts/containers/run-alpine-simple.sh -- --help
# Quick testing
./scripts/testing/quick-test.sh
# Deploy binaries
./scripts/deployment/DeployBins.shScripts Directory Structure:
scripts/build/- Build and compilation scriptsscripts/containers/- Container management scriptsscripts/docker/- Docker files and configurationsscripts/testing/- Testing and validation scriptsscripts/deployment/- Deployment automationscripts/utilities/- Utility and helper scripts
See scripts/README.md for detailed usage information.
# Scan Ethereum for DEXes (last 10,000 blocks)
./NeoZorKDEXArb -scan ethereum 10000
# Show discovered DEXes
./NeoZorKDEXArb -showDEXES ethereum
# Show pools for a specific DEX
./NeoZorKDEXArb -showPOOLS ethereum 0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f
# Find a specific token
./NeoZorKDEXArb -findTOKEN ethereum 0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f 0xA0b86a33E6441b8C4C8C8C8C8C8C8C8C8C8C8C8C8| Blockchain | Command | Example |
|---|---|---|
| Ethereum | ethereum |
./NeoZorKDEXArb -scan ethereum 5000 |
| Binance Smart Chain | bsc |
./NeoZorKDEXArb -scan bsc 5000 |
| Polygon | polygon |
./NeoZorKDEXArb -scan polygon 5000 |
| Fantom | fantom |
./NeoZorKDEXArb -scan fantom 5000 |
| Avalanche | avalanche |
./NeoZorKDEXArb -scan avalanche 5000 |
| Solana | solana |
./NeoZorKDEXArb -showSCAN-CONFIG solana |
| Flag | Description | Example |
|---|---|---|
-scan |
Scan blockchain for DEXes | -scan ethereum 10000 |
-showDEXES |
Show all discovered DEXes | -showDEXES ethereum |
-showPOOLS |
Show pools for a DEX | -showPOOLS ethereum 0x... |
-showTOKENS |
Show tokens for a DEX | -showTOKENS ethereum 0x... |
-findTOKEN |
Find token in a DEX | -findTOKEN ethereum 0x... 0x... |
-findTOKENS |
Find token across all DEXes | -findTOKENS ethereum 0x... |
-showSCAN-CONFIG |
Show scan configuration | -showSCAN-CONFIG ethereum |
-showSCAN |
Show scan results | -showSCAN ethereum |
-showSCAN-STAT |
Show scan statistics | -showSCAN-STAT ethereum |
The application automatically creates a neozork-config file on first run:
{
"threads": 3,
"ethereum": {
"rpc_endpoints": [
{"url": "https://rpc.ankr.com/eth", "request_limit": 20},
{"url": "https://eth.llamarpc.com", "request_limit": 25}
],
"dex": []
}
}- threads: Number of parallel threads for scanning
- rpc_endpoints: Array of RPC endpoints with rate limits
- dex: Automatically populated with discovered DEX information
neozork-config: Configuration and discovered DEX dataneozork-scan-stat: Performance statistics and metrics- Console Output: Color-coded real-time information
| CPU Cores | Recommended Threads |
|---|---|
| 4-core | 3-4 threads |
| 8-core | 6-8 threads |
| 16+ core | 8-12 threads |
- Small scans (1,000-10,000): Quick testing
- Medium scans (10,000-100,000): Good discovery
- Large scans (100,000+): Comprehensive analysis
DEXArb/
โโโ bin/ # Compiled binaries
โโโ include/ # Header files
โโโ src/ # Source files
โโโ docs/ # Documentation
โโโ CMakeLists.txt # Build configuration
โโโ README.md # This file
- Documentation Index: Complete documentation overview
- Quick Start Guide: Get up and running in 5 minutes
- Build and Usage Guide: Comprehensive setup and usage instructions
- Project Description: Detailed technical overview and architecture
- Solana Support: Limited to configuration display
- Arbitrage Execution: Core logic implemented as stubs
- Wallet Integration: Placeholder functions
- Profit Analysis: Basic implementation
- Read-only Operations: All blockchain operations are read-only
- No Private Keys: Application doesn't handle private keys
- Free RPC Only: Uses only free, public RPC endpoints
- Rate Limiting: Built-in protection against RPC rate limits
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For issues and questions:
- Check the troubleshooting section
- Review the configuration file
- Verify RPC endpoint availability
- Check system resources and network connectivity
- Complete arbitrage execution functionality
- Enhanced Solana support
- Wallet integration for automated trading
- Advanced profit analysis and risk management
- Web interface for data visualization
- Real-time monitoring and alerts
Version: 1.0.7
Last Updated: March 2025
Author: Rostyslav S.