Files
papers/lux-smart-order-routing/sections/07-compliance-aware-routing.tex
zeekayandHanzo Dev 70f6883235 Restore the regulated-markets papers; Lux holds the licences
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]>
2026-08-30 15:58:05 -07:00

68 lines
2.6 KiB
TeX

\section{Compliance-Aware Routing}
\label{sec:compliance}
\subsection{Pre-Route Compliance Check}
Before allocating order quantity to a venue, the SOR checks compliance at three levels:
\begin{enumerate}[nosep]
\item \textbf{Security level}: Does the security's transfer restriction policy permit trading on this venue? (e.g., a Reg D security may only trade on US-registered ATS platforms.)
\item \textbf{Investor level}: Does the investor's accreditation, KYC status, and jurisdiction permit trading on this venue?
\item \textbf{Venue level}: Is the venue currently accepting orders for this security? (e.g., a venue may pause trading for a corporate action.)
\end{enumerate}
\begin{lstlisting}[language=Go,caption={Pre-route compliance check.}]
func (r *Router) checkCompliance(
order Order, venue Provider,
) error {
// Security-level check
token := r.registry.GetSecurity(order.SecurityID)
restrictions := token.TransferRestrictions()
if !restrictions.AllowsVenue(venue.ID()) {
return fmt.Errorf("security %s: venue %s not permitted",
order.SecurityID, venue.ID())
}
// Investor-level check
investor := r.registry.GetInvestor(order.InvestorID)
did := investor.DID()
for _, jur := range venue.Jurisdictions() {
if did.Jurisdiction() == jur {
goto jurisdictionOK
}
}
return fmt.Errorf("investor jurisdiction %s not permitted on venue %s",
did.Jurisdiction(), venue.ID())
jurisdictionOK:
if restrictions.RequiresAccreditation() {
if !did.HasValidCredential("accreditation") {
return fmt.Errorf("investor %s: accreditation expired", order.InvestorID)
}
}
// Venue-level check
if !venue.Supports(order.SecurityID) {
return fmt.Errorf("venue %s does not support security %s",
venue.ID(), order.SecurityID)
}
return nil
}
\end{lstlisting}
\subsection{Cross-Venue Settlement}
When an order is split across multiple venues, settlement occurs independently at each venue. The SOR tracks settlement status and reconciles:
\begin{itemize}[nosep]
\item \textbf{On-chain venues} (Lux DEX VM, Lux ATS internal): Atomic T+0 settlement on Lux EVM.
\item \textbf{External ATS platforms}: Settlement per the venue's protocol (typically T+0 to T+2).
\item \textbf{Traditional venues}: Settlement via DTCC (T+1 for equities).
\end{itemize}
The ATS maintains a settlement ledger that tracks the net position across all venues and reconciles on-chain state with off-chain settlements via the \texttt{position\_reconcile} cron job \cite{lux-ats-architecture}.