OuroBroker is an advanced, AI-driven algorithmic market maker designed for decentralized exchanges (DEXs). By leveraging cutting-edge machine learning techniques, high-performance computing, and blockchain technology, OuroBroker aims to provide superior liquidity and trading strategies in the decentralized finance (DeFi) ecosystem.
- Features
- Architecture
- Installation
- Usage
- Configuration
- Development
- Testing
- Deployment
- Contributing
- License
- Contact
- AI-Powered Trading: Utilizes reinforcement learning models to make intelligent trading decisions.
- Multi-DEX Support: Operates across multiple decentralized exchanges simultaneously.
- High-Performance Backend: Go-based backend for efficient order management and execution.
- Smart Contract Integration: Solidity contracts for on-chain operations and liquidity provision.
- GPU Acceleration: CUDA and Triton optimizations for high-speed computations.
- Real-time Risk Management: Continuous monitoring and adjusting of risk exposure.
- Interactive Dashboard: Web-based interface for real-time monitoring and control.
- Extensible Architecture: Modular design allowing easy integration of new DEXs and trading strategies.
OuroBroker consists of several interconnected components:
-
Smart Contracts:
MarketMaker.sol
: Main contract for executing trades and managing liquidity.LiquidityPoolManager.sol
: Manages liquidity across different pools.RiskManagement.sol
: Implements on-chain risk management strategies.
-
Backend Services:
main.go
: Entry point for the backend service.order_manager.go
: Manages order creation and execution.dex_interface.go
: Interfaces with various DEXs.risk_monitor.go
: Off-chain risk monitoring and management.config.go
: Configuration management for the backend.
-
Machine Learning Models:
model_training.py
: Trains the reinforcement learning models.model_inference.py
: Performs inference for real-time decision making.reinforcement_env.py
: Simulates the trading environment for training.data_pipeline.py
: Manages data ingestion and preprocessing.
-
GPU Acceleration:
cuda_kernels.cu
: Custom CUDA kernels for parallelized operations.triton_functions.py
: Triton-based optimizations for machine learning models.
-
C++ Components:
order_book.cpp/h
: Implements a fast, in-memory order book.trade_executor.cpp/h
: Executes trades with minimal latency.
-
Dashboard:
index.html
: Main dashboard page.app.js
: Frontend logic for the dashboard.styles.css
: Styling for the dashboard.api_endpoint.go
: Backend API for the dashboard.
-
Clone the repository:
git clone https://github.com/selimozten/ourobroker.git cd ourobroker
-
Install dependencies:
# Install Go dependencies go mod tidy # Install Python dependencies pip install -r requirements.txt # Install C++ dependencies ./install_cpp_deps.sh
-
Set up the configuration file:
cp configs/config.yaml.example configs/config.yaml # Edit configs/config.yaml with your specific settings
-
Build the project:
make build
-
Deploy the smart contracts:
./scripts/deploy_contracts.sh
-
Start the backend services:
./scripts/start_backend.sh
-
Run the dashboard:
cd dashboard go run api_endpoint.go
-
Access the dashboard at
http://localhost:8080
Edit configs/config.yaml
to customize OuroBroker's behavior. Key configuration options include:
dex_urls
: List of DEX API endpointssupported_tokens
: List of tokens to traderisk_parameters
: Risk management thresholdsml_model_path
: Path to the trained machine learning modelgpu_settings
: Configuration for GPU acceleration
To set up the development environment:
-
Install development tools:
make install-dev-tools
-
Run tests:
make test
-
Format code:
make format
-
Run linters:
make lint
OuroBroker uses a comprehensive testing suite:
- Unit tests:
make test-unit
- Integration tests:
make test-integration
- Smart contract tests:
truffle test
For production deployment:
-
Build production binaries:
make build-prod
-
Deploy smart contracts to mainnet:
./scripts/deploy_contracts_prod.sh
-
Start production services:
./scripts/start_prod.sh
We welcome contributions to OuroBroker! Please see our Contributing Guide for more details on how to get started.
OuroBroker is released under the MIT License. See the LICENSE file for more details.
- Project Maintainer: Selim Ozten
- GitHub: @selimozten
- Email: ozten@inpocket.ai
For bug reports and feature requests, please use the GitHub Issues page.
OuroBroker - Empowering DeFi with Intelligent Market Making