Product Architecture Overview
use.com's product architecture is designed for modularity, scalability, and fault isolation. Rather than a monolithic system, the platform consists of independent microservices that communicate through well-defined interfaces.
Architecture Principles
Microservices Design: Each major function (matching, risk, custody, user management) operates as an independent service. This enables:
- Independent Scaling: Scale matching engines without scaling user databases
- Fault Isolation: One service failure doesn't cascade to others
- Technology Flexibility: Use optimal technology for each service
- Deployment Independence: Update services without system-wide downtime
Event-Driven Communication: Services communicate through event streams rather than direct calls, enabling:
- Loose Coupling: Services don't need to know about each other
- Audit Trail: Every action is recorded as an immutable event
- Replay Capability: Reconstruct any historical state
- Real-Time Processing: Multiple services can react to same event
Core Services
Matching Engine Service
Purpose: Execute trades with sub-millisecond latency
Key Features:
- Symbol-sharded architecture (one instance per trading pair)
- Strict price-time priority
- 100,000+ orders/second per shard
- Event-sourced state management
Performance Target: < 800 µs matching latency (p99)
Risk Engine Service
Purpose: Calculate margin requirements and trigger liquidations
Key Features:
- Real-time position monitoring
- Published liquidation formulas
- Automated liquidation ladder (25%, 25%, 50%)
- Insurance fund management
Liquidation Formula: LiquidationLong=Entry×(1−MMR1+Leverage)Liquidation_{Long} = Entry \times \left(1 - \frac{MMR}{1 + Leverage}\right)LiquidationLong=Entry×(1−1+LeverageMMR)
Custody Service
Purpose: Secure asset storage and withdrawal processing
Key Features:
- MPC + HSM key management
- Hot/warm/cold wallet segregation
- Automated rebalancing
- Withdrawal policy engine with risk scoring
Security Target: Reserve ratio > 105%
User Service
Purpose: Account management, KYC, and authentication
Key Features:
- Tiered KYC (4 levels)
- Multi-factor authentication
- Session management
- Jurisdiction-aware access control
Compliance Target: KYC completion < 24 hours
Market Data Service
Purpose: Real-time and historical market data distribution
Key Features:
- WebSocket streaming
- REST API for historical data
- Configurable update frequency
- Global edge distribution
Latency Target: < 50 ms data propagation globally
Data Flow Example
Order Placement Flow:
- User submits order via API
- Authentication Service validates credentials
- Risk Service checks margin requirements
- Matching Service executes order
- Settlement Service updates balances
- Market Data Service publishes trade
- User receives confirmation
Total Time: < 15 ms (p99)
Scalability Model
Horizontal Scaling: Capacity=∑i=1nService_CapacityiCapacity = \sum_{i=1}^{n} Service_Capacity_iCapacity=∑i=1nService_Capacityi
Each service scales independently based on load:
- Matching: Add shards for new trading pairs
- Risk: Add instances for position monitoring
- API: Add edge POPs for geographic coverage
- Data: Add read replicas for query load
Example: Supporting 100 trading pairs with 100,000 orders/second each requires 100 matching shards, but only 10 risk engine instances (monitoring all positions centrally).
Fault Tolerance
Service Redundancy: Each service runs multiple instances across availability zones
Graceful Degradation: If a service fails:
- Matching: Symbol-specific impact only
- Risk: Use cached margin calculations
- API: Route to healthy edge POPs
- Data: Serve from cache
Recovery Time Objective (RTO): < 5 minutes for any service
Monitoring and Observability
Real-Time Metrics:
- Service health (CPU, memory, latency)
- Business metrics (orders/second, fills/second)
- Error rates and types
- Queue depths and processing times
Alerting Thresholds:
- Critical: Service down, latency > 2× target
- Warning: Latency > 1.5× target, error rate > 0.1%
- Info: Capacity > 70%, unusual patterns
Conclusion
use.com's microservices architecture enables independent scaling, fault isolation, and technology optimization while maintaining sub-millisecond matching performance and high availability. This design supports current requirements while providing flexibility for future growth.
Previous: ← Core Principles & Design Philosophy Next: Matching Engine & Order Book Design →
Related Sections:
Updated on: 10/03/2026
Thank you!
