Lux Proposals
← All proposals
LP-0078Finalevmprecompilecryptocurveszk

LP-078: EVM Precompile Registry

Abstract

Complete registry of all custom EVM precompile addresses for the Lux Network and all ecosystem chains. Standard Ethereum precompiles (0x01-0x0A) are preserved. All 37 precompile packages are enabled on every EVM by default. Genesis determines activation timestamps.

Three packages were removed for exposing secret key material in public calldata:

aes (0x9210), chacha20 (0x9211), ecies (0x9201). See individual LP deprecation notes.

Precompile Packages

Ethereum Standard (preserved, not custom)

| Address | Name | EIP |
|---------|------|-----|
| 0x01 | ecrecover | secp256k1 ECDSA recovery |
| 0x02 | SHA-256 | SHA-256 hash |
| 0x03 | RIPEMD-160 | RIPEMD-160 hash |
| 0x04 | identity | Data copy |
| 0x05 | modexp | Modular exponentiation |
| 0x06 | ecAdd | BN254 point addition |
| 0x07 | ecMul | BN254 scalar multiplication |
| 0x08 | ecPairing | BN254 pairing check |
| 0x09 | blake2f | BLAKE2b compression |
| 0x0A | pointEvaluation | EIP-4844 point evaluation |

Curves (5 packages)

| Address | Package | Description | LP |
|---------|---------|-------------|-----|
| 0x0100 | secp256r1 | P-256/NIST curve verify (EIP-7212, WebAuthn/Passkeys) | -- |
| 0x0A00..01 | sr25519 | Schnorrkel/Ristretto SR25519 verify (Substrate) | 011 |
| 0x3211..00 | ed25519 | Edwards Ed25519 verify (Solana, TON, SSH) | 011 |
| 0x9204 | curve25519 | Raw Curve25519 point ops (add, mul, MSM) | -- |
| 0x0500..07 | babyjubjub | Baby Jubjub twisted Edwards (zkEVM circuits) | -- |

Post-Quantum Cryptography (5 packages)

| Address | Package | Description | LP |
|---------|---------|-------------|-----|
| 0x0200..06 | mldsa | ML-DSA verify — FIPS 204 (ML-DSA) | 070 |
| 0x0200..07 | mlkem | ML-KEM encap/decap — FIPS 203 (ML-KEM) | 072 |
| 0x0600..01 | slhdsa | SLH-DSA verify — FIPS 205 (SLH-DSA (FIPS 205, formerly SPHINCS+)) | 071 |
| 0x0200..0B | corona | Pulsar lattice threshold signatures | 073 |
| 0x2221 | xwing | X-Wing hybrid KEM (X25519 + ML-KEM-768) | -- |

Hashing (3 packages)

| Address | Package | Description | LP |
|---------|---------|-------------|-----|
| 0x0500..04 | blake3 | BLAKE3 hash (256-bit) | 011 |
| 0x0500..05 | poseidon | Poseidon2 ZK-friendly hash (width 2-16) | 069 |
| 0x0500..06 | pedersen | Pedersen commitment over BN254 | -- |

Threshold Signatures (2 packages)

| Address | Package | Description | LP |
|---------|---------|-------------|-----|
| 0x0800..02 | frost | FROST EdDSA threshold verify | 019 |
| 0x0800..03 | cggmp21 | CGGMP21 ECDSA threshold verify | 019 |

Key Exchange (1 package)

| Address | Package | Description | LP |
|---------|---------|-------------|-----|
| 0x9203 | x25519 | X25519 Diffie-Hellman key exchange | -- |

Symmetric Encryption (REMOVED)

AES-256-GCM (0x9210) and ChaCha20-Poly1305 (0x9211) precompiles have been removed.

Both accepted secret encryption keys in calldata, which is public on-chain.

Use the FHE precompile (0x0700) for encrypted computation.

Verifiable Random Function (1 package)

| Address | Package | Description | LP |
|---------|---------|-------------|-----|
| 0x3213 | vrf | ECVRF-EDWARDS25519-SHA512-ELL2 verify + proof-to-hash (RFC 9381) | 131 |

Asymmetric Encryption / Privacy (2 packages)

| Address | Package | Description | LP |
|---------|---------|-------------|-----|
| 0x9200 | hpke | HPKE seal only (RFC 9180, public-key encrypt) | -- |
| 0x9202 | ring | Ring signature verify only (LSAG) | -- |

ECIES (0x9201) has been removed: decrypt required secret keys in calldata,

and encrypt used non-deterministic randomness (consensus split risk).

HPKE seal covers the same public-key encryption use case.

AI (3 packages)

| Address | Package | Description | LP |
|---------|---------|-------------|-----|
| 0x0300 | ai | AI mining / on-chain inference | 009 |
| 0x0300..01 | attestation | TEE attestation (NVTrust GPU, SGX, SEV-SNP, TDX) | -- |
| 0x0300..10 | compute | AI compute marketplace (register, submit, claim, verify) | -- |

Consensus — Quasar (1 package, 5 addresses)

| Address | Package | Description | LP |
|---------|---------|-------------|-----|
| 0x0300..20 | quasar | Verkle tree verify | -- |
| 0x0300..21 | quasar | BLS12-381 signature verify | -- |
| 0x0300..22 | quasar | BLS12-381 aggregate | -- |
| 0x0300..23 | quasar | Pulsar consensus verify | -- |
| 0x0300..24 | quasar | Hybrid PQ verify | -- |

BLS12-381 (1 package, 7+ addresses — EIP-2537)

| Address | Package | Description | LP |
|---------|---------|-------------|-----|
| 0x000B | bls12381 | G1 point addition | -- |
| 0x000C | bls12381 | G1 scalar multiplication | -- |
| 0x000D | bls12381 | G1 multi-scalar multiplication | -- |
| + G2Add, G2Mul, G2MSM, Pairing, MapToG1, MapToG2 | | | |

Bridge (1 package, 4 addresses)

| Address | Package | Description | LP |
|---------|---------|-------------|-----|
| 0x0440 | bridge | Bridge gateway | 017 |
| 0x0441 | bridge | Cross-chain routing | 017 |
| 0x0442 | bridge | Message verification | 017 |
| 0x0443 | bridge | Bridge liquidity pools | 017 |

FHE (1 package)

| Address | Package | Description | LP |
|---------|---------|-------------|-----|
| 0x0700 | fhe | TFHE operations (30+ ops: encrypt, add, mul, compare, ...) | 066 |

ZK Proofs (1 package, 5+ verifiers)

| Address | Package | Description | LP |
|---------|---------|-------------|-----|
| 0x0900 | zk | Generic ZK verify | 037 |
| 0x0901 | zk | Groth16 verifier | 037 |
| 0x0902 | zk | PLONK verifier | 037 |
| 0x0903 | zk | fflonk verifier | 037 |
| 0x0904 | zk | Halo2 verifier | 037 |

Pasta Curves (1 package)

| Address | Package | Description | LP |
|---------|---------|-------------|-----|
| 0x0500..08 | pasta | Pallas + Vesta curve ops (Halo2/Nova) | -- |

StableSwap AMM (1 package)

| Address | Package | Description | LP |
|---------|---------|-------------|-----|
| 0x0400..60 | stableswap | Curve StableSwap invariant (GetDy, AddLiquidity, RemoveLiquidity, GetD) | -- |

DEX — LX Suite (1 package, 14 addresses)

0x9999 is the canonical EVM-side money path for the DEX (receipt-settlement

PoolManager, LP-9999); the

D-Chain (dexvm, LP-032) matches and BLS-signs a DFillReceipt, and 0x9999

verifies that certificate inline and settles under Block-STM. 0x9010 is

DEPRECATED — retired to a single namespace-shared path (alias/disabled), see

LP-9999 §10.

| Address | Package | Description | LP |
|---------|---------|-------------|-----|
| 0x9999 | dex | DEX V4 receipt-settlement PoolManager (canonical) | 9999 |
| 0x9010 | dex | LXPool — v4 PoolManager — DEPRECATED → 0x9999 (see LP-9999 §10) | 9999 |
| 0x9011 | dex | LXOracle — price aggregation | 032 |
| 0x9012 | dex | LXRouter — swap router | 032 |
| 0x9013 | dex | LXHooks — hook registry | 032 |
| 0x9014 | dex | LXFlash — flash accounting | 032 |
| 0x9020 | dex | LXBook — CLOB orderbook | 032 |
| 0x9030 | dex | LXVault — custody + margin | 032 |
| 0x9040 | dex | LXPrice — derived pricing | 032 |
| 0x9050 | dex | LXLend — lending pool | 032 |
| 0x9060 | dex | LXRepayer — self-repaying loans | 032 |
| 0x9070 | dex | LXLiquidator — liquidation engine | 032 |
| 0x9080 | dex | LXTransmuter — debt→collateral | 032 |
| 0x6010 | dex | Teleport — cross-chain | 016 |

Graph (1 package, 4 addresses)

| Address | Package | Description | LP |
|---------|---------|-------------|-----|
| 0x0500..10 | graph | On-chain GraphQL query | -- |
| 0x0500..11 | graph | GraphQL subscribe | -- |
| 0x0500..12 | graph | GraphQL cache | -- |
| 0x0500..13 | graph | GraphQL index | -- |

Blob (1 package)

| Address | Package | Description | LP |
|---------|---------|-------------|-----|
| 0xB002 | kzg4844 | EIP-4844 KZG blob commitments | -- |

Attestation (see AI section above)

Attestation is registered at 0x0300..01 as part of the AI range. See the AI section for the full entry.

Selector dispatch routes to 5 operations: VerifyNVTrust, VerifyTPM, VerifyCompute, CreateAttestation, GetDeviceStatus.

Registry (1 package)

| Address | Package | Description | LP |
|---------|---------|-------------|-----|
| 0x000B-0x000D | registry | Precompile discovery + BLS12-381 curve ops | -- |

Deprecated Umbrellas (3 packages — do NOT import)

| Package | Wraps | Status |
|---------|-------|--------|
| pqcrypto | mldsa + mlkem + slhdsa | Redundant — use explicit imports. Has own module registration (will be removed). |
| quantum | mldsa + mlkem + slhdsa + corona | Library only, no init — dead blank import |
| threshold | cggmp21 + frost + corona | Library only, no init — dead blank import |

Address Range Summary

| Range | Purpose |
|-------|---------|
| 0x01-0x0A | Ethereum standard |
| 0x000B-0x000D | BLS12-381 (EIP-2537) |
| 0x0100 | secp256r1 (EIP-7212) |
| 0x0200-0x022F | Post-quantum + X-Wing |
| 0x0300 | AI mining |
| 0x0300..01 | AI attestation (TEE) |
| 0x0300..10 | AI compute marketplace |
| 0x0300..20-24 | Quasar consensus helpers |
| 0x0400..50-60 | StableSwap AMM |
| 0x0440-0x0443 | Bridge |
| 0x0500..01-09 | Hashing (blake3, poseidon, pedersen, babyjubjub, pasta) |
| 0x0500..10-13 | Graph (query, subscribe, cache, index) |
| 0x0600-0x060F | SLH-DSA + PQ |
| 0x0700 | FHE |
| 0x0800-0x080F | Threshold signatures |
| 0x0900-0x090F | ZK proofs |
| 0x0A00-0x0A0F | Substrate curves |
| 0x3211 | Ed25519 |
| 0x3213 | VRF (ECVRF, RFC 9381) |
| 0x6010 | Teleport |
| 0x9010-0x9080 | DEX (LX Suite) |
| 0x9200-0x9204 | Privacy (HPKE seal, ring verify, x25519, curve25519) |
| 0xB002 | KZG/blob |

Activation

All precompiles are compiled into the EVM binary. Activation is controlled per-chain via genesis blockTimestamp or blockNumber in the chain upgrade config. A precompile with blockTimestamp: 0 is active from genesis.

Implementation

Source: github.com/luxfi/precompile

37 packages (each with contract.go + module.go). 3 removed for key exposure: aes, chacha20, ecies.