Open-source DEX aggregation engine and UI that delivers best-price routing across the Stellar DEX (SDEX) orderbook and Soroban AMM pools.
π Actively seeking contributors! We're building critical infrastructure for the Stellar ecosystem and need help from developers of all skill levels. Check out our open issues to get started.
StellarRoute is a comprehensive DEX aggregation platform built for the Stellar ecosystem. It solves a critical gap left by the deprecation of the SDEX Explorer by providing unified price discovery and optimal routing across both traditional Stellar DEX (SDEX) orderbooks and modern Soroban-based AMM pools.
Stellar users currently face:
- Fragmented liquidity between SDEX and Soroban AMM pools
- No unified price discovery across different trading venues
- Suboptimal trade execution due to lack of intelligent routing
- Loss of SDEX Explorer functionality without a clear replacement
StellarRoute addresses these challenges by building open-source infrastructure that benefits traders, developers, and the entire Stellar ecosystem.
- Unified Liquidity Aggregation: Index and aggregate liquidity from SDEX orderbooks and Soroban AMM pools
- Intelligent Routing Engine: Multi-hop pathfinding algorithm that discovers optimal trade routes across multiple liquidity sources
- Smart Contracts: Soroban-based router contracts for secure, on-chain swap execution
- Developer SDKs: Easy-to-use JavaScript/TypeScript and Rust SDKs for integrations
- Web Interface: Modern, intuitive UI for traders with real-time price updates and wallet integration
- High Performance: Sub-500ms API response times with real-time orderbook synchronization
- β Best Price Discovery: Automatically find the best execution price across all liquidity sources
- β Multi-Hop Routing: Support for complex multi-step trades (e.g., XLM β USDC β BTC)
- β Price Impact Analysis: Real-time calculation of price impact and slippage
- β Real-Time Indexing: Continuous synchronization of SDEX and AMM pool states
- β Developer-Friendly: Comprehensive SDKs and APIs for easy integration
- Execute swaps at the best available prices
- Visualize trade routes and price impact before execution
- Access deep liquidity across multiple sources
- Set custom slippage tolerance
- REST API for price quotes and orderbook data
- WebSocket support for real-time updates
- JavaScript/TypeScript SDK for web applications
- Rust SDK for backend integrations
- CLI tools for power users
StellarRoute is built with a modular architecture consisting of several key components. See our comprehensive architecture diagrams for detailed visualizations.
graph TB
subgraph "StellarRoute Platform"
Indexer[Indexer Service<br/>Syncs SDEX + AMM Data]
Router[Routing Engine<br/>Pathfinding]
API[API Server<br/>REST + WebSocket]
Contracts[Smart Contracts<br/>Soroban]
end
subgraph "Data Layer"
DB[(PostgreSQL)]
Cache[(Redis)]
end
Stellar[Stellar Network<br/>Horizon + Soroban] --> Indexer
Indexer --> DB
Router --> DB
API --> Cache
API --> Router
WebUI[Web UI] --> API
SDKs[TypeScript/Rust SDKs] --> API
Contracts --> Stellar
style Indexer fill:#e1f5ff
style Router fill:#e1f5ff
style API fill:#e1f5ff
style DB fill:#fff4e1
style Cache fill:#ffe1e1
- Indexer Service: Syncs SDEX orderbooks and Soroban AMM pool states from Stellar Horizon API
- Routing Engine: Pathfinding algorithms for optimal multi-hop route discovery
- API Server: REST/WebSocket endpoints serving quotes and orderbook data
- Smart Contracts: Soroban contracts for on-chain swap execution
- Frontend UI: React-based web interface for traders
- SDKs: TypeScript and Rust libraries for developers
π View Detailed Architecture Diagrams β
- Language: Rust (for performance and safety)
- Framework: Axum/Actix-web (API server)
- Database: PostgreSQL (orderbook storage)
- Cache: Redis (hot data caching)
- Blockchain: Soroban (smart contracts)
- Framework: React/Next.js
- Language: TypeScript
- Styling: Tailwind CSS + shadcn/ui
- State Management: React hooks + context
- Wallet Integration: Freighter, XBull
- CI/CD: GitHub Actions
- Containerization: Docker & Docker Compose
- Monitoring: Prometheus/Grafana (planned)
Milestone: M1 - Prototype Indexer & API β
COMPLETE!
Next Phase: M2 - Soroban AMM Integration
Status: π― Ready for Production Testing | Actively seeking contributors
Milestone Progress: 100% Complete
- π― High-impact work: Building critical Stellar ecosystem infrastructure
- π Learn Rust & Soroban: Gain hands-on experience with cutting-edge blockchain technology
- π€ Collaborative environment: Work with experienced Stellar developers
- π Recognition: Build your portfolio with verifiable open-source contributions
- π‘ Clear tasks: Well-defined issues suitable for all skill levels
Phase 1.1 Complete:
- β Rust workspace structure (5 modular crates)
- β Docker Compose setup for local development
- β CI/CD pipeline with GitHub Actions
- β Comprehensive documentation structure
Phase 1.2 Complete (β 100%):
- β
Database schema created (
migrations/0001_init.sql) - β Stellar Horizon API client implemented
- β Data models for Assets and Offers with validation
- β Database connection pooling with sqlx
- β SDEX indexer service with dual modes (polling & streaming)
- β Main indexer binary created
- β Retry logic with exponential backoff (3 retries, 100ms-5s)
- β Real-time streaming support (polling-based, SSE-ready)
- β
Orderbook snapshot endpoint (
/order_book) - β Comprehensive data validation
Phase 1.3 Complete (β 100%):
- β Performance indexes (11 strategic indexes for common queries)
- β Data archival system (30-day retention, SQL functions)
- β Database health monitoring (metrics, pool stats, table sizes)
- β Query optimizations (materialized views, denormalized views)
- β HealthMonitor & ArchivalManager Rust modules
Phase 1.4 Complete (β 100%):
- β Axum-based REST API framework
- β Core endpoints (pairs, orderbook, quote, health)
- β Request/response models with validation
- β Rate limiting middleware (100 req/min)
- β OpenAPI/Swagger documentation (interactive UI)
- β CORS support for web clients
- β Comprehensive error handling
Phase 1.5 Complete (β 100%):
- β Redis caching layer (optional, graceful fallback)
- β Smart TTLs: pairs (10s), orderbook (5s), quotes (2s)
- β Gzip response compression (tower-http)
- β Cache manager with health checks
- β Unit tests (5 passing)
We're currently building M1 (Prototype Indexer & API) and need help with:
-
SDEX Indexer Enhancement π
- Add retry logic with exponential backoff
- Implement real-time streaming (SSE from Horizon)
- Verify and implement orderbook snapshot endpoint
- Add comprehensive unit tests
- Skills: Rust, API integration, Error handling
-
Database Optimization πΎ
- Query performance tuning and indexes
- Add database health monitoring
- Implement data archival strategy
- Schema optimization based on query patterns
- Skills: PostgreSQL, SQL, Performance tuning
-
API Development π
- Implement REST API server (Axum/Actix)
- Create
/api/v1/pairsendpoint - Add
/api/v1/orderbook/{base}/{quote}endpoint - Add
/api/v1/quoteendpoint - WebSocket support for real-time updates
- Skills: Rust (Axum/Actix), REST APIs, WebSocket
-
Testing & Documentation β
- Unit tests for indexer, models, and database layer
- Integration tests with test database
- API documentation (OpenAPI/Swagger)
- Code examples and tutorials
- Skills: Testing, Technical writing
-
Infrastructure & Monitoring β‘
- Add structured logging with tracing crate
- Implement health check endpoint
- Set up metrics collection
- Redis caching layer
- Rate limiting middleware
- Skills: Observability, Redis, Performance
- Test indexer with local Postgres database
- Add retry logic for transient Horizon API failures
- Implement Horizon streaming (SSE) for real-time updates
- Research and verify orderbook snapshot endpoint
- Create REST API server with core endpoints
- Add comprehensive error handling and logging
- Write unit and integration tests
π Ready to contribute? Check our Issues page for tasks tagged by difficulty level (good-first-issue, help-wanted, beginner-friendly).
- Rust 1.75+ (installation instructions in SETUP.md)
- Soroban CLI
- Docker & Docker Compose
- PostgreSQL 15+
- Node.js 18+ (for frontend development)
-
Clone the repository
git clone https://github.com/yourusername/StellarRoute.git cd StellarRoute -
Install Rust and Soroban CLI Follow the detailed instructions in docs/development/SETUP.md
-
Start local services
docker-compose up -d
-
Build the project
cargo build
-
Run tests
cargo test
For detailed setup instructions, see the Development Setup Guide.
StellarRoute/
βββ crates/
β βββ indexer/ # SDEX & Soroban indexing service
β βββ api/ # REST API server
β βββ routing/ # Routing engine & pathfinding
β βββ contracts/ # Soroban smart contracts
β βββ sdk-rust/ # Rust SDK for developers
βββ frontend/ # Web UI (React/Next.js) [planned]
βββ sdk-js/ # JavaScript/TypeScript SDK
βββ docs/ # Documentation
β βββ architecture/ # Architecture documentation
β βββ api/ # API reference
β βββ development/ # Development guides
β βββ deployment/ # Deployment guides
βββ scripts/ # Setup and utility scripts
βββ docker-compose.yml # Local development services
βββ Roadmap.md # Detailed development roadmap
βββ README.md # This file
For the complete development roadmap with detailed milestones, phases, and technical tasks, see Roadmap.md.
We actively welcome contributions from developers of all skill levels! StellarRoute is open-source and built for the Stellar ecosystem by the community.
-
Browse Issues: Check our Issues page for tasks
- π’
good-first-issue- Perfect for newcomers - π‘
help-wanted- Ready for contribution - π΅
beginner-friendly- Minimal context needed
- π’
-
Join the Discussion: Comment on an issue to claim it or ask questions
-
Fork & Code: Fork the repo, create a feature branch, and start coding
-
Submit PR: Open a pull request with clear description of changes
-
Review & Merge: Collaborate with maintainers on code review
- π Fix bugs - Help us squash issues
- β¨ Add features - Implement new functionality
- π Improve docs - Enhance guides and API documentation
- π§ͺ Write tests - Increase code coverage
- β‘ Optimize performance - Make it faster and more efficient
- π¨ UI/UX improvements - Enhance the frontend experience (M4)
- Write clean, well-documented Rust code
- Follow existing code style and patterns
- Add tests for new functionality
- Update documentation as needed
- Keep PRs focused and atomic
New to Stellar or Rust? No problem! We have mentorship available and beginner-friendly issues to help you get started.
Questions? Open a discussion or comment on an issue - we're here to help!
This project is licensed under the MIT License - see the LICENSE file for details.
- Stellar Documentation: https://developers.stellar.org
- Soroban Documentation: https://soroban.stellar.org
- Horizon API Reference: https://developers.stellar.org/api/horizon
- Project Roadmap: Roadmap.md
- Development Setup: docs/development/SETUP.md
- TypeScript SDK Quickstart: sdk-js/README.md
- TypeScript SDK API Docs: docs/sdk-js/api
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: docs/
Our goal is to create the most efficient, user-friendly, and developer-centric DEX aggregation platform on Stellar. By combining SDEX orderbook depth with Soroban AMM liquidity, we're building infrastructure that will help traders get the best prices while making it easy for developers to integrate sophisticated trading functionality into their applications.
- For Traders: Best execution prices and transparent routing
- For Developers: Easy-to-integrate SDKs and comprehensive APIs
- For DeFi Projects: Foundation for building advanced trading applications
- For the Ecosystem: Critical infrastructure filling the SDEX Explorer gap
This project is part of the Stellar open-source ecosystem and actively participates in community initiatives.
- Stellar Development Foundation ecosystem project
- Open for Drips Wave participation
- Community-driven development with transparent progress tracking
- πΌ Issues & Tasks: GitHub Issues
- π Discussions: GitHub Discussions
- π Documentation: docs/
- πΊοΈ Roadmap: Roadmap.md
We're actively building and need your help! Whether you're a Rust expert or just starting your blockchain journey, there's a place for you in StellarRoute.
Built with β€οΈ for the Stellar ecosystem