mirror of
https://github.com/hanzoai/papers.git
synced 2026-10-29 07:34:31 +00:00
88 lines
2.9 KiB
TeX
88 lines
2.9 KiB
TeX
\section{Architecture}
|
|
|
|
|
|
\subsection{Network Topology}
|
|
|
|
\begin{figure}[h]
|
|
\centering
|
|
\begin{verbatim}
|
|
Financial Data Centers
|
|
+----------------------+
|
|
| |
|
|
+-----------+----------------------+-----------+
|
|
| | | |
|
|
v v v v
|
|
+--------+ +--------+ +--------+ +--------+
|
|
| NY4 | | LD8 | | CC2 | | SG1 |
|
|
| (NYC) | |(London)| |(Tokyo) | | (SG) |
|
|
+--------+ +--------+ +--------+ +--------+
|
|
| | | |
|
|
+-----------+----------------------+-----------+
|
|
| |
|
|
Fiber Optic Backbone (< 50ms RTT)
|
|
| |
|
|
+-------+----------------------+-------+
|
|
| Lux Consensus Validators |
|
|
| (10ms GPU BLS finality, 4.7M TPS) |
|
|
+--------------------------------------+
|
|
\end{verbatim}
|
|
\caption{Lightspeed DEX global topology}
|
|
\end{figure}
|
|
|
|
\textbf{Key locations}:
|
|
\begin{itemize}
|
|
\item \textbf{NY4 (Equinix)}: 600+ financial firms, direct CME/NYSE access
|
|
\item \textbf{LD8 (London)}: EMEA hub, LSE co-location
|
|
\item \textbf{CC2 (Tokyo)}: Asia-Pacific, direct TSE access
|
|
\item \textbf{SG1 (Singapore)}: APAC secondary, 24/7 coverage
|
|
\end{itemize}
|
|
|
|
\subsection{Order Flow}
|
|
|
|
\begin{algorithm}
|
|
\caption{Lightspeed Order Execution}
|
|
\begin{algorithmic}
|
|
\STATE \textbf{Phase 1}: Order Submission (< 1ms)
|
|
\STATE Trader submits encrypted order to nearest validator
|
|
\STATE Validator timestamps with GPS-synced clock
|
|
\STATE Order broadcast via dedicated fiber (NY4 $\to$ LD8 $\to$ CC2: 80ms)
|
|
|
|
\STATE \textbf{Phase 2}: Matching (< 1ms)
|
|
\STATE Orders collected in 10ms batches (GPU BLS finality window)
|
|
\STATE GPU-accelerated matching on sharded order books (434M orders/sec)
|
|
\STATE Price-time priority enforced
|
|
|
|
\STATE \textbf{Phase 3}: Consensus (10ms)
|
|
\STATE Matched trades bundled into 1B-gas block ($\sim$47,619 txs/block)
|
|
\STATE Quasar GPU BLS consensus (single-slot finality)
|
|
\STATE Cryptographic proof of execution order
|
|
|
|
\STATE \textbf{Phase 4}: Settlement (< 10ms)
|
|
\STATE State updates atomic via multi-sig
|
|
\STATE Cross-chain transfers initiated
|
|
\STATE Confirmation returned to trader
|
|
|
|
\STATE \textbf{Total Latency}: 22ms co-located (order $\to$ settlement)
|
|
\end{algorithmic}
|
|
\end{algorithm}
|
|
|
|
\subsection{Order Book Sharding}
|
|
|
|
To achieve 434M orders/sec, we shard by trading pair with GPU-accelerated matching:
|
|
|
|
\begin{equation}
|
|
\text{Shard}(pair) = \text{Hash}(pair) \mod N_{\text{shards}}
|
|
\end{equation}
|
|
|
|
\textbf{Example}:
|
|
\begin{itemize}
|
|
\item Shard 0: LUX/USDC, ETH/BTC
|
|
\item Shard 1: BTC/USDC, SOL/USDC
|
|
\item Shard 2: AVAX/USDC, MATIC/USDC
|
|
\item ...
|
|
\item Shard 255: Long-tail pairs
|
|
\end{itemize}
|
|
|
|
Each GPU shard processes $\sim$1.7M orders/sec $\to$ 256 shards = 434M orders/sec.
|
|
|