LPsLux Proposals
Precompiles
LP-1220

Precompile Address Scheme and Discovery

Final

The trailing-significant address scheme for Lux-native precompiles and the on-chain registry contracts use to discover which precompiles a chain exposes

Category
Core
Created
2026-04-13

Abstract

Two things: an address scheme that encodes the specifying LP number, chain slot, and function index into the trailing bytes of a 20-byte EVM address, and an on-chain registry contracts can query to determine which precompiles are available, at what addresses, with which supported operations.

The authoritative address table is LP-1210. This LP specifies how new addresses are derived and how a contract discovers them at runtime.

Specification

Address scheme

Lux-native precompiles use trailing-significant 20-byte addresses:

Format: 0x0000000000000000000000000000000000PCII

P  = Family page (4 bits, aligned with LP numbering)
C  = Chain slot (4 bits)
II = Item/function (8 bits, 256 items per family per chain)

Family pages (P nibble):

PLP RangeFamily
2LP-2xxxPQ identity (ML-DSA, ML-KEM, SLH-DSA, Pulsar, X-Wing)
3LP-3xxxEVM/crypto (Ed25519, AI, attestation, Quasar)
4LP-4xxxPrivacy / ZK
5LP-5xxxThreshold / MPC (FROST, CGGMP21)
6LP-6xxxBridges (teleport)
7LP-7xxxAI
9LP-9xxxDEX / markets

Chain slots (C nibble):

CChain
0P-Chain
1X-Chain
2C-Chain (main EVM)
3Q-Chain
4A-Chain
5B-Chain
6Z-Chain

Standard EVM addresses (0x01–0x11) are preserved and are not part of this scheme.

Special ranges

RangePurpose
0x01-0x0AEthereum standard precompiles
0x0B-0x11BLS12-381 (EIP-2537)
0x0100secp256r1 (EIP-7212)
0x0500-0x050FHashing (BLAKE3, Poseidon2, Pedersen, BabyJubJub, Pasta)
0x9010-0x9080DEX (LX Suite)
0x9200-0x9204Privacy (HPKE, ring, X25519, Curve25519)
0xB002Extended KZG

Discovery

The registry is read-only. A contract asks the registry which precompiles this chain exposes rather than probing addresses, so a contract compiled against a family page keeps working on a chain that activates a subset.

Security Considerations

  1. The registry is read-only. Precompile addresses are fixed at genesis (LP-1030).
  2. Calling a non-existent precompile address behaves as a normal contract call — no code, returns empty.
  3. The address scheme is deterministic: given an LP number and chain slot, the address can be computed without querying the registry.

References

  • LP-1210 — the authoritative as-built address table. Where a deployed address and this scheme disagree, the deployed address in LP-1210 is what the chain answers to.
  • Source: github.com/luxfi/precompile/registry/

Copyright and related rights waived via CC0.