chore: normalize naming to LX across codebase

Apply consistent naming conventions throughout:
- Standardize product name to "LX" in documentation
- Update README files and API documentation
- Apply linter fixes to all source files
- Update Hummingbot connector documentation
This commit is contained in:
2025-12-11 21:04:37 -08:00
parent 9e54603e26
commit fae0efeb1b
221 changed files with 840 additions and 593 deletions
+6 -6
View File
@@ -1,8 +1,8 @@
# LX DEX - Complete Architecture Documentation
# LX - Complete Architecture Documentation
## Executive Summary
LX DEX is a planet-scale, fully on-chain decentralized exchange built on the Lux Network. It combines ultra-low latency matching (<1μs), quantum-resistant security, and support for all global markets (784,000+ trading pairs) in a single unified system.
LX is a planet-scale, fully on-chain decentralized exchange built on the Lux Network. It combines ultra-low latency matching (<1μs), quantum-resistant security, and support for all global markets (784,000+ trading pairs) in a single unified system.
**Latest Performance Achievements (January 2025):**
- **Throughput**: 434,782,609 orders/second (GPU/MLX)
@@ -12,7 +12,7 @@ LX DEX is a planet-scale, fully on-chain decentralized exchange built on the Lux
## Key Innovations
1. **Full On-Chain Architecture**: Unlike competitors (High-performance DEX, dYdX) that match off-chain, LX DEX runs the entire orderbook and clearinghouse directly on-chain with 1ms block finality
1. **Full On-Chain Architecture**: Unlike competitors (High-performance DEX, dYdX) that match off-chain, LX runs the entire orderbook and clearinghouse directly on-chain with 1ms block finality
2. **Planet-Scale Capacity**: Single Mac Studio can handle 5M markets simultaneously
3. **Quantum-Resistant**: QZMQ protocol with post-quantum cryptography for node communication
4. **Multi-Engine Performance**: Go (1M ops/s), C++ (500K ops/s), GPU/MLX (434M ops/s)
@@ -22,7 +22,7 @@ LX DEX is a planet-scale, fully on-chain decentralized exchange built on the Lux
```
┌─────────────────────────────────────────────────────────────┐
│ LX DEX ARCHITECTURE │
│ LX ARCHITECTURE │
├─────────────────────────────────────────────────────────────┤
│ │
│ Client Layer │
@@ -499,7 +499,7 @@ engine:
### Kubernetes Deployment
The LX DEX includes comprehensive Kubernetes manifests for production deployment:
The LX includes comprehensive Kubernetes manifests for production deployment:
#### Production Environment (`k8s/production/`)
- **StatefulSet**: 3-node cluster with anti-affinity rules
@@ -1728,7 +1728,7 @@ var (
## 9. CONCLUSION
The LX DEX architecture shows **ambitious vision** with cutting-edge technologies (DAG consensus, quantum resistance, GPU/FPGA acceleration), but has **significant implementation gaps** that prevent production deployment.
The LX architecture shows **ambitious vision** with cutting-edge technologies (DAG consensus, quantum resistance, GPU/FPGA acceleration), but has **significant implementation gaps** that prevent production deployment.
**Core Strength**: GPU-accelerated matching engine is production-ready and achieves world-class performance (434M ops/sec).
+2 -2
View File
@@ -1,4 +1,4 @@
# LX DEX Makefile
# LX Makefile
# Complete build, test, and deployment automation
SHELL := /bin/bash
@@ -36,7 +36,7 @@ all: clean fmt vet test build
@echo "✅ Build complete!"
help:
@echo "LX DEX Makefile Commands:"
@echo "LX Makefile Commands:"
@echo ""
@echo "Development:"
@echo " make build - Build all binaries"
+1 -1
View File
@@ -1,4 +1,4 @@
# LX DEX
# LX
[![CI](https://github.com/luxfi/dex/actions/workflows/ci.yml/badge.svg)](https://github.com/luxfi/dex/actions/workflows/ci.yml)
[![Release](https://img.shields.io/github/v/release/luxfi/dex)](https://github.com/luxfi/dex/releases)
+3 -3
View File
@@ -1,4 +1,4 @@
# LX DEX C CLI Trading Client
# LX C CLI Trading Client
# Build for HFT and embedded systems
CC ?= cc
@@ -56,7 +56,7 @@ uninstall:
clean:
rm -rf $(BUILD_DIR)
# Test - requires running LX DEX server
# Test - requires running LX server
test: $(BUILD_DIR)/$(BIN)
@echo "Testing connection..."
./$(BUILD_DIR)/$(BIN) --timeout 2000 ping || echo "Server not running (expected)"
@@ -71,7 +71,7 @@ bench: $(BUILD_DIR)/$(BIN)
@for i in 1 2 3 4 5; do ./$(BUILD_DIR)/$(BIN) ping 2>/dev/null; done
help:
@echo "LX DEX C CLI Build System"
@echo "LX C CLI Build System"
@echo ""
@echo "Targets:"
@echo " all Build optimized binary (default)"
+7 -7
View File
@@ -1,10 +1,10 @@
# LX DEX C CLI Trading Client
# LX C CLI Trading Client
Ultra-fast command-line trading client for LX DEX, designed for HFT traders and embedded systems.
Ultra-fast command-line trading client for LX, designed for HFT traders and embedded systems.
## Features
- Direct WebSocket connection to LX DEX API
- Direct WebSocket connection to LX API
- Sub-millisecond latency (limited only by network)
- Interactive REPL mode for manual trading
- Single-command mode for scripting/automation
@@ -50,7 +50,7 @@ make static # Static binary for portability
Starts a REPL where you can enter commands interactively:
```
LX DEX CLI v1.0.0 - Type 'help' for commands
LX CLI v1.0.0 - Type 'help' for commands
> auth mykey mysecret
Authenticated successfully
> place_order BTC-USD buy limit 50000 0.1
@@ -227,7 +227,7 @@ CC=arm-linux-gnueabihf-gcc make
## Protocol
The client communicates with LX DEX using WebSocket JSON messages.
The client communicates with LX using WebSocket JSON messages.
### Request Format
@@ -265,6 +265,6 @@ Copyright (c) 2025 Lux Partners Limited
## See Also
- [LX DEX SDK (C)](/sdk/c/) - Library for embedding
- [LX DEX CLI (Go)](/client/go/) - Go CLI client
- [LX SDK (C)](/sdk/c/) - Library for embedding
- [LX CLI (Go)](/client/go/) - Go CLI client
- [WebSocket API Documentation](/docs/api/websocket.md)
+4 -4
View File
@@ -1,9 +1,9 @@
/*
* LX DEX C CLI Trading Client
* LX C CLI Trading Client
* Copyright (c) 2025 Lux Partners Limited
*
* Ultra-fast command-line trading client for HFT and embedded systems.
* Connects to LX DEX WebSocket API for real-time trading.
* Connects to LX WebSocket API for real-time trading.
*
* Usage:
* lx-cli -i # Interactive REPL mode
@@ -931,7 +931,7 @@ static int run_interactive(cli_ctx_t *ctx) {
pthread_t svc_thread;
pthread_create(&svc_thread, NULL, service_thread, ctx);
printf("LX DEX CLI v%s - Type 'help' for commands\n", CLI_VERSION);
printf("LX CLI v%s - Type 'help' for commands\n", CLI_VERSION);
printf("> ");
fflush(stdout);
@@ -989,7 +989,7 @@ static int run_command(cli_ctx_t *ctx, int argc, char **argv) {
*/
static void print_help(void) {
printf("\n");
printf("LX DEX CLI v%s - Trading Commands\n", CLI_VERSION);
printf("LX CLI v%s - Trading Commands\n", CLI_VERSION);
printf("=====================================\n\n");
printf("Trading:\n");
printf(" place_order <symbol> <side> <type> <price> <size>\n");
+1 -1
View File
@@ -1,4 +1,4 @@
# LX DEX C++ CLI Trading Client
# LX C++ CLI Trading Client
# Copyright (c) 2025 Lux Partners Limited
# SPDX-License-Identifier: MIT
+3 -3
View File
@@ -1,6 +1,6 @@
# LX DEX C++ CLI Trading Client
# LX C++ CLI Trading Client
Command-line trading interface for LX DEX WebSocket API.
Command-line trading interface for LX WebSocket API.
## Build
@@ -100,7 +100,7 @@ quit / exit
```
$ ./lx-cli -k mykey -s mysecret
LX DEX CLI - Type 'help' for commands
LX CLI - Type 'help' for commands
> ping
Pong: 1234 us
> place_order BTC-USD buy limit 50000 0.1
+6 -6
View File
@@ -1,8 +1,8 @@
// LX DEX C++ CLI Trading Client
// LX C++ CLI Trading Client
// Copyright (c) 2025 Lux Partners Limited
// SPDX-License-Identifier: MIT
//
// Command-line trading interface for LX DEX WebSocket API.
// Command-line trading interface for LX WebSocket API.
// Connect to ws://localhost:8081 for real-time trading.
#include <websocketpp/config/asio_no_tls_client.hpp>
@@ -114,7 +114,7 @@ public:
auto resp = wait_response("", std::chrono::seconds(5));
if (resp && resp->contains("type") && (*resp)["type"] == "connected") {
if (config_.verbose) {
std::cout << "Connected to LX DEX\n";
std::cout << "Connected to LX\n";
}
}
@@ -423,7 +423,7 @@ private:
void print_help() {
std::cout << R"(
LX DEX CLI Commands:
LX CLI Commands:
place_order <symbol> <side> <type> <price> <size>
Example: place_order BTC-USD buy limit 50000 0.1
@@ -483,7 +483,7 @@ std::string trim(const std::string& s) {
}
void run_interactive(Client& client) {
std::cout << "LX DEX CLI - Type 'help' for commands\n> ";
std::cout << "LX CLI - Type 'help' for commands\n> ";
std::string line;
while (std::getline(std::cin, line)) {
@@ -702,7 +702,7 @@ void run_command(Client& client, const std::vector<std::string>& args) {
}
void print_usage(const char* prog) {
std::cout << "LX DEX C++ CLI Trading Client\n\n"
std::cout << "LX C++ CLI Trading Client\n\n"
<< "Usage: " << prog << " [options] [command] [args...]\n\n"
<< "Options:\n"
<< " -u, --url <url> WebSocket server URL (default: ws://localhost:8081)\n"
+2 -2
View File
@@ -1,6 +1,6 @@
# LX DEX Trading Client
# LX Trading Client
Multi-protocol programmatic trading client for LX DEX. Supports WebSocket and gRPC protocols with a unified interface.
Multi-protocol programmatic trading client for LX. Supports WebSocket and gRPC protocols with a unified interface.
## Features
+6 -6
View File
@@ -1,6 +1,6 @@
// LX DEX Trading Client
// LX Trading Client
//
// Multi-protocol programmatic trading client for LX DEX.
// Multi-protocol programmatic trading client for LX.
// Supports WebSocket and gRPC protocols with unified interface.
//
// Usage:
@@ -746,7 +746,7 @@ func parseOrderSide(s string) pb.OrderSide {
func printHelp() {
fmt.Println(`
LX DEX Trading Client Commands:
LX Trading Client Commands:
place_order <symbol> <side> <type> <price> <size>
Example: place_order BTC-USD buy limit 50000 0.1
@@ -796,7 +796,7 @@ func printMessage(data interface{}) {
func runInteractive(mgr *ClientManager) {
scanner := bufio.NewScanner(os.Stdin)
fmt.Printf("LX DEX Trading Client [%s] - Type 'help' for commands\n", mgr.Active().Protocol())
fmt.Printf("LX Trading Client [%s] - Type 'help' for commands\n", mgr.Active().Protocol())
fmt.Print("> ")
ctx := context.Background()
@@ -1088,7 +1088,7 @@ func main() {
os.Exit(1)
}
if *verbose {
fmt.Println("Connected to LX DEX via WebSocket")
fmt.Println("Connected to LX via WebSocket")
}
// Authenticate if credentials provided
if *apiKey != "" && *apiSecret != "" {
@@ -1108,7 +1108,7 @@ func main() {
os.Exit(1)
}
if *verbose {
fmt.Println("Connected to LX DEX via gRPC")
fmt.Println("Connected to LX via gRPC")
}
default:
+2 -2
View File
@@ -1,6 +1,6 @@
# LX DEX Python Trading Client
# LX Python Trading Client
Multi-protocol trading client for LX DEX. Supports WebSocket and gRPC protocols with async/await.
Multi-protocol trading client for LX. Supports WebSocket and gRPC protocols with async/await.
## Installation
+2 -2
View File
@@ -1,7 +1,7 @@
"""
LX DEX Trading Client
LX Trading Client
Multi-protocol Python trading client for LX DEX.
Multi-protocol Python trading client for LX.
Supports WebSocket and gRPC protocols.
Usage:
+1 -1
View File
@@ -1,5 +1,5 @@
"""
LX DEX Trading Client - Abstract Base Class and Types
LX Trading Client - Abstract Base Class and Types
Defines the common interface for all trading client implementations.
"""
+3 -3
View File
@@ -1,7 +1,7 @@
"""
LX DEX Trading Client - gRPC Implementation
LX Trading Client - gRPC Implementation
Async gRPC client for LX DEX trading API.
Async gRPC client for LX trading API.
"""
import asyncio
@@ -65,7 +65,7 @@ _TIME_IN_FORCE_TO_PROTO = {
class GrpcClient(TradingClient):
"""
gRPC-based trading client for LX DEX.
gRPC-based trading client for LX.
Uses async/await with grpcio-aio for all operations.
+3 -3
View File
@@ -1,7 +1,7 @@
"""
LX DEX Trading Client - WebSocket Implementation
LX Trading Client - WebSocket Implementation
Async WebSocket client for LX DEX trading API.
Async WebSocket client for LX trading API.
"""
import asyncio
@@ -33,7 +33,7 @@ from lx_client.base import (
class WebSocketClient(TradingClient):
"""
WebSocket-based trading client for LX DEX.
WebSocket-based trading client for LX.
Uses async/await for all operations with websockets library.
+5 -5
View File
@@ -1,8 +1,8 @@
#!/usr/bin/env python3
"""
LX DEX Trading Client
LX Trading Client
Multi-protocol trading client for LX DEX.
Multi-protocol trading client for LX.
Supports WebSocket and gRPC protocols.
Usage:
@@ -48,7 +48,7 @@ except ImportError:
def print_help():
"""Print interactive help."""
print("""
LX DEX Trading Client Commands:
LX Trading Client Commands:
place_order <symbol> <side> <type> <price> <size>
Place a new order
@@ -96,7 +96,7 @@ LX DEX Trading Client Commands:
async def run_interactive(client: TradingClient):
"""Run interactive mode."""
print("LX DEX Trading Client - Type 'help' for commands")
print("LX Trading Client - Type 'help' for commands")
print(f"Protocol: {'WebSocket' if isinstance(client, WebSocketClient) else 'gRPC'}")
print(f"Connected: {client.connected}")
print()
@@ -328,7 +328,7 @@ async def run_command(client: TradingClient, args: argparse.Namespace):
async def main_async():
"""Async main entry point."""
parser = argparse.ArgumentParser(
description="LX DEX Trading Client",
description="LX Trading Client",
formatter_class=argparse.RawDescriptionHelpFormatter,
epilog="""
Examples:
+1 -1
View File
@@ -1,4 +1,4 @@
# LX DEX Trading Client Dependencies
# LX Trading Client Dependencies
# WebSocket protocol support
websockets>=12.0
+1 -1
View File
@@ -2,7 +2,7 @@
name = "lx-cli"
version = "0.1.0"
edition = "2021"
description = "LX DEX CLI Client"
description = "LX CLI Client"
license = "MIT"
repository = "https://github.com/luxfi/dex"
+2 -2
View File
@@ -1,6 +1,6 @@
# LX DEX Rust CLI Client
# LX Rust CLI Client
Command-line trading interface for LX DEX.
Command-line trading interface for LX.
## Build
+7 -7
View File
@@ -1,6 +1,6 @@
//! LX DEX CLI Client
//! LX CLI Client
//!
//! Command-line trading interface for LX DEX WebSocket API.
//! Command-line trading interface for LX WebSocket API.
use anyhow::{anyhow, Context, Result};
use clap::{Parser, Subcommand};
@@ -41,7 +41,7 @@ struct Order {
size: f64,
}
/// WebSocket client for LX DEX
/// WebSocket client for LX
struct Client {
sender: Sender<String>,
responses: Arc<Mutex<HashMap<String, Message>>>,
@@ -274,7 +274,7 @@ fn print_message(msg: &Message) {
fn print_help() {
println!(
r#"
LX DEX CLI Commands:
LX CLI Commands:
place_order <symbol> <side> <type> <price> <size>
Example: place_order BTC-USD buy limit 50000 0.1
@@ -304,7 +304,7 @@ LX DEX CLI Commands:
}
fn run_interactive(client: &Client) {
println!("LX DEX CLI - Type 'help' for commands");
println!("LX CLI - Type 'help' for commands");
let stdin = io::stdin();
let mut stdout = io::stdout();
@@ -413,7 +413,7 @@ fn run_interactive(client: &Client) {
#[derive(Parser)]
#[command(name = "lx-cli")]
#[command(about = "LX DEX CLI Client", long_about = None)]
#[command(about = "LX CLI Client", long_about = None)]
struct Cli {
/// WebSocket server URL
#[arg(short, long, default_value = "ws://localhost:8081")]
@@ -479,7 +479,7 @@ fn main() -> Result<()> {
client.wait_connected()?;
if cli.verbose {
eprintln!("Connected to LX DEX");
eprintln!("Connected to LX");
}
// Authenticate if credentials provided
+2 -2
View File
@@ -1,6 +1,6 @@
# LX DEX TypeScript Trading Client
# LX TypeScript Trading Client
Programmatic trading client for LX DEX supporting multiple protocols:
Programmatic trading client for LX supporting multiple protocols:
- **WebSocket**: Real-time streaming, market data subscriptions, interactive trading
- **gRPC**: High-throughput RPC calls for automated trading systems
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@luxfi/dex-client",
"version": "1.0.0",
"description": "LX DEX Trading Client - Programmatic trading via WebSocket or gRPC",
"description": "LX Trading Client - Programmatic trading via WebSocket or gRPC",
"main": "dist/main.js",
"types": "dist/main.d.ts",
"bin": {
+6 -6
View File
@@ -1,8 +1,8 @@
#!/usr/bin/env node
/**
* LX DEX Trading Client
* LX Trading Client
*
* Programmatic trading client for LX DEX supporting multiple protocols:
* Programmatic trading client for LX supporting multiple protocols:
* - WebSocket: Real-time streaming, subscriptions, interactive trading
* - gRPC: High-throughput RPC calls for automated trading systems
*
@@ -709,7 +709,7 @@ export function createClient(
function printHelp(): void {
console.log(`
LX DEX Trading Client Commands:
LX Trading Client Commands:
place_order <symbol> <side> <type> <price> <size>
Example: place_order BTC-USD buy limit 50000 0.1
@@ -752,7 +752,7 @@ async function runInteractive(client: ITradingClient, isWebSocket: boolean): Pro
output: process.stdout,
});
console.log('LX DEX Trading Client - Type \'help\' for commands');
console.log('LX Trading Client - Type \'help\' for commands');
const prompt = (): void => {
rl.question('> ', async (line) => {
@@ -909,7 +909,7 @@ async function main(): Promise<void> {
program
.name('lx-client')
.description('LX DEX Trading Client - Programmatic trading via WebSocket or gRPC')
.description('LX Trading Client - Programmatic trading via WebSocket or gRPC')
.version('1.0.0')
.option('-p, --protocol <protocol>', 'Protocol: ws or grpc', 'ws')
.option('-u, --url <url>', 'Server URL (ws://host:port or host:port for gRPC)')
@@ -1134,7 +1134,7 @@ async function main(): Promise<void> {
try {
await client.connect();
if (opts.verbose) {
console.log(`Connected to LX DEX via ${opts.protocol || 'ws'}`);
console.log(`Connected to LX via ${opts.protocol || 'ws'}`);
}
if (opts.key && opts.secret) {
+1 -1
View File
@@ -30,7 +30,7 @@ func main() {
parallel := flag.Int("parallel", runtime.NumCPU(), "Parallel workers")
flag.Parse()
fmt.Printf("🚀 LX DEX Performance Benchmark\n")
fmt.Printf("🚀 LX Performance Benchmark\n")
fmt.Printf("================================\n")
fmt.Printf("Orders: %d\n", *numOrders)
fmt.Printf("Workers: %d\n", *parallel)
+2 -2
View File
@@ -9,7 +9,7 @@ import (
func main() {
fmt.Println("================================================")
fmt.Println(" LX DEX - Order Book Demo")
fmt.Println(" LX - Order Book Demo")
fmt.Println("================================================")
fmt.Println()
@@ -151,7 +151,7 @@ func main() {
fmt.Println()
fmt.Println("✅ Demo complete!")
fmt.Println()
fmt.Println("The LX DEX successfully:")
fmt.Println("The LX successfully:")
fmt.Println(" • Matched orders by price-time priority")
fmt.Println(" • Executed trades at best available prices")
fmt.Println(" • Updated order book state in real-time")
+3 -3
View File
@@ -66,7 +66,7 @@ func main() {
http.HandleFunc("/ws", server.handleWebSocket)
addr := fmt.Sprintf(":%d", *port)
log.Printf("🚀 LX DEX API Server starting on http://localhost%s", addr)
log.Printf("🚀 LX API Server starting on http://localhost%s", addr)
log.Println("📊 REST API Endpoints:")
log.Println(" GET /api/orderbook - Get order book")
log.Println(" GET /api/trades - Get recent trades")
@@ -84,7 +84,7 @@ func (s *Server) handleHome(w http.ResponseWriter, r *http.Request) {
<!DOCTYPE html>
<html>
<head>
<title>LX DEX API</title>
<title>LX API</title>
<style>
body { font-family: monospace; padding: 20px; background: #1a1a1a; color: #0f0; }
h1 { color: #0f0; }
@@ -94,7 +94,7 @@ func (s *Server) handleHome(w http.ResponseWriter, r *http.Request) {
</style>
</head>
<body>
<h1>🚀 LX DEX API Server</h1>
<h1>🚀 LX API Server</h1>
<h2>Performance: 13M+ orders/sec</h2>
<h3>REST API Endpoints:</h3>
+2 -2
View File
@@ -1,4 +1,4 @@
// E2E FIX over ZeroMQ Benchmark against LX DEX Cluster
// E2E FIX over ZeroMQ Benchmark against LX Cluster
package main
import (
@@ -454,7 +454,7 @@ func main() {
flag.Parse()
fmt.Println("=================================================")
fmt.Println(" LX DEX E2E FIX/ZMQ Benchmark Suite")
fmt.Println(" LX E2E FIX/ZMQ Benchmark Suite")
fmt.Println("=================================================")
fmt.Printf("Mode: %s\n", *mode)
fmt.Printf("Messages: %d\n", *messages)
+2 -2
View File
@@ -37,7 +37,7 @@ func main() {
runtime.GOMAXPROCS(runtime.NumCPU())
fmt.Println("╔══════════════════════════════════════════════════════════════════════╗")
fmt.Println("║ LX DEX Ultra-Low Latency Benchmark Suite ║")
fmt.Println("║ LX Ultra-Low Latency Benchmark Suite ║")
fmt.Println("║ Mac Studio M2 Ultra vs NYSE vs AWS F2 ║")
fmt.Println("╚══════════════════════════════════════════════════════════════════════╝")
fmt.Println()
@@ -405,7 +405,7 @@ func compareWithIndustry() {
metrics.mu.Lock()
if len(metrics.OrderMatching) > 0 {
ourP99 := percentile(metrics.OrderMatching, 99)
fmt.Printf("LX DEX on M2 Ultra: %s (P99)\n", formatLatency(ourP99))
fmt.Printf("LX on M2 Ultra: %s (P99)\n", formatLatency(ourP99))
// Compare
if ourP99 < 10*time.Microsecond {
+1 -1
View File
@@ -21,7 +21,7 @@ func main() {
var m runtime.MemStats
runtime.ReadMemStats(&m)
fmt.Println("=== LX DEX Memory Analysis for 1M Markets ===")
fmt.Println("=== LX Memory Analysis for 1M Markets ===")
fmt.Printf("Initial memory: %.2f MB\n", float64(m.Alloc)/(1024*1024))
fmt.Println()
+1 -1
View File
@@ -26,7 +26,7 @@ func main() {
debug.SetGCPercent(100)
fmt.Println("╔══════════════════════════════════════════════════════════════════╗")
fmt.Println("║ LX DEX Production Memory Test - 21,000 Global Markets ║")
fmt.Println("║ LX Production Memory Test - 21,000 Global Markets ║")
fmt.Println("╚══════════════════════════════════════════════════════════════════╝")
fmt.Println()
fmt.Println("Configuration:")
+1 -1
View File
@@ -237,7 +237,7 @@ func main() {
debug.FreeOSMemory()
fmt.Println("╔════════════════════════════════════════════════════════════════════════╗")
fmt.Println("║ COMPLETE LX DEX Memory Analysis - ALL Features for Millions ║")
fmt.Println("║ COMPLETE LX Memory Analysis - ALL Features for Millions ║")
fmt.Println("╚════════════════════════════════════════════════════════════════════════╝")
fmt.Println()
+1 -1
View File
@@ -36,7 +36,7 @@ func main() {
runtime.GC()
debug.FreeOSMemory()
fmt.Println("=== LX DEX Memory Stress Test ===")
fmt.Println("=== LX Memory Stress Test ===")
fmt.Println("Target: 11,000 Securities + 10,000 Crypto Markets")
fmt.Println("Hardware Target: Mac Studio M2 Ultra (512GB RAM)")
fmt.Println()
+3 -3
View File
@@ -44,7 +44,7 @@ var dashboardHTML = `
<!DOCTYPE html>
<html>
<head>
<title>LX DEX Monitor</title>
<title>LX Monitor</title>
<meta charset="utf-8">
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
@@ -134,7 +134,7 @@ var dashboardHTML = `
</head>
<body>
<div class="container">
<h1>🚀 LX DEX Real-Time Monitor</h1>
<h1>🚀 LX Real-Time Monitor</h1>
<div class="grid">
<div class="card">
@@ -295,7 +295,7 @@ func main() {
http.HandleFunc("/ws", monitor.handleWebSocket)
http.HandleFunc("/api/stats", monitor.handleAPI)
fmt.Println("📊 LX DEX Monitor")
fmt.Println("📊 LX Monitor")
fmt.Println("=================")
fmt.Println("Dashboard: http://localhost:8080")
fmt.Println("WebSocket: ws://localhost:8080/ws")
+1 -1
View File
@@ -11,7 +11,7 @@ import (
)
func main() {
fmt.Println("=== LX DEX Performance Test ===")
fmt.Println("=== LX Performance Test ===")
fmt.Println("Testing order matching engine performance...")
fmt.Println()
+1 -1
View File
@@ -24,7 +24,7 @@ func main() {
)
flag.Parse()
fmt.Println("LX DEX Price Feed")
fmt.Println("LX Price Feed")
fmt.Println("=================")
fmt.Println()
+1 -1
View File
@@ -46,7 +46,7 @@ func main() {
)
flag.Parse()
fmt.Println("🔥 LX DEX Extreme Stress Test")
fmt.Println("🔥 LX Extreme Stress Test")
fmt.Println("================================")
fmt.Printf("Traders: %d\n", *traders)
fmt.Printf("Duration: %v\n", *duration)
+1 -1
View File
@@ -531,7 +531,7 @@ func main() {
runtime.GOMAXPROCS(runtime.NumCPU())
log.Println("═══════════════════════════════════════════════")
log.Println(" LX DEX MLX-ZMQ Server - 10Gbps Fiber Edition")
log.Println(" LX MLX-ZMQ Server - 10Gbps Fiber Edition")
log.Println("═══════════════════════════════════════════════")
server, err := NewMLXZMQServer(config)
+1 -1
View File
@@ -1,4 +1,4 @@
# Multi-stage build for LX DEX
# Multi-stage build for LX
FROM golang:1.23-alpine AS builder
# Install build dependencies
+1 -1
View File
@@ -1,4 +1,4 @@
# Multi-stage build for LX DEX with CUDA support
# Multi-stage build for LX with CUDA support
FROM nvidia/cuda:12.3.0-devel-ubuntu22.04 AS builder
# Install build dependencies
+1 -1
View File
@@ -1,4 +1,4 @@
# Multi-stage build for LX DEX multi-node
# Multi-stage build for LX multi-node
FROM golang:1.24.5-alpine AS builder
# Install build dependencies
+1 -1
View File
@@ -1,4 +1,4 @@
# LX DEX API Documentation
# LX API Documentation
## Table of Contents
- [WebSocket API](#websocket-api)
+2 -2
View File
@@ -1,8 +1,8 @@
# LX DEX Architecture
# LX Architecture
## Overview
The LX DEX is built on a highly scalable, modular architecture designed to achieve planet-scale performance with sub-microsecond latency. The system uses a multi-layer approach with specialized components for different aspects of trading.
The LX is built on a highly scalable, modular architecture designed to achieve planet-scale performance with sub-microsecond latency. The system uses a multi-layer approach with specialized components for different aspects of trading.
## System Architecture
+1 -1
View File
@@ -1,4 +1,4 @@
# LX DEX Development Guide
# LX Development Guide
## Table of Contents
- [Getting Started](#getting-started)
+3 -3
View File
@@ -1,8 +1,8 @@
# LX DEX SDK Documentation
# LX SDK Documentation
## Overview
LX DEX provides multiple SDKs and APIs for integration:
LX provides multiple SDKs and APIs for integration:
- **JSON-RPC 2.0** - Standard HTTP API for web and mobile clients
- **gRPC** - High-performance binary protocol for internal Lux Network IPC
- **QZMQ** - Quantum-secure ZeroMQ for node-to-node communication
@@ -325,7 +325,7 @@ go test ./... # Go
├─────────────────────────────────────────────┤
│ JSON-RPC │ gRPC │ WebSocket │ QZMQ │
├─────────────────────────────────────────────┤
│ LX DEX Core Engine │
│ LX Core Engine │
│ • Order Matching (Go/C++/GPU) │
│ • Risk Management │
│ • State Management (BadgerDB) │
+2 -2
View File
@@ -17,8 +17,8 @@ const interMono = Inter({
export const metadata = {
title: {
default: "LX DEX - Ultra-High Performance Decentralized Exchange Documentation",
template: "%s | LX DEX - Ultra-High Performance Decentralized Exchange",
default: "LX - Ultra-High Performance Decentralized Exchange Documentation",
template: "%s | LX - Ultra-High Performance Decentralized Exchange",
},
description: "434M+ orders/sec, sub-microsecond latency, quantum-resistant",
}
+5 -5
View File
@@ -1,11 +1,11 @@
---
title: gRPC API Overview
description: High-performance gRPC API for LX DEX internal node communication
description: High-performance gRPC API for LX internal node communication
---
# gRPC API Overview
The LX DEX gRPC API provides high-performance, strongly-typed communication for internal node operations. Built on Protocol Buffers 3, it offers sub-millisecond latency for order execution and real-time market data streaming.
The LX gRPC API provides high-performance, strongly-typed communication for internal node operations. Built on Protocol Buffers 3, it offers sub-millisecond latency for order execution and real-time market data streaming.
## Why gRPC
@@ -19,7 +19,7 @@ The LX DEX gRPC API provides high-performance, strongly-typed communication for
## Service Definition
The LX DEX exposes a single unified service with multiple RPC methods:
The LX exposes a single unified service with multiple RPC methods:
```protobuf
syntax = "proto3";
@@ -28,7 +28,7 @@ package lxdex;
option go_package = "github.com/luxfi/dex/pkg/grpc/pb";
// LX DEX gRPC Service for internal Lux Network IPC
// LX gRPC Service for internal Lux Network IPC
service LXDEXService {
// Order Management
rpc PlaceOrder(PlaceOrderRequest) returns (PlaceOrderResponse);
@@ -191,7 +191,7 @@ enum TimeInForce {
## Error Handling
gRPC uses standard status codes. LX DEX maps domain errors to appropriate codes:
gRPC uses standard status codes. LX maps domain errors to appropriate codes:
| gRPC Code | HTTP | Description | Example |
|-----------|------|-------------|---------|
+2 -2
View File
@@ -1,11 +1,11 @@
---
title: gRPC Services Reference
description: Complete reference for all LX DEX gRPC services and RPC methods
description: Complete reference for all LX gRPC services and RPC methods
---
# gRPC Services Reference
The LX DEX exposes a unified `LXDEXService` with methods organized into four categories: Order Management, Market Data, Account Management, and Node Management.
The LX exposes a unified `LXDEXService` with methods organized into four categories: Order Management, Market Data, Account Management, and Node Management.
## Service Definition
+3 -3
View File
@@ -5,13 +5,13 @@ description: Real-time data streaming with server and bidirectional gRPC streams
# gRPC Streaming
The LX DEX gRPC API provides server-streaming RPCs for real-time market data. This page covers streaming patterns, connection management, and best practices.
The LX gRPC API provides server-streaming RPCs for real-time market data. This page covers streaming patterns, connection management, and best practices.
## Streaming Types
gRPC supports four communication patterns. LX DEX uses:
gRPC supports four communication patterns. LX uses:
| Pattern | LX DEX Usage |
| Pattern | LX Usage |
|---------|--------------|
| Unary | Order operations, queries |
| Server streaming | Market data subscriptions |
+3 -3
View File
@@ -1,15 +1,15 @@
---
title: API Reference
description: Complete API documentation for LX DEX - WebSocket, REST, and gRPC APIs
description: Complete API documentation for LX - WebSocket, REST, and gRPC APIs
---
# LX DEX API Documentation
# LX API Documentation
> **Specification**: [LP-9002 DEX API & RPC](https://github.com/luxfi/LPs/blob/main/LPs/lp-9002-dex-api-rpc-specification.md) | [Discussions](https://github.com/luxfi/LPs/discussions)
## Overview
LX DEX provides multiple API protocols for integration:
LX provides multiple API protocols for integration:
- **JSON-RPC 2.0** - Primary RPC interface (`dex.*` namespace)
- **gRPC** - High-performance binary protocol (port 9760)
- **WebSocket** - Real-time push feeds
+2 -2
View File
@@ -5,7 +5,7 @@ description: LP-9002 DEX JSON-RPC API Reference
# JSON-RPC API Reference
The LX DEX exposes a JSON-RPC 2.0 API for programmatic trading operations. This API provides low-latency access to order management, market data, and account functions.
The LX exposes a JSON-RPC 2.0 API for programmatic trading operations. This API provides low-latency access to order management, market data, and account functions.
## Specification
@@ -355,7 +355,7 @@ This schema can be used with OpenRPC tooling for:
{
"openrpc": "1.2.6",
"info": {
"title": "LX DEX JSON-RPC API",
"title": "LX JSON-RPC API",
"version": "1.0.0",
"description": "LP-9002 compliant DEX API"
},
+2 -2
View File
@@ -1,13 +1,13 @@
---
title: WebSocket API
description: Real-time WebSocket API for LX DEX - connection, authentication, and streaming data
description: Real-time WebSocket API for LX - connection, authentication, and streaming data
---
# WebSocket API Overview
> **Specification**: [LP-9002 DEX API & RPC](https://github.com/luxfi/LPs/blob/main/LPs/lp-9002-dex-api-rpc-specification.md)
The LX DEX WebSocket API provides real-time, bidirectional communication for market data and trading operations. All messages use JSON encoding with strict ordering guarantees.
The LX WebSocket API provides real-time, bidirectional communication for market data and trading operations. All messages use JSON encoding with strict ordering guarantees.
## Connection Endpoints
@@ -1,11 +1,11 @@
---
title: Subscription Model
description: WebSocket subscription patterns, channels, and message sequencing for LX DEX
description: WebSocket subscription patterns, channels, and message sequencing for LX
---
# Subscription Model
All real-time data in LX DEX flows through a channel-based subscription model. Clients subscribe to specific channels and receive a snapshot followed by incremental updates.
All real-time data in LX flows through a channel-based subscription model. Clients subscribe to specific channels and receive a snapshot followed by incremental updates.
## Subscribe Flow
+3 -3
View File
@@ -1,11 +1,11 @@
---
title: Architecture Overview
description: High-level architecture of the LX DEX - a planet-scale decentralized exchange
description: High-level architecture of the LX - a planet-scale decentralized exchange
---
# Architecture Overview
The LX DEX is a high-performance decentralized exchange built for planet-scale throughput with sub-microsecond latency. This document provides a comprehensive overview of the system architecture, design principles, and component interactions.
The LX is a high-performance decentralized exchange built for planet-scale throughput with sub-microsecond latency. This document provides a comprehensive overview of the system architecture, design principles, and component interactions.
## Design Principles
@@ -30,7 +30,7 @@ The LX DEX is a high-performance decentralized exchange built for planet-scale t
```
+==============================================================================+
| LX DEX ARCHITECTURE |
| LX ARCHITECTURE |
+==============================================================================+
| |
| EXTERNAL CLIENTS |
+1 -1
View File
@@ -5,7 +5,7 @@ description: lxd sidecar daemon architecture - Warp messaging integration with L
# Sidecar Architecture
The LX DEX runs as a standalone sidecar daemon (`lxd`) separate from the Lux blockchain node. This architecture enables sub-millisecond order matching while maintaining blockchain settlement guarantees through Warp messaging.
The LX runs as a standalone sidecar daemon (`lxd`) separate from the Lux blockchain node. This architecture enables sub-millisecond order matching while maintaining blockchain settlement guarantees through Warp messaging.
## Design Rationale
+1 -1
View File
@@ -9,7 +9,7 @@ description: B-Chain architecture, MPC custody, and quantum-safe cross-chain tra
>
> **Implementation**: [`github.com/luxfi/node/vms/bridgevm`](https://github.com/luxfi/node/tree/main/vms/bridgevm) | [`github.com/luxfi/node/vms/thresholdvm`](https://github.com/luxfi/node/tree/main/vms/thresholdvm) | [`github.com/luxfi/threshold`](https://github.com/luxfi/threshold)
The LX DEX bridge enables secure, quantum-safe cross-chain asset transfers through a dedicated B-Chain (Bridge Chain) using MPC threshold signatures.
The LX bridge enables secure, quantum-safe cross-chain asset transfers through a dedicated B-Chain (Bridge Chain) using MPC threshold signatures.
## Implementation Status
+3 -3
View File
@@ -1,13 +1,13 @@
---
title: CLI Overview
description: Command-line tools for LX DEX - installation, configuration, and usage guide
description: Command-line tools for LX - installation, configuration, and usage guide
---
# LX DEX Command Line Interface
# LX Command Line Interface
> **Specification**: [LP-9002 DEX API & RPC](https://github.com/luxfi/LPs/blob/main/LPs/lp-9002-dex-api-rpc-specification.md) | [Discussions](https://github.com/luxfi/LPs/discussions)
LX DEX provides two primary command-line tools:
LX provides two primary command-line tools:
| Tool | Purpose | Description |
|------|---------|-------------|
+4 -4
View File
@@ -1,6 +1,6 @@
---
title: API Endpoints
description: Complete list of LX DEX API endpoints - production, testnet, regional, and failover endpoints
description: Complete list of LX API endpoints - production, testnet, regional, and failover endpoints
---
# API Endpoints
@@ -9,7 +9,7 @@ description: Complete list of LX DEX API endpoints - production, testnet, region
## Endpoint Overview
LX DEX provides geographically distributed endpoints optimized for latency and reliability. All endpoints support the same API interface with automatic failover capabilities.
LX provides geographically distributed endpoints optimized for latency and reliability. All endpoints support the same API interface with automatic failover capabilities.
## Production Endpoints
@@ -332,7 +332,7 @@ curl https://status.lux.network/api/v1/status
### From Other Exchanges
| Exchange | LX DEX Equivalent |
| Exchange | LX Equivalent |
|----------|-------------------|
| Binance `api.binance.com` | `api.lux.network` |
| FTX `ftx.com/api` | `api.lux.network/v1` |
@@ -341,7 +341,7 @@ curl https://status.lux.network/api/v1/status
### Endpoint Mapping
```typescript
// Binance → LX DEX
// Binance → LX
const endpointMap = {
'/api/v3/order': '/v1/orders',
'/api/v3/openOrders': '/v1/orders?status=open',
+70 -7
View File
@@ -1,6 +1,6 @@
---
title: Connectivity
description: Network connectivity options for LX DEX - remote access, colocation, dedicated links, and cloud connectivity
description: Network connectivity options for LX - remote access, colocation, dedicated links, and cloud connectivity
---
# Connectivity Overview
@@ -9,13 +9,13 @@ description: Network connectivity options for LX DEX - remote access, colocation
## Introduction
LX DEX provides multiple connectivity options designed for different trading requirements, from retail traders accessing via public internet to institutional market makers requiring sub-microsecond latency through colocation. This documentation covers all available connectivity methods, regional endpoints, latency specifications, and enterprise connectivity programs.
LX provides multiple connectivity options designed for different trading requirements, from retail traders accessing via public internet to institutional market makers requiring sub-microsecond latency through colocation. This documentation covers all available connectivity methods, regional endpoints, latency specifications, and enterprise connectivity programs.
## Connectivity Tiers
```
+------------------------------------------------------------------+
| LX DEX CONNECTIVITY TIERS |
| LX CONNECTIVITY TIERS |
+------------------------------------------------------------------+
| |
| TIER 1: COLOCATION (Sub-microsecond) |
@@ -93,7 +93,7 @@ LX DEX provides multiple connectivity options designed for different trading req
GLOBAL NETWORK TOPOLOGY
+------------------+
| LX DEX PRIMARY |
| LX PRIMARY |
| Kansas City, MO |
| (Google Fiber) |
+--------+---------+
@@ -132,10 +132,73 @@ LX DEX provides multiple connectivity options designed for different trading req
| Location | Bandwidth | Role | Features |
|----------|-----------|------|----------|
| **Kansas City, MO** | 20Gbps (100Gbps planned) | Primary Matching | Google Fiber, Microwave to SF/NYC |
| San Francisco, CA | 1Gbps | Lab/Development | Testing environment |
| **Kansas City, MO** | 20Gbps (100Gbps planned) | Primary Matching | Grand Building KCMO, Google Fiber, Microwave to SF/NYC |
| San Francisco, CA | 10Gbps | Lab/Development | SoMa, testing environment |
| Vancouver, BC | 1Gbps | Secondary | Canada presence |
#### Kansas City - Primary Datacenter
Our primary matching engine operates from the **Grand Building** in downtown Kansas City, Missouri. This strategic location provides:
- **Google Fiber**: Direct 20Gbps connection (100Gbps upgrade planned)
- **Microwave Links**: Sub-millisecond connectivity to San Francisco and New York
- **Central US Location**: Optimal latency to both coasts
- **Colocation**: Full rack and cage options for HFT clients
- **Native Custody**: Lux Threshold, KMS, and HSM infrastructure on-site
Kansas City's central geographic position makes it ideal for serving traders across North America with balanced latency to major financial centers.
### Our Thesis: Fiber-First HFT Infrastructure
<Callout type="info">
**Vision**: Build the world's fastest HFT platform by strategically connecting global fiber infrastructure with up to **800Gbps** capacity available today.
</Callout>
Traditional exchanges are constrained by legacy infrastructure and geographic lock-in. LX takes a different approach:
**1. Fiber Connectivity as Foundation**
- Direct dark fiber access with up to 800Gbps available capacity
- Microwave and millimeter-wave links for ultra-low latency between major hubs
- Strategic datacenter placement at fiber intersection points
**2. Geographic Arbitrage**
- Kansas City sits at the crossroads of major US fiber routes
- Equidistant latency to NYSE (New York) and tech hubs (SF/Seattle)
- Optimal positioning for serving global markets from a central node
**3. Scalable by Design**
- Current: 20Gbps production, 10Gbps development
- Near-term: 100Gbps upgrade path
- Available: Up to 800Gbps fiber capacity when demand requires
**4. Colocation-Native**
- All Lux infrastructure (matching engine, custody, KMS, HSM) colocated
- Third-party HFT firms can rack directly alongside our systems
- Nanosecond-level latency for colocated clients
**5. Global Expansion Model**
- Deploy light-speed HFT nodes in any datacenter worldwide
- Community-driven prioritization for new locations
- Same software stack, consistent APIs, local latency
```
FIBER TOPOLOGY VISION
Seattle ←——————— 800Gbps Available ———————→ NYC
\ /
\ /
↘ ↙
San Francisco ←——→ Kansas City ←——→ Chicago
↓ ↓ ↓
10Gbps 20Gbps Planned
(100Gbps)
↓
Microwave
SF ←——→ NYC
```
This architecture enables LX to offer institutional-grade latency at any scale, anywhere in the world.
### Planned (Community-driven prioritization)
| Location | Status | Notes |
@@ -147,7 +210,7 @@ LX DEX provides multiple connectivity options designed for different trading req
| Tokyo | Planned | Japan market |
<Callout type="info">
**Spin up anywhere**: LX DEX can deploy a light-speed HFT DEX in any colocated datacenter. Contact us for custom deployments.
**Spin up anywhere**: LX can deploy a light-speed HFT DEX in any colocated datacenter. Contact us for custom deployments.
</Callout>
## Getting Started
+7 -7
View File
@@ -1,6 +1,6 @@
---
title: Regional Data Centers
description: LX DEX data center locations, latency maps, and regional connectivity options
description: LX data center locations, latency maps, and regional connectivity options
---
# Regional Data Centers
@@ -9,7 +9,7 @@ description: LX DEX data center locations, latency maps, and regional connectivi
## Data Center Overview
LX DEX operates from Tier IV data centers strategically located to minimize latency for traders worldwide. Our primary matching engine is located in Equinix NY5, with secondary matching engines in London, Tokyo, and Singapore.
LX operates from Tier IV data centers strategically located to minimize latency for traders worldwide. Our primary matching engine is located in Equinix NY5, with secondary matching engines in London, Tokyo, and Singapore.
## Primary Data Center - New York
@@ -26,7 +26,7 @@ LX DEX operates from Tier IV data centers strategically located to minimize late
│ Cooling: N+1 redundant CRAC units │
│ Network: 100+ carriers, 1000+ cross-connects │
│ │
│ LX DEX Infrastructure: │
│ LX Infrastructure: │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ Matching Engine Cluster │ │
│ │ ├── Primary ME (Active) │ │
@@ -52,7 +52,7 @@ LX DEX operates from Tier IV data centers strategically located to minimize late
| Address | 800 Secaucus Road, Secaucus, NJ 07094 |
| Campus | NY5 IBX |
| Total Space | 180,000 sq ft |
| LX DEX Space | 10,000 sq ft |
| LX Space | 10,000 sq ft |
| Power Density | Up to 30kW per cabinet |
| Connectivity | 100+ network providers |
@@ -70,7 +70,7 @@ Latency: 70ms to NY5
| Attribute | Value |
|-----------|-------|
| Address | Harbour Exchange Square, London E14 9GE |
| LX DEX Space | 5,000 sq ft |
| LX Space | 5,000 sq ft |
| Cross-Connects | 500+ |
| Carriers | 80+ |
@@ -86,7 +86,7 @@ Latency: 160ms to NY5
| Attribute | Value |
|-----------|-------|
| Address | 2-1-4 Heiwajima, Ota-ku, Tokyo |
| LX DEX Space | 3,000 sq ft |
| LX Space | 3,000 sq ft |
| Cross-Connects | 400+ |
| Carriers | 60+ |
@@ -102,7 +102,7 @@ Latency: 230ms to NY5
| Attribute | Value |
|-----------|-------|
| Address | 26A Ayer Rajah Crescent, Singapore |
| LX DEX Space | 2,000 sq ft |
| LX Space | 2,000 sq ft |
| Cross-Connects | 300+ |
| Carriers | 50+ |
+3 -3
View File
@@ -9,7 +9,7 @@ description: DAG-based consensus protocol for ultra-low latency DEX settlement
>
> **Implementation**: [`github.com/luxfi/consensus`](https://github.com/luxfi/consensus)
LX DEX uses a custom DAG-based consensus protocol designed for ultra-low latency trading with 1ms finality.
LX uses a custom DAG-based consensus protocol designed for ultra-low latency trading with 1ms finality.
## Protocol Stack
@@ -17,7 +17,7 @@ The consensus layer implements a three-protocol stack optimized for different as
```
+------------------------------------------------------------------+
| LX DEX Consensus Stack |
| LX Consensus Stack |
+------------------------------------------------------------------+
| |
| +--------------------+ +--------------------+ +---------------+ |
@@ -51,7 +51,7 @@ The consensus layer implements a three-protocol stack optimized for different as
### DAG-Based Block Structure
Unlike traditional linear blockchains, LX DEX uses a Directed Acyclic Graph (DAG) structure that enables parallel block processing:
Unlike traditional linear blockchains, LX uses a Directed Acyclic Graph (DAG) structure that enables parallel block processing:
```
Block A (Round 1)
+1 -1
View File
@@ -9,7 +9,7 @@ description: Fast Probabilistic Consensus with validator sampling and confidence
>
> **Implementation**: [`github.com/luxfi/consensus/protocol/photon`](https://github.com/luxfi/consensus/tree/main/protocol/photon)
Photon implements Fast Probabilistic Consensus (FPC) for validator selection and voting in the LX DEX consensus layer.
Photon implements Fast Probabilistic Consensus (FPC) for validator selection and voting in the LX consensus layer.
## Overview
+2 -2
View File
@@ -9,7 +9,7 @@ description: Comprehensive decentralized finance protocol suite for the Lux ecos
>
> **Implementation**: [`github.com/luxfi/standard`](https://github.com/luxfi/standard)
The LX DEX DeFi suite provides institutional-grade financial primitives with privacy-preserving capabilities, post-quantum security, and cross-chain interoperability.
The LX DeFi suite provides institutional-grade financial primitives with privacy-preserving capabilities, post-quantum security, and cross-chain interoperability.
## Implementation Status
@@ -28,7 +28,7 @@ The LX DEX DeFi suite provides institutional-grade financial primitives with pri
```
+------------------------------------------------------------------+
| LX DEX DeFi Protocol Suite |
| LX DeFi Protocol Suite |
+------------------------------------------------------------------+
| |
| +-------------+ +-------------+ +-------------+ +-----------+ |
+1 -1
View File
@@ -9,7 +9,7 @@ description: Privacy-preserving overcollateralized lending with ZK credit scorin
>
> **Implementation**: [`github.com/luxfi/standard/src/lending`](https://github.com/luxfi/standard/tree/main/src/lending)
The LX DEX lending protocol enables privacy-preserving borrowing and lending with zero-knowledge credit scoring, confidential collateral verification, and hidden loan positions.
The LX lending protocol enables privacy-preserving borrowing and lending with zero-knowledge credit scoring, confidential collateral verification, and hidden loan positions.
## Implementation Status
+1 -1
View File
@@ -9,7 +9,7 @@ description: Leveraged perpetual trading with cross-margin and isolated margin s
>
> **Implementation**: [`github.com/luxfi/standard/src/gmx2`](https://github.com/luxfi/standard/tree/main/src/gmx2)
The LX DEX margin trading system enables leveraged perpetual trading up to 50x with cross-margin and isolated margin modes, advanced order types, and real-time liquidation protection.
The LX margin trading system enables leveraged perpetual trading up to 50x with cross-margin and isolated margin modes, advanced order types, and real-time liquidation protection.
## Implementation Status
+2 -2
View File
@@ -1,9 +1,9 @@
---
title: Development Guide
description: Build, test, and contribute to LX DEX
description: Build, test, and contribute to LX
---
# LX DEX Development Guide
# LX Development Guide
> **Specification**: [LP-0050 Developer Tools Overview](https://github.com/luxfi/LPs/blob/main/LPs/lp-0050-developer-tools-overview.md) | [LP-0006 Network Runner and Testing Framework](https://github.com/luxfi/LPs/blob/main/LPs/lp-0006-network-runner-and-testing-framework.md) | [Discussions](https://github.com/luxfi/LPs/discussions)
>
+2 -2
View File
@@ -1,6 +1,6 @@
---
title: Go Trading Bot
description: Complete high-performance Go trading bot for LX DEX
description: Complete high-performance Go trading bot for LX
---
# Go Trading Bot
@@ -20,7 +20,7 @@ A production-ready Go trading bot with order management, risk controls, and real
```go
// main.go
// Go Trading Bot for LX DEX
// Go Trading Bot for LX
// Build: go build -o trader main.go
// Run: ./trader
+4 -4
View File
@@ -1,18 +1,18 @@
---
title: Examples
description: Complete, production-ready trading examples for LX DEX
description: Complete, production-ready trading examples for LX
---
# Trading Examples
Complete, copy-paste ready examples for building trading systems on LX DEX.
Complete, copy-paste ready examples for building trading systems on LX.
## Quick Start
All examples connect to LX DEX and demonstrate real trading patterns. Before running:
All examples connect to LX and demonstrate real trading patterns. Before running:
```bash
# Start local LX DEX node
# Start local LX node
cd /path/to/lx/dex
make build
./bin/lxd --config config/local.yaml
+6 -6
View File
@@ -1,6 +1,6 @@
---
title: FIX Protocol
description: Financial Information eXchange (FIX) protocol connectivity for institutional trading on LX DEX
description: Financial Information eXchange (FIX) protocol connectivity for institutional trading on LX
---
# FIX Protocol
@@ -9,7 +9,7 @@ description: Financial Information eXchange (FIX) protocol connectivity for inst
## Overview
LX DEX provides full FIX protocol support for institutional clients requiring standardized electronic trading connectivity. Our FIX implementation enables seamless integration with existing trading infrastructure, order management systems (OMS), and execution management systems (EMS).
LX provides full FIX protocol support for institutional clients requiring standardized electronic trading connectivity. Our FIX implementation enables seamless integration with existing trading infrastructure, order management systems (OMS), and execution management systems (EMS).
## Supported FIX Versions
@@ -28,7 +28,7 @@ LX DEX provides full FIX protocol support for institutional clients requiring st
```
+------------------------------------------------------------------+
| LX DEX FIX ARCHITECTURE |
| LX FIX ARCHITECTURE |
+------------------------------------------------------------------+
| |
| CLIENT INFRASTRUCTURE |
@@ -50,7 +50,7 @@ LX DEX provides full FIX protocol support for institutional clients requiring st
+------------------------------------------------------------------+
| v |
| +----------------------------------------------------------+ |
| | LX DEX FIX GATEWAY | |
| | LX FIX GATEWAY | |
| | +----------+ +----------+ +----------+ +----------+ | |
| | | Session | | Message | | Order | | Market | | |
| | | Manager | | Router | | Router | | Data | | |
@@ -59,7 +59,7 @@ LX DEX provides full FIX protocol support for institutional clients requiring st
| | |
| v |
| +----------------------------------------------------------+ |
| | LX DEX MATCHING ENGINE | |
| | LX MATCHING ENGINE | |
| | 487ns Latency | |
| +----------------------------------------------------------+ |
| |
@@ -112,7 +112,7 @@ SSLProtocols=TLSv1.2,TLSv1.3
### Order Lifecycle
```
Client LX DEX FIX Gateway
Client LX FIX Gateway
| |
| Logon (A) |
|----------------------------------->|
+4 -4
View File
@@ -1,11 +1,11 @@
---
title: FIX Quick Start
description: Connect to LX DEX via FIX protocol in 15 minutes
description: Connect to LX via FIX protocol in 15 minutes
---
# FIX Quick Start
Get connected to LX DEX via FIX protocol in 15 minutes.
Get connected to LX via FIX protocol in 15 minutes.
## Prerequisites
@@ -35,13 +35,13 @@ You will receive:
| Credential | Description | Example |
|------------|-------------|---------|
| SenderCompID | Your unique identifier | `ACME_TRADING` |
| TargetCompID | LX DEX identifier | `LXDEX` |
| TargetCompID | LX identifier | `LXDEX` |
| Password | Session authentication | `(provided securely)` |
| Data Dictionary | Customized FIX schema | `LXDEX-FIX44.xml` |
## Step 2: Download Data Dictionary
Download the LX DEX FIX data dictionary:
Download the LX FIX data dictionary:
```bash
# FIX 4.4 (Recommended)
+3 -3
View File
@@ -1,15 +1,15 @@
---
title: Getting Started
description: Quick start guide for LX DEX - installation, setup, and your first trade
description: Quick start guide for LX - installation, setup, and your first trade
---
# Getting Started with LX DEX
# Getting Started with LX
> **Specification**: [LP-9000 DEX Core](https://github.com/luxfi/LPs/blob/main/LPs/lp-9000-dex-core-specification.md) | [LP-9002 DEX API](https://github.com/luxfi/LPs/blob/main/LPs/lp-9002-dex-api-rpc-specification.md) | [Discussions](https://github.com/luxfi/LPs/discussions)
>
> **Implementation**: [`github.com/luxfi/dex`](https://github.com/luxfi/dex)
Get up and running with LX DEX in minutes.
Get up and running with LX in minutes.
## Prerequisites
+4 -4
View File
@@ -1,11 +1,11 @@
---
title: Colocation
description: Global data center presence with sub-microsecond access to LX DEX matching engines
description: Global data center presence with sub-microsecond access to LX matching engines
---
# Colocation Services
LX DEX offers **institutional-grade colocation** at premier financial data centers worldwide.
LX offers **institutional-grade colocation** at premier financial data centers worldwide.
## Data Center Locations
@@ -62,7 +62,7 @@ LX DEX offers **institutional-grade colocation** at premier financial data cente
│ NY5 NETWORK TOPOLOGY │
├─────────────────────────────────────────────────────────────┤
│ │
│ Your Rack LX DEX Rack │
│ Your Rack LX Rack │
│ ┌──────────────┐ ┌──────────────┐ │
│ │ Your Server │ │ Gateway │ │
│ │ │ │ (FPGA) │ │
@@ -202,7 +202,7 @@ OS: Ubuntu 22.04 LTS
```bash
#!/bin/bash
# Optimal NIC configuration for LX DEX colocation
# Optimal NIC configuration for LX colocation
# Disable interrupt coalescing
ethtool -C eth0 rx-usecs 0 tx-usecs 0
+8 -8
View File
@@ -5,7 +5,7 @@ description: Direct connections, dedicated lines, and network options for ultra-
# Connectivity Options
LX DEX provides multiple connectivity tiers optimized for different latency and throughput requirements.
LX provides multiple connectivity tiers optimized for different latency and throughput requirements.
## Connectivity Tiers
@@ -52,7 +52,7 @@ LX DEX provides multiple connectivity tiers optimized for different latency and
### Direct Fiber Connection
The lowest latency option - direct single-mode fiber from your rack to the LX DEX matching engine.
The lowest latency option - direct single-mode fiber from your rack to the LX matching engine.
**Specifications**:
@@ -69,7 +69,7 @@ The lowest latency option - direct single-mode fiber from your rack to the LX DE
Remote Direct Memory Access bypasses the kernel for minimum latency.
```cpp
// RDMA connection setup for LX DEX
// RDMA connection setup for LX
#include <rdma/rdma_cma.h>
#include <infiniband/verbs.h>
@@ -155,7 +155,7 @@ private:
Data Plane Development Kit for kernel bypass on standard NICs.
```cpp
// DPDK initialization for LX DEX
// DPDK initialization for LX
#include <rte_eal.h>
#include <rte_ethdev.h>
#include <rte_mbuf.h>
@@ -248,7 +248,7 @@ For firms in the same metropolitan area but not colocated.
│ │
│ Manhattan Secaucus (NY5) │
│ ┌───────┐ ┌───────┐ │
│ │ 111 │◄───── 15km ───────►│ LX DEX│ │
│ │ 111 │◄───── 15km ───────►│ LX│ │
│ │ 8th │ Dark Fiber │ Engine│ │
│ └───────┘ < 100us └───────┘ │
│ │ ▲ │
@@ -286,7 +286,7 @@ Direct BGP peering at major internet exchanges.
```
# BGP peering configuration example
router bgp 65002 # Your ASN
neighbor 10.0.0.1 remote-as 65001 # LX DEX ASN
neighbor 10.0.0.1 remote-as 65001 # LX ASN
neighbor 10.0.0.1 description LX-DEX-Peering
address-family ipv4 unicast
@@ -328,7 +328,7 @@ For global firms requiring guaranteed performance.
Software-defined WAN with intelligent routing.
```yaml
# SD-WAN configuration for LX DEX
# SD-WAN configuration for LX
network:
name: "Trading-Network"
provider: "lx-sdwan"
@@ -445,7 +445,7 @@ setInterval(() => {
│ ACTIVE-ACTIVE CONNECTIVITY │
├─────────────────────────────────────────────────────────────┤
│ │
│ Your Infrastructure LX DEX Infrastructure │
│ Your Infrastructure LX Infrastructure │
│ │
│ ┌──────────────┐ ┌──────────────────┐ │
│ │ Primary │───── 100G A ─────►│ Gateway A │ │
+192 -8
View File
@@ -3,13 +3,15 @@ title: High-Frequency Trading
description: Sub-microsecond execution for institutional HFT - 2ns GPU latency, 434M orders/sec, colocation options
---
# High-Frequency Trading on LX DEX
# High-Frequency Trading on LX
LX DEX delivers **institutional-grade HFT infrastructure** with the lowest latency in DeFi.
> **Trade at Lightspeed**
## Why LX DEX for HFT
LX delivers **institutional-grade HFT infrastructure** with the lowest latency in DeFi—and crypto overall.
| Metric | LX DEX | Hyperliquid | dYdX | Traditional CEX |
## Why LX for HFT
| Metric | LX | Hyperliquid | dYdX | Traditional CEX |
|--------|--------|-------------|------|-----------------|
| **Order Latency** | **2ns** (GPU) | ~1ms | ~50ms | 10-50us |
| **Throughput** | **434M/sec** | ~100K/sec | ~10K/sec | 1-10M/sec |
@@ -88,7 +90,7 @@ LX DEX delivers **institutional-grade HFT infrastructure** with the lowest laten
│ HFT SYSTEM ARCHITECTURE │
├─────────────────────────────────────────────────────────────┤
│ │
│ Your HFT System LX DEX Infrastructure │
│ Your HFT System LX Infrastructure │
│ ┌──────────────┐ ┌──────────────────┐ │
│ │ Strategy │ │ Gateway │ │
│ │ Engine │ │ (FPGA/DPDK) │ │
@@ -211,11 +213,193 @@ md.on_trade([](const Trade& trade) {
- **Throughput**: 1M orders/sec
- **Best for**: Longer-horizon strategies, retail
## Arbitrage Strategies
LX's speed advantage creates unique arbitrage opportunities that are impossible on slower venues.
### What is Arbitrage?
Arbitrage exploits price differences for the same asset across different markets. In traditional finance, these opportunities last milliseconds. On LX, you can capture opportunities that last **microseconds**—before anyone else even sees them.
```
ARBITRAGE OPPORTUNITY WINDOW
Price Discovery Timeline
─────────────────────────────────────────────────────────────►
|← LX sees price →|← Hyperliquid sees →|← dYdX sees →|
| 2ns | 1ms | 50ms |
╔═══════════════════════════════════════════════════════════╗
║ LX ADVANTAGE: 500,000x faster price discovery ║
║ Window to capture arb: ~1ms before competitors react ║
╚═══════════════════════════════════════════════════════════╝
```
### Cross-Exchange Arbitrage
The most profitable strategy leverages LX's speed to arbitrage against slower exchanges.
#### Example 1: BTC/USD Price Discrepancy
```
Scenario: BTC price moves on Binance
Timeline:
├── T+0.000ms Binance price: $50,000 → $50,100
├── T+0.002ms LX receives price feed (2ns processing)
├── T+0.003ms Your algo detects $100 arb opportunity
├── T+0.005ms Submit buy on LX @ $50,000
├── T+0.007ms Order filled on LX
├── T+1.000ms Hyperliquid updates price
├── T+5.000ms dYdX updates price
├── T+10.00ms Retail sees new price
└── T+10.01ms Submit sell on slower venue @ $50,100
Result: $100 profit per BTC, captured in 10ms
At 1000 BTC/day volume = $100,000/day profit potential
```
#### Example 2: ETH/BTC Cross-Rate Arbitrage
```
Three-way arbitrage across correlated pairs:
LX (T+2ns): ETH/USD = $2,500 BTC/USD = $50,000
Hyperliquid (T+1ms): ETH/USD = $2,505 BTC/USD = $50,000
Implied ETH/BTC: 0.0500 (LX) vs 0.0501 (Hyperliquid)
Strategy:
1. Buy ETH on LX → $2,500
2. Sell ETH on Hyperliquid → $2,505
3. Profit: $5/ETH (0.2%)
At 10,000 ETH/day = $50,000/day profit
```
#### Example 3: Stablecoin Depeg Arbitrage
```
USDC momentarily depegs on Coinbase:
T+0ms: Coinbase USDC/USD = $0.998 (depeg detected)
T+0.002ms: LX USDC/USD = $1.000 (still at peg)
T+0.010ms: Your algo executes:
- Buy USDC on Coinbase @ $0.998
- Sell USDC on LX @ $1.000
T+100ms: Other arbitrageurs notice
T+500ms: Opportunity closes
Profit: 0.2% per USDC
At $10M volume = $20,000 profit in 500ms
```
### Latency Arbitrage
Exploit the speed difference between LX and other venues.
```
Your Infrastructure (Colocated at KC Grand Building)
│
│ ~2ns to LX matching engine
▼
┌─────────┐
│ LX │ ◄── Price updates first (nanoseconds)
└─────────┘
│
│ Microwave: ~4ms to NYC
▼
┌─────────┐
│ NYSE/ │ ◄── Price updates second (milliseconds)
│ Binance │
└─────────┘
Strategy:
1. See price move on LX first
2. Trade on LX immediately (2ns)
3. Trade on slower venue before they update (~4ms)
4. Capture spread
```
### Statistical Arbitrage
LX's throughput (434M orders/sec) enables high-frequency stat arb:
```python
# Pairs Trading Example
# ETH and BTC historically correlated at 0.85
def stat_arb_signal():
eth_price = lx.get_price("ETH-USD") # 2ns
btc_price = lx.get_price("BTC-USD") # 2ns
# Calculate z-score of spread
spread = eth_price / btc_price
z_score = (spread - historical_mean) / historical_std
if z_score > 2.0:
# ETH overpriced relative to BTC
lx.sell("ETH-USD", size) # 2ns execution
lx.buy("BTC-USD", size * ratio)
elif z_score < -2.0:
# ETH underpriced relative to BTC
lx.buy("ETH-USD", size)
lx.sell("BTC-USD", size * ratio)
# Execute 1000x per second = 86.4M signals/day
```
### Geographic Arbitrage
LX's Kansas City location enables unique geographic arbitrage:
```
SF KC NYC
│ │ │
│◄─── 1.8ms ────►│◄─── 1.8ms ────►│
│ │ │
┌──────┴──────┐ ┌──────┴──────┐ ┌──────┴──────┐
│ Coinbase │ │ LX │ │ NYSE/CME │
│ (retail) │ │ (primary) │ │ (trad-fi) │
└─────────────┘ └─────────────┘ └─────────────┘
Advantage:
- KC is equidistant to both coasts
- Microwave links provide sub-2ms to SF and NYC
- First to see price moves from BOTH directions
- Arbitrage window: ~1.8ms before either coast reacts
```
### Arbitrage P&L Calculator
| Strategy | Avg Spread | Daily Volume | Est. Daily Profit |
|----------|------------|--------------|-------------------|
| Cross-exchange BTC | 0.01-0.05% | $100M | $10K-$50K |
| ETH/BTC triangular | 0.02-0.10% | $50M | $10K-$50K |
| Stablecoin depeg | 0.1-0.5% | $20M | $20K-$100K |
| Stat arb pairs | 0.005-0.02% | $200M | $10K-$40K |
| Geographic latency | 0.01-0.03% | $100M | $10K-$30K |
<Callout type="info">
**Risk Warning**: Arbitrage strategies require significant capital, infrastructure investment, and risk management. Past performance does not guarantee future results. Always test strategies on testnet first.
</Callout>
### Why LX Wins at Arbitrage
| Factor | LX Advantage |
|--------|------------------|
| **Speed** | 2ns vs 1-50ms competitors = see opportunities first |
| **Throughput** | 434M/sec = execute more strategies simultaneously |
| **Colocation** | Rack next to matching engine = zero network latency |
| **Fiber** | 800Gbps available = never bandwidth constrained |
| **Geography** | KC central location = arbitrage both coasts |
| **Custody** | Self-custody = no counterparty risk during arb |
## Comparison with Competitors
### vs Hyperliquid
| Feature | LX DEX | Hyperliquid |
| Feature | LX | Hyperliquid |
|---------|--------|-------------|
| Matching latency | 2ns | ~1ms |
| Throughput | 434M/sec | ~100K/sec |
@@ -226,7 +410,7 @@ md.on_trade([](const Trade& trade) {
### vs dYdX v4
| Feature | LX DEX | dYdX v4 |
| Feature | LX | dYdX v4 |
|---------|--------|---------|
| Matching latency | 2ns | ~50ms |
| Throughput | 434M/sec | ~10K/sec |
@@ -236,7 +420,7 @@ md.on_trade([](const Trade& trade) {
### vs Traditional CEX (Binance, Coinbase)
| Feature | LX DEX | Traditional CEX |
| Feature | LX | Traditional CEX |
|---------|--------|-----------------|
| Matching latency | 2ns | 10-50us |
| Throughput | 434M/sec | 1-10M/sec |
+3 -3
View File
@@ -3,7 +3,7 @@ title: Introduction
description: Ultra-High Performance Decentralized Exchange - 434M+ orders/sec with sub-microsecond latency
---
# LX DEX
# LX
Ultra-high performance DEX with **434M+ orders/sec** on Apple Silicon.
@@ -11,7 +11,7 @@ Ultra-high performance DEX with **434M+ orders/sec** on Apple Silicon.
## Overview
LX DEX is a planet-scale, fully on-chain decentralized exchange built on Lux Network, combining ultra-low latency matching, quantum-resistant security, and support for global markets in a unified system. The DEX runs as a **standalone sidecar daemon** (`lxd`) separate from the Lux blockchain node, communicating via Warp messages for settlement.
LX is a planet-scale, fully on-chain decentralized exchange built on Lux Network, combining ultra-low latency matching, quantum-resistant security, and support for global markets in a unified system. The DEX runs as a **standalone sidecar daemon** (`lxd`) separate from the Lux blockchain node, communicating via Warp messages for settlement.
## Key Performance
@@ -55,7 +55,7 @@ LX DEX is a planet-scale, fully on-chain decentralized exchange built on Lux Net
```
┌─────────────────────────────────────────────────────────────┐
│ LX DEX ARCHITECTURE │
│ LX ARCHITECTURE │
├─────────────────────────────────────────────────────────────┤
│ │
│ Client Layer │
+9 -9
View File
@@ -5,7 +5,7 @@ description: Institutional-grade custody with MPC technology, cold storage, and
# Custody Solutions
LX DEX provides institutional custody infrastructure combining the security of cold storage with the operational flexibility required for active trading. Our custody solution eliminates counterparty risk while maintaining regulatory compliance.
LX provides institutional custody infrastructure combining the security of cold storage with the operational flexibility required for active trading. Our custody solution eliminates counterparty risk while maintaining regulatory compliance.
## Architecture Overview
@@ -38,7 +38,7 @@ LX DEX provides institutional custody infrastructure combining the security of c
### Multi-Party Computation (MPC)
LX DEX uses threshold MPC signatures where no single party ever holds a complete private key. Keys are generated and stored as distributed shares across geographically separated infrastructure.
LX uses threshold MPC signatures where no single party ever holds a complete private key. Keys are generated and stored as distributed shares across geographically separated infrastructure.
<Callout type="info">
**No Single Point of Failure**: Even if multiple key shares are compromised, attackers cannot reconstruct the private key without meeting the threshold.
@@ -85,8 +85,8 @@ Key shares are distributed across multiple security domains:
| Share Location | Control | Hardware | Geography |
|---------------|---------|----------|-----------|
| Client HSM | Client | Thales Luna | Client premises |
| LX Primary | LX DEX | AWS CloudHSM | US-East |
| LX Secondary | LX DEX | Azure HSM | EU-West |
| LX Primary | LX | AWS CloudHSM | US-East |
| LX Secondary | LX | Azure HSM | EU-West |
| Backup 1 | Escrow Agent | Futurex | Singapore |
| Backup 2 | Escrow Agent | Utimaco | Switzerland |
@@ -287,7 +287,7 @@ For cold vault key generation, we conduct formal key ceremonies:
## Insurance Coverage
<Callout type="warning">
LX DEX maintains comprehensive insurance coverage for custodied assets.
LX maintains comprehensive insurance coverage for custodied assets.
</Callout>
### Coverage Details
@@ -312,7 +312,7 @@ Coverage applies when assets are:
### vs Centralized Exchange Custody
| Feature | LX DEX Custody | CEX Custody |
| Feature | LX Custody | CEX Custody |
|---------|---------------|-------------|
| Key Control | Client + LX (MPC) | Exchange only |
| Counterparty Risk | None | Full exchange risk |
@@ -323,7 +323,7 @@ Coverage applies when assets are:
### vs Self-Custody
| Feature | LX DEX Custody | Self-Custody |
| Feature | LX Custody | Self-Custody |
|---------|---------------|--------------|
| Key Recovery | MPC backup shares | Seed phrase only |
| Operational Security | Institutional-grade | DIY |
@@ -334,7 +334,7 @@ Coverage applies when assets are:
### vs Third-Party Custodians
| Feature | LX DEX Custody | Third-Party |
| Feature | LX Custody | Third-Party |
|---------|---------------|-------------|
| Settlement Speed | T+0 (atomic) | T+1 to T+3 |
| Trading Integration | Native | API bridge |
@@ -452,7 +452,7 @@ Each institutional client receives sealed recovery packages:
- Stored at two independent escrow agents
<Callout type="info">
**Full Control**: In a worst-case scenario where LX DEX ceases operations, clients can recover their assets independently using their key shares and backup packages.
**Full Control**: In a worst-case scenario where LX ceases operations, clients can recover their assets independently using their key shares and backup packages.
</Callout>
## Contact
+9 -9
View File
@@ -5,13 +5,13 @@ description: Enterprise-grade trading infrastructure for hedge funds, proprietar
# Institutional Services
LX DEX provides institutional-grade infrastructure purpose-built for sophisticated market participants requiring the highest standards of performance, security, and compliance.
LX provides institutional-grade infrastructure purpose-built for sophisticated market participants requiring the highest standards of performance, security, and compliance.
## Overview
LX DEX Institutional combines the transparency and self-custody benefits of decentralized finance with the performance, reliability, and compliance capabilities expected by regulated financial institutions.
LX Institutional combines the transparency and self-custody benefits of decentralized finance with the performance, reliability, and compliance capabilities expected by regulated financial institutions.
| Capability | Traditional Exchange | LX DEX Institutional |
| Capability | Traditional Exchange | LX Institutional |
|------------|---------------------|---------------------|
| Settlement | T+2 (equities), T+1 (futures) | **T+0 Atomic** |
| Custody | Counterparty risk | **Self-custody + MPC** |
@@ -78,7 +78,7 @@ LX DEX Institutional combines the transparency and self-custody benefits of dece
## Security Certifications
<Callout type="info">
LX DEX maintains the highest security certifications required by institutional clients.
LX maintains the highest security certifications required by institutional clients.
</Callout>
| Certification | Status | Audit Frequency |
@@ -124,7 +124,7 @@ LX DEX maintains the highest security certifications required by institutional c
## Regulatory Framework
LX DEX operates within a comprehensive regulatory framework designed for institutional participation:
LX operates within a comprehensive regulatory framework designed for institutional participation:
### Jurisdictional Coverage
@@ -151,8 +151,8 @@ LX DEX operates within a comprehensive regulatory framework designed for institu
```
Venue Round-Trip Latency
────────────────────────────────────────
LX DEX (GPU) 2 nanoseconds
LX DEX (CPU) 487 nanoseconds
LX (GPU) 2 nanoseconds
LX (CPU) 487 nanoseconds
CME Globex ~1 millisecond
NYSE Arca ~50 microseconds
Coinbase Pro ~10 milliseconds
@@ -164,8 +164,8 @@ Binance ~5 milliseconds
```
Venue Orders/Second
────────────────────────────────────────
LX DEX (GPU) 434,000,000
LX DEX (CPU) 1,013,824
LX (GPU) 434,000,000
LX (CPU) 1,013,824
CME Globex ~10,000,000
NYSE ~1,000,000
Coinbase Pro ~100,000
@@ -1,11 +1,11 @@
---
title: Hummingbot Quick Start
description: Get started with Hummingbot and LX DEX in 5 minutes
description: Get started with Hummingbot and LX in 5 minutes
---
# Hummingbot Quick Start
Get your first trading bot running on LX DEX in under 5 minutes.
Get your first trading bot running on LX in under 5 minutes.
## Prerequisites
@@ -20,15 +20,15 @@ git clone https://github.com/hummingbot/hummingbot.git
cd hummingbot
```
## Step 2: Install LX DEX Connector
## Step 2: Install LX Connector
```bash
# Install the LX DEX Gateway connector
# Install the LX Gateway connector
cd gateway
npm install @lxdex/hummingbot-gateway-connector
```
## Step 3: Configure LX DEX
## Step 3: Configure LX
Create the configuration file:
@@ -84,7 +84,7 @@ docker-compose up -d hummingbot
docker attach hummingbot
```
## Step 6: Connect to LX DEX
## Step 6: Connect to LX
In the Hummingbot client:
@@ -135,7 +135,7 @@ Watch your bot create orders! You can monitor with:
| Command | Description |
|---------|-------------|
| `connect lxdex` | Connect to LX DEX |
| `connect lxdex` | Connect to LX |
| `balance` | Check wallet balances |
| `ticker LUX-USDC` | Get current price |
| `create` | Create new strategy |
@@ -1,11 +1,11 @@
---
title: Hummingbot Strategies
description: Trading strategies for LX DEX with Hummingbot
description: Trading strategies for LX with Hummingbot
---
# Hummingbot Strategies for LX DEX
# Hummingbot Strategies for LX
This guide covers popular trading strategies you can run on LX DEX using Hummingbot.
This guide covers popular trading strategies you can run on LX using Hummingbot.
## Strategy Overview
@@ -58,9 +58,9 @@ hanging_orders_cancel_pct: 5%
>>> start
```
### Optimal Parameters for LX DEX
### Optimal Parameters for LX
Due to LX DEX's low latency, you can use tighter spreads:
Due to LX's low latency, you can use tighter spreads:
| Market Condition | Bid Spread | Ask Spread | Refresh Time |
|------------------|------------|------------|--------------|
@@ -70,7 +70,7 @@ Due to LX DEX's low latency, you can use tighter spreads:
## Cross-Exchange Market Making
Arbitrage between LX DEX and centralized exchanges.
Arbitrage between LX and centralized exchanges.
### Configuration
@@ -104,7 +104,7 @@ hedging_delay: 0.5s
## AMM Liquidity Provision
Provide liquidity to LX DEX AMM pools.
Provide liquidity to LX AMM pools.
### Using the API Directly
@@ -265,7 +265,7 @@ class DexCexArbitrage:
self.min_profit_bps = 10 # Minimum 0.1% profit
async def find_opportunities(self, pair: str):
# Get LX DEX price
# Get LX price
lxdex_quote = await self.lxdex.get_quote({
"baseToken": pair.split("/")[0],
"quoteToken": pair.split("/")[1],
@@ -416,5 +416,5 @@ Keep a trading journal of your strategies and results.
## Getting Help
- **[Hummingbot Documentation](https://docs.hummingbot.org)**
- **[LX DEX Discord](https://discord.gg/lux)**
- **[LX Discord](https://discord.gg/lux)**
- **[Strategy Examples](https://github.com/hummingbot/hummingbot/tree/master/scripts)**
@@ -1,15 +1,15 @@
---
title: Hummingbot Integration
description: Official LX DEX connector for Hummingbot Gateway
description: Official LX connector for Hummingbot Gateway
---
# Hummingbot Integration
[Hummingbot](https://hummingbot.org) is the most popular open-source trading bot software, used by thousands of traders and market makers worldwide. LX DEX provides an official Gateway connector enabling automated trading on our ultra-low latency DEX.
[Hummingbot](https://hummingbot.org) is the most popular open-source trading bot software, used by thousands of traders and market makers worldwide. LX provides an official Gateway connector enabling automated trading on our ultra-low latency DEX.
## Features
Our Hummingbot Gateway connector supports all four LX DEX trading schemas:
Our Hummingbot Gateway connector supports all four LX trading schemas:
| Schema | Description | Use Cases |
|--------|-------------|-----------|
@@ -55,7 +55,7 @@ npm install hummingbot-gateway-lxdex-plugin
Create `conf/lxdex.yml` in your Gateway directory:
```yaml
# LX DEX Configuration
# LX Configuration
enabled: true
chain: lux
+4 -4
View File
@@ -1,11 +1,11 @@
---
title: Trading Bot Integrations
description: Connect LX DEX to popular trading bots and market making software
description: Connect LX to popular trading bots and market making software
---
# Trading Bot Integrations
LX DEX provides official connectors for popular trading bots and market making software, enabling algorithmic trading, market making, and automated strategies on our ultra-low latency DEX.
LX provides official connectors for popular trading bots and market making software, enabling algorithmic trading, market making, and automated strategies on our ultra-low latency DEX.
## Available Integrations
@@ -20,11 +20,11 @@ The most popular open-source trading bot software. Our official Gateway connecto
[Get Started with Hummingbot →](/docs/integrations/hummingbot)
## Why Use Trading Bots on LX DEX?
## Why Use Trading Bots on LX?
### Ultra-Low Latency
LX DEX's sub-100ns matching engine latency makes it ideal for:
LX's sub-100ns matching engine latency makes it ideal for:
- High-frequency trading strategies
- Arbitrage opportunities
- Fast market making
+1 -1
View File
@@ -9,7 +9,7 @@ description: Decentralized lending and borrowing with margin trading support
>
> **Implementation**: [`github.com/luxfi/standard/src/lending`](https://github.com/luxfi/standard/tree/main/src/lending)
LX DEX includes a decentralized lending protocol for margin trading and yield generation.
LX includes a decentralized lending protocol for margin trading and yield generation.
## Implementation Status
@@ -1,11 +1,11 @@
---
title: API Access
description: Dedicated API endpoints, rate limits, priority access, and technical specifications for LX DEX market makers
description: Dedicated API endpoints, rate limits, priority access, and technical specifications for LX market makers
---
# Market Maker API Access
LX DEX provides market makers with dedicated API infrastructure designed for high-frequency trading, including priority endpoints, elevated rate limits, and direct market access capabilities.
LX provides market makers with dedicated API infrastructure designed for high-frequency trading, including priority endpoints, elevated rate limits, and direct market access capabilities.
## API Tiers
+6 -6
View File
@@ -1,11 +1,11 @@
---
title: Fee Structure
description: Market maker fee structure, rebates, negative maker fees, and volume-based incentives on LX DEX
description: Market maker fee structure, rebates, negative maker fees, and volume-based incentives on LX
---
# Market Maker Fee Structure
LX DEX offers one of the most competitive fee structures in the industry for market makers, including negative maker fees, volume-based rebates, and tiered incentive programs.
LX offers one of the most competitive fee structures in the industry for market makers, including negative maker fees, volume-based rebates, and tiered incentive programs.
## Fee Overview
@@ -214,7 +214,7 @@ Tier 4 market makers may negotiate custom fee arrangements:
| Exchange | Maker Fee | Taker Fee | MM Rebate |
|----------|-----------|-----------|-----------|
| **LX DEX (Tier 3)** | **-0.010%** | **0.020%** | **$200K/mo** |
| **LX (Tier 3)** | **-0.010%** | **0.020%** | **$200K/mo** |
| Binance VIP 9 | -0.005% | 0.015% | None |
| Coinbase Adv. MM | 0.00% | 0.04% | None |
| Kraken Pro | 0.00% | 0.016% | None |
@@ -224,7 +224,7 @@ Tier 4 market makers may negotiate custom fee arrangements:
| DEX | Maker Fee | Taker Fee | MEV Protection |
|-----|-----------|-----------|----------------|
| **LX DEX** | **-0.020%** | **0.015%** | **Full** |
| **LX** | **-0.020%** | **0.015%** | **Full** |
| Uniswap v3 | 0.05-1% | 0.05-1% | Partial |
| dYdX | -0.025% | 0.05% | Yes |
| GMX | N/A (AMM) | 0.1% | Partial |
@@ -240,13 +240,13 @@ Competitor CEX (Best tier):
- Taker: $500M × 0.015% = $75,000
- Monthly cost: $75,000
LX DEX (Tier 3):
LX (Tier 3):
- Maker: $2B × -0.010% = -$200,000 (rebate)
- Taker: $500M × 0.020% = $100,000
- Volume bonus: $2B × 0.015% = $300,000
- Monthly net: -$400,000 (earn $400K)
Annual difference: $5.7M in LX DEX's favor
Annual difference: $5.7M in LX's favor
```
---
+7 -7
View File
@@ -1,17 +1,17 @@
---
title: Market Maker Program
description: Professional market making on LX DEX - Ultra-low latency, competitive rebates, and institutional-grade infrastructure
description: Professional market making on LX - Ultra-low latency, competitive rebates, and institutional-grade infrastructure
---
# Market Maker Program
LX DEX offers a comprehensive market maker program designed for professional trading firms, proprietary trading desks, and institutional liquidity providers seeking the highest performance decentralized exchange infrastructure.
LX offers a comprehensive market maker program designed for professional trading firms, proprietary trading desks, and institutional liquidity providers seeking the highest performance decentralized exchange infrastructure.
## Why LX DEX for Market Making?
## Why LX for Market Making?
### Unmatched Performance
| Metric | LX DEX | Typical CEX | Typical DEX |
| Metric | LX | Typical CEX | Typical DEX |
|--------|--------|-------------|-------------|
| Order Latency | **2ns - 487ns** | 50-500us | 100ms-2s |
| Throughput | **434M ord/sec** | 100K ord/sec | 1K ord/sec |
@@ -35,7 +35,7 @@ LX DEX offers a comprehensive market maker program designed for professional tra
## Program Overview
```
LX DEX MARKET MAKER TIERS
LX MARKET MAKER TIERS
================================================================
TIER 4: STRATEGIC Monthly Volume: $10B+
@@ -170,7 +170,7 @@ After approval:
### vs. Centralized Exchanges
| Feature | LX DEX | Major CEX |
| Feature | LX | Major CEX |
|---------|--------|-----------|
| Custody | Self-custody | Exchange custody |
| Counterparty Risk | None | Exchange risk |
@@ -181,7 +181,7 @@ After approval:
### vs. Other DEXs
| Feature | LX DEX | AMM DEX | Other CLOB DEX |
| Feature | LX | AMM DEX | Other CLOB DEX |
|---------|--------|---------|----------------|
| Order Type | CLOB | AMM | CLOB |
| Latency | 2ns - 487ns | 2-12s | 100ms-1s |
@@ -1,11 +1,11 @@
---
title: Inventory Management
description: Position limits, hedging strategies, risk management, and inventory optimization for LX DEX market makers
description: Position limits, hedging strategies, risk management, and inventory optimization for LX market makers
---
# Inventory Management
Effective inventory management is critical for market maker profitability and risk control. This guide covers position limits, hedging strategies, risk management tools, and best practices for LX DEX market makers.
Effective inventory management is critical for market maker profitability and risk control. This guide covers position limits, hedging strategies, risk management tools, and best practices for LX market makers.
## Position Limits
@@ -138,7 +138,7 @@ const positions = [
### On-Platform Hedging
LX DEX provides native hedging capabilities:
LX provides native hedging capabilities:
#### 1. Perpetual Futures Hedge
+3 -3
View File
@@ -1,11 +1,11 @@
---
title: Program Tiers
description: LX DEX Market Maker program tiers, obligations, rewards, and service level agreements
description: LX Market Maker program tiers, obligations, rewards, and service level agreements
---
# Market Maker Program Tiers
LX DEX offers four distinct market maker tiers, each with specific requirements, obligations, and benefits. Tiers are evaluated monthly based on performance metrics.
LX offers four distinct market maker tiers, each with specific requirements, obligations, and benefits. Tiers are evaluated monthly based on performance metrics.
## Tier Overview
@@ -47,7 +47,7 @@ LX DEX offers four distinct market maker tiers, each with specific requirements,
## Tier 1: Standard Market Maker
Entry-level tier for firms beginning their LX DEX market making journey.
Entry-level tier for firms beginning their LX market making journey.
### Requirements
+2 -2
View File
@@ -1,11 +1,11 @@
---
title: Quoting Requirements
description: Spread requirements, quote depth obligations, uptime targets, and quoting best practices for LX DEX market makers
description: Spread requirements, quote depth obligations, uptime targets, and quoting best practices for LX market makers
---
# Quoting Requirements
Market makers on LX DEX must meet specific quoting obligations to maintain their tier status and receive associated benefits. This document details spread requirements, depth obligations, uptime targets, and monitoring procedures.
Market makers on LX must meet specific quoting obligations to maintain their tier status and receive associated benefits. This document details spread requirements, depth obligations, uptime targets, and monitoring procedures.
## Quoting Obligations Overview
+1 -1
View File
@@ -1,5 +1,5 @@
{
"title": "LX DEX Documentation",
"title": "LX Documentation",
"root": true,
"pages": [
"index",
@@ -1,11 +1,11 @@
---
title: Configuration
description: Complete configuration reference for LX DEX
description: Complete configuration reference for LX
---
# Configuration
LX DEX supports configuration via YAML files, environment variables, and command-line flags. This reference covers all available options.
LX supports configuration via YAML files, environment variables, and command-line flags. This reference covers all available options.
## Configuration Loading Order
@@ -24,7 +24,7 @@ Configuration sources are merged in this order (later overrides earlier):
```yaml
# /etc/lxdex/node.yaml
# LX DEX Configuration Reference
# LX Configuration Reference
#
# Node Settings
+1 -1
View File
@@ -5,7 +5,7 @@ description: Container deployment with Docker and Kubernetes
# Docker Deployment
This guide covers deploying LX DEX using Docker, Docker Compose, and Kubernetes.
This guide covers deploying LX using Docker, Docker Compose, and Kubernetes.
## Docker Images
+4 -4
View File
@@ -1,15 +1,15 @@
---
title: Operations Overview
description: Production deployment, monitoring, and maintenance guide for LX DEX
description: Production deployment, monitoring, and maintenance guide for LX
---
# Operations Overview
This guide covers production deployment, monitoring, and maintenance of LX DEX infrastructure. The platform supports multiple deployment models from single-node development to globally distributed production clusters.
This guide covers production deployment, monitoring, and maintenance of LX infrastructure. The platform supports multiple deployment models from single-node development to globally distributed production clusters.
## Deployment Architecture
LX DEX operates as a distributed trading system with the following components:
LX operates as a distributed trading system with the following components:
```
Load Balancer
@@ -257,7 +257,7 @@ iptables -A INPUT -p tcp --dport 9090 -s 10.0.0.0/8 -j ACCEPT # Metrics (inter
### Post-Quantum Security
LX DEX supports post-quantum cryptography via QZMQ:
LX supports post-quantum cryptography via QZMQ:
- **Key Exchange**: X25519 + ML-KEM-768 (hybrid)
- **Signatures**: ML-DSA-44 (Dilithium2)
@@ -1,11 +1,11 @@
---
title: Installation
description: Detailed installation instructions for LX DEX on all platforms
description: Detailed installation instructions for LX on all platforms
---
# Installation
This guide covers installing LX DEX on Linux, macOS, and from source.
This guide covers installing LX on Linux, macOS, and from source.
## Prerequisites
@@ -244,7 +244,7 @@ luxd version
Expected output:
```
LX DEX v1.0.0
LX v1.0.0
Commit: abc1234
Built: 2025-12-01T00:00:00Z
Go: go1.24.7
@@ -283,7 +283,7 @@ Create `/etc/systemd/system/lxdex.service`:
```ini
[Unit]
Description=LX DEX Trading Engine
Description=LX Trading Engine
Documentation=https://docs.lux.network/dex
After=network-online.target
Wants=network-online.target
+5 -5
View File
@@ -5,7 +5,7 @@ description: HFT-grade performance engineering - 434M orders/sec with sub-micros
# Performance Overview
LX DEX is engineered for **High-Frequency Trading (HFT)** performance, achieving metrics that compete with the world's fastest exchanges.
LX is engineered for **High-Frequency Trading (HFT)** performance, achieving metrics that compete with the world's fastest exchanges.
## Performance Targets vs Achieved
@@ -23,10 +23,10 @@ LX DEX is engineered for **High-Frequency Trading (HFT)** performance, achieving
| Exchange | Throughput | Latency | Technology |
|----------|------------|---------|------------|
| **LX DEX (MLX)** | **5.95M msgs/sec** | **0.68 μs** | MLX/Metal GPU |
| **LX DEX (GPU)** | **434M orders/sec** | **2 ns** | MLX batch processing |
| **LX DEX (C++)** | **1.08M msgs/sec** | **4.87 μs** | Pure C++ |
| **LX DEX (CPU)** | **1.01M orders/sec** | **487 ns** | Pure Go |
| **LX (MLX)** | **5.95M msgs/sec** | **0.68 μs** | MLX/Metal GPU |
| **LX (GPU)** | **434M orders/sec** | **2 ns** | MLX batch processing |
| **LX (C++)** | **1.08M msgs/sec** | **4.87 μs** | Pure C++ |
| **LX (CPU)** | **1.01M orders/sec** | **487 ns** | Pure Go |
| CME Globex | 100K/sec | 1-5 ms | Custom hardware |
| Binance | 1.4M/sec | 5-10 ms | Java/C++ |
| FTX (historical) | 1M/sec | 500 us | Rust |
+1 -1
View File
@@ -5,7 +5,7 @@ description: Object pooling, arena allocation, and GC tuning for zero-allocation
# Memory Optimization
LX DEX achieves **zero heap allocations** on the hot path through aggressive pooling, arena allocation, and GC tuning.
LX achieves **zero heap allocations** on the hot path through aggressive pooling, arena allocation, and GC tuning.
## Memory Architecture
+1 -1
View File
@@ -5,7 +5,7 @@ description: Scaling to 434M orders/sec with parallel execution and batch proces
# Throughput Optimization
LX DEX achieves **434M orders/sec** on GPU and **1M+ orders/sec** on CPU through parallel execution, batch processing, and lock-free algorithms.
LX achieves **434M orders/sec** on GPU and **1M+ orders/sec** on CPU through parallel execution, batch processing, and lock-free algorithms.
## Throughput Architecture
+26 -26
View File
@@ -1,16 +1,16 @@
---
title: Glossary
description: Complete glossary of LX DEX terminology - 100+ terms covering trading, blockchain, and system concepts
description: Complete glossary of LX terminology - 100+ terms covering trading, blockchain, and system concepts
---
# Glossary
Complete glossary of terms used in LX DEX documentation and APIs.
Complete glossary of terms used in LX documentation and APIs.
## A
### Aggregate Signature
A cryptographic signature that combines multiple signatures into one, reducing verification overhead. LX DEX uses BLS aggregate signatures for validator consensus.
A cryptographic signature that combines multiple signatures into one, reducing verification overhead. LX uses BLS aggregate signatures for validator consensus.
### All-or-None (AON)
An order condition requiring the entire order quantity to be filled in a single transaction or not at all. See also: [Fill or Kill](#fill-or-kill-fok).
@@ -22,7 +22,7 @@ In consensus, the confidence threshold (typically 0.8 or 80%) required for block
A unique identifier used to authenticate API requests. API keys should be kept secret and never exposed in client-side code.
### Arbitrage
The practice of exploiting price differences between markets. LX DEX provides low-latency infrastructure enabling cross-market arbitrage.
The practice of exploiting price differences between markets. LX provides low-latency infrastructure enabling cross-market arbitrage.
### Ask
An order to sell an asset at a specified price. The lowest ask price is the best ask. See also: [Bid](#bid).
@@ -33,7 +33,7 @@ A settlement method ensuring all parts of a trade complete together or not at al
## B
### Backend
The execution engine handling order matching. LX DEX supports multiple backends: Pure Go, C++, GPU/MLX, and FPGA.
The execution engine handling order matching. LX supports multiple backends: Pure Go, C++, GPU/MLX, and FPGA.
### Base Asset
The first asset in a trading pair. In BTC-USDT, BTC is the base asset. Also called the base currency.
@@ -45,19 +45,19 @@ The highest bid price and lowest ask price currently available in the order book
An order to buy an asset at a specified price. The highest bid price is the best bid. See also: [Ask](#ask).
### Block
A unit of data containing transactions that has been validated and added to the blockchain. LX DEX achieves 1ms block finality.
A unit of data containing transactions that has been validated and added to the blockchain. LX achieves 1ms block finality.
### Block Height
The sequential number of a block in the chain, starting from 0 (genesis block).
### BLS Signature
Boneh-Lynn-Shacham signature scheme enabling efficient signature aggregation. Used for validator consensus in LX DEX.
Boneh-Lynn-Shacham signature scheme enabling efficient signature aggregation. Used for validator consensus in LX.
### B-Tree
A self-balancing tree data structure used for price level storage. Provides O(log n) insert, delete, and search operations.
### Byzantine Fault Tolerance (BFT)
The ability of a distributed system to reach consensus despite malicious actors. LX DEX uses K=3 validators for BFT.
The ability of a distributed system to reach consensus despite malicious actors. LX uses K=3 validators for BFT.
## C
@@ -68,27 +68,27 @@ To remove a pending order from the order book before execution.
A unique identifier for a blockchain network. Used to prevent transaction replay across networks. See [Networks](/docs/reference/networks).
### Circular Buffer
A fixed-size data structure that overwrites oldest data when full. Used for zero-copy trade recording in LX DEX.
A fixed-size data structure that overwrites oldest data when full. Used for zero-copy trade recording in LX.
### Clearing
The process of validating and recording trades after execution. Precedes settlement.
### Clearinghouse
The entity or system responsible for trade clearing. In LX DEX, an automated smart contract system.
The entity or system responsible for trade clearing. In LX, an automated smart contract system.
### Client Order ID
A unique identifier assigned by the client to track orders. Must be unique per user session.
### Consensus
The process by which distributed nodes agree on the state of the ledger. LX DEX uses DAG-based consensus with FPC.
The process by which distributed nodes agree on the state of the ledger. LX uses DAG-based consensus with FPC.
### Cross-Chain
Operations spanning multiple blockchain networks. LX DEX supports cross-chain asset transfers via bridges.
Operations spanning multiple blockchain networks. LX supports cross-chain asset transfers via bridges.
## D
### DAG (Directed Acyclic Graph)
A data structure where blocks can have multiple parents, enabling parallel processing. Core to LX DEX consensus.
A data structure where blocks can have multiple parents, enabling parallel processing. Core to LX consensus.
### Day Order
An order that expires at the end of the trading session if not filled. See [Time in Force](#time-in-force-tif).
@@ -100,7 +100,7 @@ The number of price levels shown in an order book snapshot. Maximum depth is typ
A property ensuring identical inputs always produce identical outputs. Critical for blockchain state consistency.
### Dilithium
A post-quantum cryptographic signature algorithm based on lattice problems. Part of LX DEX quantum-resistant security.
A post-quantum cryptographic signature algorithm based on lattice problems. Part of LX quantum-resistant security.
## E
@@ -128,7 +128,7 @@ A trade that satisfies part or all of an order. Multiple fills may complete one
An order type requiring immediate complete execution or cancellation. No partial fills allowed.
### Finality
The point at which a transaction is irreversible. LX DEX achieves 1ms finality for trades.
The point at which a transaction is irreversible. LX achieves 1ms finality for trades.
### FIX Protocol
Financial Information eXchange protocol. An industry-standard for electronic trading. Supported for institutional clients.
@@ -137,12 +137,12 @@ Financial Information eXchange protocol. An industry-standard for electronic tra
Field-Programmable Gate Array. Hardware accelerator achieving 100M+ orders/sec throughput.
### Front-Running
The practice of placing orders ahead of known pending orders. LX DEX implements MEV protection.
The practice of placing orders ahead of known pending orders. LX implements MEV protection.
## G
### Gas
The fee unit for computational work on EVM-compatible chains. Not directly applicable to LX DEX native chain.
The fee unit for computational work on EVM-compatible chains. Not directly applicable to LX native chain.
### Gateway
The entry point for client connections. Handles authentication, rate limiting, and request routing.
@@ -154,7 +154,7 @@ The first block in a blockchain (height 0). Contains initial state and configura
An order that remains active until filled or explicitly cancelled. Default time-in-force.
### gRPC
Google Remote Procedure Call. High-performance binary protocol used for LX DEX API access.
Google Remote Procedure Call. High-performance binary protocol used for LX API access.
## H
@@ -187,7 +187,7 @@ A reserve fund covering losses from liquidations that exceed collateral.
## J
### JSON-RPC
A stateless, lightweight remote procedure call protocol using JSON. Primary API protocol for LX DEX.
A stateless, lightweight remote procedure call protocol using JSON. Primary API protocol for LX.
### JWT
JSON Web Token. Used for session authentication after initial API key verification.
@@ -203,7 +203,7 @@ A post-quantum key encapsulation mechanism. Used for secure key exchange in QZMQ
## L
### Latency
The time delay between request and response. LX DEX targets sub-microsecond matching latency.
The time delay between request and response. LX targets sub-microsecond matching latency.
### Leverage
Trading with borrowed funds. Leverage amplifies both gains and losses.
@@ -247,7 +247,7 @@ An order to execute immediately at the best available price.
The core component that pairs buy and sell orders. Heart of the DEX.
### MEV
Miner/Maximal Extractable Value. Profit from reordering transactions. LX DEX implements protection.
Miner/Maximal Extractable Value. Profit from reordering transactions. LX implements protection.
### Mempool
The pool of pending transactions awaiting inclusion in a block.
@@ -272,10 +272,10 @@ Non-Uniform Memory Access. Memory architecture consideration for high-performanc
A cache of pre-allocated objects for reuse. Reduces garbage collection overhead.
### Off-Chain
Operations occurring outside the main blockchain. Order matching in LX DEX is off-chain.
Operations occurring outside the main blockchain. Order matching in LX is off-chain.
### On-Chain
Operations recorded directly on the blockchain. Final settlement in LX DEX is on-chain.
Operations recorded directly on the blockchain. Final settlement in LX is on-chain.
### Open Interest
The total number of outstanding derivative contracts.
@@ -307,7 +307,7 @@ The net holding in an asset. Can be long (positive) or short (negative).
A flag ensuring an order only adds liquidity. Rejected if it would immediately match.
### Post-Quantum
Cryptographic algorithms resistant to quantum computer attacks. LX DEX supports Dilithium and Kyber.
Cryptographic algorithms resistant to quantum computer attacks. LX supports Dilithium and Kyber.
### Price Level
All orders at a specific price point. Organized as FIFO queue.
@@ -353,7 +353,7 @@ The unfilled portion of a partially filled order.
Attempt to reuse a valid transaction on a different network. Prevented by chain ID.
### REST API
Representational State Transfer API. HTTP-based interface for LX DEX.
Representational State Transfer API. HTTP-based interface for LX.
### Risk Engine
The component performing pre-trade and post-trade risk checks.
@@ -408,7 +408,7 @@ A trader who removes liquidity by matching existing orders.
The fee charged to the taker side of a trade. Usually higher than maker fee.
### Throughput
The number of operations processed per unit time. LX DEX achieves 434M+ orders/sec.
The number of operations processed per unit time. LX achieves 434M+ orders/sec.
### Tick Size
The minimum price increment for orders. Varies by trading pair.
+3 -3
View File
@@ -1,11 +1,11 @@
---
title: Reference Documentation
description: Complete reference material for LX DEX - glossary, error codes, limits, precision, and specifications
description: Complete reference material for LX - glossary, error codes, limits, precision, and specifications
---
# Reference Documentation
Complete reference material for developers integrating with LX DEX.
Complete reference material for developers integrating with LX.
## Quick Links
@@ -23,7 +23,7 @@ Complete reference material for developers integrating with LX DEX.
## Overview
This reference section provides comprehensive technical documentation for all aspects of LX DEX integration. Each page contains detailed specifications, examples, and cross-references to related documentation.
This reference section provides comprehensive technical documentation for all aspects of LX integration. Each page contains detailed specifications, examples, and cross-references to related documentation.
### For API Integration
+2 -2
View File
@@ -7,12 +7,12 @@ description: Comprehensive risk management system for professional trading - pre
> **Specification**: [LP-9004: DEX Risk Management](https://github.com/luxfi/LPs/blob/main/LPs/lp-9004-dex-risk-management.md)
LX DEX implements institutional-grade risk management with real-time monitoring, automated safeguards, and comprehensive exposure controls.
LX implements institutional-grade risk management with real-time monitoring, automated safeguards, and comprehensive exposure controls.
## Risk Management Architecture
```
LX DEX RISK MANAGEMENT ARCHITECTURE
LX RISK MANAGEMENT ARCHITECTURE
┌─────────────────────────────────────────────────────────────────────────────┐
│ ORDER FLOW │
+1 -1
View File
@@ -5,7 +5,7 @@ description: Connection management, configuration, and lifecycle for the C SDK
# Client
The `lxdex_client` structure manages WebSocket connections to LX DEX, handling authentication, reconnection, and request/response correlation.
The `lxdex_client` structure manages WebSocket connections to LX, handling authentication, reconnection, and request/response correlation.
## Client Lifecycle

Some files were not shown because too many files have changed in this diff Show More