Documentation
Complete documentation for the Lux Standard Library
Lux Standard Library
The canonical smart contract library for Lux Network. Production-ready implementations for tokens, DeFi, governance, and post-quantum security.
New to Lux? Start with the Getting Started guide to install the library and deploy your first contract.
Quick Links
Getting Started
Install, configure, and deploy your first contract
Examples
Complete working code examples
API Reference
Full contract reference documentation
Core Modules
Tokens
Native tokens, stablecoins, and token standards for the Lux ecosystem.
LUX
Native governance token with staking rewards
LUXD
Lux Dollar - algorithmic stablecoin
AI
AI token with hardware-attested GPU mining
LRC20
Base ERC20 with extensions (bridgeable, capped, wrapped)
DeFi
Self-repaying loans, perpetual trading, and yield protocols.
Synths
Overcollateralized synthetic assets (xUSD, xETH, xBTC)
Perpetuals
Up to 50x leveraged trading with LLP liquidity
Lending
Lending pools and money markets
Yield
Yield farming and liquidity mining
AMM
Decentralized exchange with concentrated liquidity.
Pools
Uniswap V2/V3 style liquidity pools
Router
Optimized swap routing across pools
WLUX
Wrapped LUX for DeFi compatibility
Smart Accounts
ERC-4337 account abstraction with advanced features.
Smart Account
Upgradeable smart contract wallets
Factory
Deploy accounts with CREATE2
Paymasters
Sponsor gas fees for users
Modules
Session keys, spending limits, recovery
Infrastructure
Governance
On-chain governance and DAO tooling.
DAO
Full-featured DAO with token voting
Voting
Snapshot and on-chain voting systems
vLUX
Vote-escrowed LUX tokenomics
Bridge
Cross-chain interoperability with Warp messaging.
Utilities
Helper contracts and common patterns.
Security
Multi-Signature
Secure asset management with threshold signatures.
Post-Quantum
Quantum-resistant cryptography for future-proof security.
Contract Index
| Category | Contracts | Description |
|---|---|---|
| Tokens | LUX, LUXD, AI, LRC20, LRC20B, LRC721B | Native tokens and standards |
| Synths | AlchemistV2, TransmuterV2, SynthToken | Self-repaying synthetic assets |
| Perps | Vault, Router, PositionRouter, LLP | Perpetual futures trading |
| AMM | AMMV2Factory, AMMV3Pool, SwapRouter | Decentralized exchange |
| Governance | Governor, Timelock, DAO, vLUX | On-chain governance |
| Bridge | Teleport, Bridge, Warp | Cross-chain transfers |
| Safe | Safe, SafeFactory, FROST | Multi-signature wallets |
| Accounts | EOA, EOAFactory, Paymaster | Account abstraction |
Resources
- GitHub Repository - Source code and issues
- Discord - Community support
- Twitter - Updates and announcements
- Lux Network - Main website
License
MIT License - Free to use in commercial and open source projects.