mirror of
https://github.com/lux-apps/papers.git
synced 2026-10-30 18:15:21 +00:00
A July commit removed eight papers on the premise "no license — DEX/non-custodial only". That premise is wrong: Lux operates an ATS, a broker-dealer, a transfer agent and a bank, and this material is resold at lux.financial. The merge that brought main in preserved the removal because the commit stated a reason, which is how a stale reason outlives the fact it rested on. Back, at the versions main carried — main never received the removal, so its copies are the later ones: the ATS architecture, the security-token standard, smart order routing, institutional custody, MPC custody, post-quantum securities, the SSB partnership and the CoinBridge brief. 83 files. Co-authored-by: Hanzo Dev <[email protected]>
83 lines
4.0 KiB
TeX
83 lines
4.0 KiB
TeX
\section{Best Execution Model}
|
|
\label{sec:model}
|
|
|
|
\subsection{Execution Quality Metrics}
|
|
|
|
We define execution quality as a vector of five metrics:
|
|
|
|
\begin{definition}[Execution Quality]
|
|
For an order $o$ with quantity $q$ and limit price $p_{\text{lim}}$, the execution quality at venue $v$ is the vector:
|
|
\[
|
|
\mathbf{Q}(o, v) = \left( \pi(o,v),\; \phi(o,v),\; \lambda(o,v),\; \gamma(o,v),\; \sigma(o,v) \right)
|
|
\]
|
|
where:
|
|
\begin{itemize}[nosep]
|
|
\item $\pi(o,v)$: Price improvement (basis points better than NBBO or last trade).
|
|
\item $\phi(o,v)$: Expected fill rate ($\in [0, 1]$, fraction of order filled).
|
|
\item $\lambda(o,v)$: Execution latency (milliseconds from submission to fill).
|
|
\item $\gamma(o,v)$: Market impact (basis points of adverse price movement).
|
|
\item $\sigma(o,v)$: Settlement risk (probability of settlement failure).
|
|
\end{itemize}
|
|
\end{definition}
|
|
|
|
\subsection{Objective Function}
|
|
|
|
The SOR maximizes a weighted execution quality score subject to compliance constraints:
|
|
|
|
\begin{definition}[Best Execution Optimization]
|
|
Given an order $o$, a set of venues $V$, and an allocation $\mathbf{a} = (a_1, \ldots, a_{|V|})$ where $a_v$ is the quantity allocated to venue $v$:
|
|
\[
|
|
\max_{\mathbf{a}} \sum_{v \in V} a_v \cdot \left( w_\pi \pi(o,v) + w_\phi \phi(o,v) - w_\lambda \lambda(o,v) - w_\gamma \gamma(o,v) - w_\sigma \sigma(o,v) \right)
|
|
\]
|
|
subject to:
|
|
\begin{align}
|
|
\sum_{v \in V} a_v &= q & \text{(fill entire order)} \\
|
|
0 \leq a_v &\leq \min(q,\; \text{depth}(v)) & \text{(venue capacity)} \\
|
|
\text{compliant}(o, v) &= \text{true} & \text{(transfer restrictions)} \\
|
|
a_v &= 0 \text{ if } \lnot\text{compliant}(o, v) & \text{(compliance enforcement)}
|
|
\end{align}
|
|
\end{definition}
|
|
|
|
The compliance predicate $\text{compliant}(o, v)$ verifies that:
|
|
\begin{itemize}[nosep]
|
|
\item The security's transfer restrictions permit trading on venue $v$ \cite{lux-security-token-standard}.
|
|
\item Both counterparties satisfy jurisdictional requirements for venue $v$.
|
|
\item The venue supports the security's token standard.
|
|
\end{itemize}
|
|
|
|
\subsection{Greedy Allocation Algorithm}
|
|
|
|
\begin{algorithm}[H]
|
|
\caption{Greedy order allocation across venues.}
|
|
\label{alg:allocation}
|
|
\begin{algorithmic}[1]
|
|
\Require Order $o$ with quantity $q$, venue set $V$, compliance predicate $C$
|
|
\Ensure Allocation $\mathbf{a}$ maximizing weighted execution quality
|
|
\State $V' \gets \{v \in V : C(o, v) \land v.\text{Supports}(o.\text{security})\}$
|
|
\State Compute $\text{score}(v) \gets w_\pi \pi(o,v) + w_\phi \phi(o,v) - w_\lambda \lambda(o,v) - w_\gamma \gamma(o,v) - w_\sigma \sigma(o,v)$ for all $v \in V'$
|
|
\State Sort $V'$ by $\text{score}(v)$ descending
|
|
\State $\text{remaining} \gets q$
|
|
\For{$v \in V'$ in sorted order}
|
|
\State $\text{alloc} \gets \min(\text{remaining},\; \text{depth}(v))$
|
|
\State $a_v \gets \text{alloc}$
|
|
\State $\text{remaining} \gets \text{remaining} - \text{alloc}$
|
|
\If{$\text{remaining} = 0$}
|
|
\State \textbf{break}
|
|
\EndIf
|
|
\EndFor
|
|
\If{$\text{remaining} > 0$}
|
|
\State Route remainder to Lux DEX VM as limit order (on-book)
|
|
\EndIf
|
|
\State \Return $\mathbf{a}$
|
|
\end{algorithmic}
|
|
\end{algorithm}
|
|
|
|
\begin{theorem}[Approximation Guarantee]
|
|
The greedy allocation (Algorithm~\ref{alg:allocation}) achieves a 2-approximation of the optimal weighted execution quality score.
|
|
\end{theorem}
|
|
|
|
\begin{proof}
|
|
This is an instance of the bounded knapsack problem with uniform item values within each venue. The greedy-by-density algorithm for the fractional knapsack achieves the optimal fractional solution. Since our allocations are integral (shares are discrete), the greedy integral solution is within one item (one venue's allocation) of the fractional optimum. For $|V'| \geq 2$ venues, the worst case occurs when the greedy algorithm fills entirely from the second-best venue. The score ratio between the best and second-best venue is bounded by 2 in the worst case (since all scores are positive after compliance filtering). Therefore, the greedy integral solution achieves at least $1/2$ of the optimal score.
|
|
\end{proof}
|
|
|