LPsLux Proposals
Consensus Systems
LP-18

Protocol Invariants and Verification Toolchain

Final

The global invariant registry every Lux LP must preserve, the audit requirements each LP must satisfy, and the toolchain that machine-checks them

LP-0018: Protocol Invariants and Verification Toolchain

Abstract

An auditor reading Lux needs two things this LP provides and no other LP owns: the set of global invariants that hold across every chain and every release, and the toolchain that mechanically checks them. Each protocol component's behaviour is specified in its own LP; what lives here is the cross-cutting contract those LPs are jointly required to preserve.

Invariant registry

These hold network-wide. A change that breaks one is a protocol break, not a feature.

InvariantStatement
Total supply capLUX supply never exceeds 2,000,000,000,000 (2 trillion; genesis SupplyCap)
Fee conservationEvery fee is accounted for — burn + treasury + validator, summing to the fee paid
Bridge backingBridged tokens are always 1:1 backed on the origin chain
Consensus safetyNo two conflicting blocks are finalized
LivenessIf 67% of stake is honest, new blocks are produced
Quasar triple soundnessCompromise of any one of {BLS, Pulsar, ML-DSA→Groth16} does not forge a finalized certificate (proved in proofs/lean/Consensus/Quasar.lean)
Chain role uniquenessEach chain owns exactly one role; no role has two owning chains (see lp-0130)

The Quasar certificate

The triple-soundness invariant rests on the shape of the certificate itself. A QuasarCert is a 3-tuple binding three independent hardness assumptions, each contributed by a separate chain:

LayerSchemeHardnessSource chainIn cert
BLSBLS12-381 aggregateco-CDH (classical)network-wide48 B
PulsarModule-LWE thresholdModule-LWE + MSIS (PQ)Q-Chain~3.3 KB
MLDSAProofML-DSA-65 → Groth16 over BLS12-381Module-LWE + MSIS, then Groth16 SNARKZ-Chain192 B

PQ modes (config/pq_mode.go): BLSOnly, BLSPlusMLDSA, BLSPlusCorona, BLSPlusGroth16, DoubleLatticePlusClassical. Triple mode runs all three layers in parallel via TripleSignRound1.

Each layer is independently toggleable; the production mode runs all three. Breaking finality therefore requires breaking a classical assumption and two independent lattice assumptions.

The certificate type is defined in lp-0110 and implemented in protocol/quasar/types.go.

Audit requirements

Every LP that specifies protocol behaviour must provide:

  1. Formal specification of all state transitions.
  2. The invariants that must hold across all states.
  3. Security assumptions and threat model.
  4. Test vectors for implementation verification.
  5. Reference implementation location.

An LP missing any of the five is not auditable and is not Final.

Verification toolchain

ToolPurpose
Lean 4Consensus / crypto / BFT machine-checked proofs (proofs/lean/)
TLA+Consensus protocol model checking (proofs/tla/)
TamarinProtocol verification (proofs/tamarin/)
HalmosSymbolic execution for Solidity (proofs/halmos/)
CertoraSmart contract formal verification
EchidnaProperty-based fuzzing for Solidity
FoundryUnit and integration testing

Coverage and theorem counts are in lp-0017.

Security Considerations

  1. The invariant registry is a living document. Each LP update that touches a cross-cutting property revises it here, not locally.
  2. Auditors receive the specification plus full source access. No security through obscurity.
  3. Formal verification covers critical paths (consensus, bridge, token transfers). Non-critical paths use property-based fuzzing.
  4. Audit reports are published publicly after remediation.

References

  • lp-0001 — supply and fee policy
  • lp-0017 — proofs and coverage
  • lp-0110 — Quasar consensus and certificate types
  • lp-0130 — canonical chain roster and role assignment
  • lp-4450 — Pulsar threshold ML-DSA (Q-Chain lane)
  • lp-8000 — Z-Chain ZKVM (Groth16 lane)
  • lp-7050 — where the retired T-Chain's duties went

Copyright (C) Lux Industries Inc. Licensed under the MIT License.