System Overview
Three-Layer Architecture
┌─────────────────────────────────────────────────────────────────┐
│ API LAYER │
│ │
│ • REST API Server (HTTP/WebSocket) │
│ • Order submission and validation │
│ • Market data distribution │
│ • Account management │
│ │
└────────────────────────┬────────────────────────────────────────┘
│
┌────────────────────────┴────────────────────────────────────────┐
│ CORE LAYER │
│ │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ HotStuff BFT Consensus (100ms rounds) │ │
│ │ • Leader rotation │ │
│ │ • Byzantine fault tolerance (1/3 malicious nodes) │ │
│ │ • Deterministic finality │ │
│ └──────────────────────────────────────────────────────────┘ │
│ │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ Frontier-Core Matching Engine (369K ops/sec) │ │
│ │ • Multi-pair order books (spot & perpetuals) │ │
│ │ • Parallel signature verification │ │
│ │ • Deterministic execution │ │
│ └──────────────────────────────────────────────────────────┘ │
│ │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ Order Gossip Protocol │ │
│ │ • Pre-consensus order distribution │ │
│ │ • 30ms minimum age requirement │ │
│ │ • Mempool synchronization │ │
│ └──────────────────────────────────────────────────────────┘ │
│ │
└────────────────────────┬────────────────────────────────────────┘
│
┌────────────────────────┴────────────────────────────────────────┐
│ STORAGE LAYER │
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌────────────────────┐ │
│ │ Memory │→ │ RocksDB │→ │ PostgreSQL │ │
│ │ (Hot) │ │ (Blocks) │ │ (TimescaleDB) │ │
│ │ │ │ │ │ │ │
│ │ 100 blocks │ │ Full history │ │ Order tracking │ │
│ │ 0.83ms │ │ Async writes │ │ Market data │ │
│ └──────────────┘ └──────────────┘ └────────────────────┘ │
└─────────────────────────────────────────────────────────────────┘Layer 1: API Layer
Purpose
Components
REST API Server
WebSocket Server
Validation Layer
Design Decisions
Layer 2: Core Layer
HotStuff BFT Consensus
Frontier-Core Matching Engine
Order Gossip Protocol
Layer 3: Storage Layer
Tier 1: Memory Cache (Hot Storage)
Tier 2: RocksDB (Block Storage)
Tier 3: PostgreSQL/TimescaleDB (Analytics)
Component Interaction
Order Submission Flow
State Synchronization
Network Topology
Validator Mesh
API Server Deployment
Security Architecture
Layer Isolation
Attack Surface Reduction
Performance Characteristics
Measured Throughput
Component
Throughput
Latency
Bottleneck Analysis
Scalability Limits
Comparison to Traditional Architectures
vs. Centralized Exchanges
Aspect
CEX
Frontier Chain
vs. Traditional Blockchains
Aspect
Ethereum L1
Frontier Chain
vs. Other L1 DEXs
Aspect
Solana
Frontier Chain
Future Architecture Evolution
Planned Enhancements
Conclusion
Last updated