Source Code
Complete source code reference for all Lux Network repositories
Source Code Reference
All Lux Network software is open source, developed in the open on GitHub. This section provides comprehensive documentation of every repository in the ecosystem.
Repository Overview
| Repository | Language | Description | Lines of Code |
|---|---|---|---|
| luxfi/node | Go | Core blockchain node, all VMs | 500K+ |
| luxfi/dex | Go | DEX matching engine | 50K+ |
| luxfi/consensus | Go | Consensus engines (Chain, DAG, PQ) | 80K+ |
| luxfi/bridge | TypeScript | Bridge application and UI | 40K+ |
| luxfi/threshold | Go | Threshold cryptography, MPC | 60K+ |
| luxfi/crypto | Go | Cryptographic primitives | 45K+ |
| luxfi/standard | Solidity | Smart contract standards | 30K+ |
| luxfi/sdk | Go | Multi-language SDKs | 25K+ |
| luxfi/warp | Go | Cross-chain messaging | 15K+ |
Organization Structure
github.com/luxfi/
├── node/ # Core blockchain node
│ ├── vms/ # Virtual machines (Platform, Exchange, Bridge, etc.)
│ ├── chains/ # Chain management
│ ├── network/ # P2P networking
│ └── database/ # Storage layer
├── consensus/ # Consensus engines
│ ├── core/ # Core consensus logic
│ ├── engine/ # Engine implementations
│ └── ai/ # AI-enhanced consensus
├── dex/ # DEX implementation
│ ├── pkg/lx/ # Matching engine
│ ├── cmd/ # CLI tools
│ └── pkg/api/ # API server
├── bridge/ # Bridge application
│ ├── app/ # React frontend
│ └── contracts/ # Bridge contracts
├── threshold/ # MPC cryptography
│ ├── protocols/ # LSS, CMP, Ringtail
│ └── pkg/ # Core libraries
├── crypto/ # Crypto primitives
│ ├── bls/ # BLS signatures
│ ├── ringtail/ # Post-quantum
│ └── secp256k1/ # ECDSA
├── standard/ # Smart contracts
│ ├── contracts/ # Solidity source
│ └── deploy/ # Deployment scripts
├── sdk/ # Client SDKs
│ └── various/ # Go, TS, Python, Rust
└── warp/ # Cross-chain messaging
├── message.go # Message types
└── precompile/ # EVM precompilesQuick Links
Core Infrastructure
- Node Repository - Complete node implementation
- Consensus Repository - Consensus engines
- Crypto Repository - Cryptographic primitives
Applications
- DEX Repository - Matching engine and trading
- Bridge Repository - Cross-chain bridge
Libraries
- Threshold Repository - MPC protocols
- SDK Repository - Client libraries
- Standard Contracts - Smart contracts
Build Requirements
Go Projects
# Required: Go 1.23+
go version # Should show go1.23.x or higher
# Build any Go project
cd <repo>
go build ./...
go test ./...TypeScript Projects
# Required: Node 20+, pnpm
node --version # Should show v20.x or higher
pnpm --version # Should show 8.x or higher
# Build
pnpm install
pnpm buildSolidity Projects
# Required: Foundry
curl -L https://foundry.paradigm.xyz | bash
foundryup
# Build
forge build
forge testTest Coverage
All repositories maintain high test coverage:
| Repository | Coverage | CI Status |
|---|---|---|
| node | 89.8% | Passing |
| consensus | 92.1% | Passing |
| dex | 100% | Passing |
| threshold | 94.3% | Passing |
| crypto | 96.7% | Passing |
License
All Lux Network repositories are licensed under permissive open source licenses:
- Core Infrastructure: Business Source License 1.1 (BSL)
- Libraries and SDKs: MIT License
- Smart Contracts: MIT License
See individual repository LICENSE files for details.
Contributing
We welcome contributions to all repositories. See Contributing Guide for:
- Code style guidelines
- Pull request process
- Code review requirements
- Testing standards
Security
Security issues should be reported privately:
- Email: [email protected]
- Bug Bounty: Active program with rewards up to $100,000
- Audit Reports: Available in each repository's
audits/directory
Support
- GitHub Issues: File bugs and feature requests
- Discord: Real-time developer chat
- Documentation: https://docs.lux.network