Lux Docs
Precompile

Lux Precompiles

39+ native EVM precompiles for post-quantum crypto, DeFi, ZK proofs, and more

Lux Precompiles (github.com/luxfi/precompile) extend the EVM with native operations that run at near-hardware speed. Over 39 precompiles are organized across post-quantum cryptography, DeFi, ZK proofs, privacy, and threshold signatures.

Address Map

RangeCategoryExamples
0x0300-0x03FFAI/MLAI Mining, NVTrust, Model Registry
0x0400-0x04FFDeFiPoolManager (Uniswap v4), SwapRouter, Lending, Perps
0x0500-0x05FFGraph/QueryGraphQL, Subscriptions, Cache
0x0600-0x06FFPost-QuantumML-DSA, ML-KEM, SLH-DSA, Quasar
0x0700-0x07FFPrivacyFHE, ECIES, Ring Signatures, HPKE
0x0800-0x08FFThresholdFROST, CGGMP21, Ringtail
0x0900-0x09FFZK ProofsKZG, Groth16, PLONK, Halo2
0x0A00-0x0AFFCurvessecp256r1 (P-256)

Performance (M1 Max)

OperationLatencyThroughput
DEX Swap2.26 us443K ops/sec
ModifyLiquidity2.87 us348K ops/sec
PoolKeyID439 ns2.7M ops/sec
HookPermission0.45 ns2.2B ops/sec

Chain Activation

ChainPrecompiles Enabled
C-ChainAll (full feature set)
Z-Chain (Zoo)Warp, PoolManager, SwapRouter, AIMining, GraphQL
D-Chain (DEX)Warp, full DEX suite, GraphQL
K-Chain (Keys)Warp, PQ Crypto, Privacy, Threshold, GraphQL
Q-Chain (Quantum)Warp, full PQ suite, Ringtail, GraphQL
B-Chain (Bridge)Warp, TeleportBridge, GraphQL

Installation

go get github.com/luxfi/precompile
# Run tests
go test -v ./...

# Run benchmarks
go test -bench=. -benchmem ./dex/...

On this page