LP-167: Agent Payment Standard (Draft)#655
Open
abhicris wants to merge 621 commits intoluxfi:mainfrom
Open
Conversation
Reorganize LP numbering to follow dependency order. This is a breaking change - all old URLs will 404. ## New Taxonomy (Dependency Order) | Range | Category | |-------|----------| | 0xxx | Meta/Process/Consensus/Network | | 1xxx | P-Chain + Foundations | | 2xxx | Q-Chain (Post-Quantum) | | 3xxx | C-Chain (EVM/LRC) | | 4xxx | Z-Chain (ZK/Privacy) | | 5xxx | T-Chain (Threshold) | | 6xxx | B-Chain (Bridges) | | 7xxx | A-Chain (AI) | | 8xxx | Governance (DAO/ESG/Ops) | | 9xxx | DEX/Markets | | 10xxx | Learning/Research | ## Migrations Executed - 2xxx DAO/ESG → 8xxx Governance (27 files) - 4xxx Q-Chain → 2xxx (18 files) - 8xxx Z-Chain → 4xxx (13 files) - 7xxx T-Chain → 5xxx (20 files) - 5xxx A-Chain → 7xxx (11 files) Total: 89 files renumbered ## Why This Order Lower numbers are foundations that higher numbers build upon: Foundations → PQ → EVM → Privacy → Threshold → Bridges → AI → Governance → Markets This creates a natural learning path and enforces architectural discipline. See LP-0099 for full documentation.
Updates internal links that still referenced old LP numbers: - 8xxx (old Z-Chain) → 4xxx (new Z-Chain): 16 refs - 7xxx (old T-Chain) → 5xxx (new T-Chain): 18 refs - 4xxx (old Q-Chain) → 2xxx (new Q-Chain): 16 refs Files fixed: - lp-3520-precompile-suite-overview.md - lp-4045-z-chain-encrypted-execution-layer-interface.md - lp-3674-blob-throughput-increase.md - lp-10005-learning-path-security.md - lp-10007-learning-path-privacy.md - lp-10006-learning-path-mpc.md - lp-3310-safe-multisig-standard.md - lp-2105-lamport-one-time-signatures-ots-for-lux-safe.md - lp-5324-ringtail-threshold-signature-precompile.md - lp-2200-post-quantum-cryptography-suite-for-lux-network.md - lp-9005-native-oracle-protocol.md - lp-3657-vrf-precompile.md - lp-3654-ed25519-eddsa-precompile.md
- Add missing Motivation section to LP-0099 - Fix 4 broken external links: - lp-3668: Update zcash jubjub link to zkcrypto/jubjub - lp-2105, lp-2201, lp-5324: Mark planned implementation links - Remove stale root-level lp-0300.md duplicate - Update Playwright tests to match current UI: - Use /docs/ with trailing slash (308 redirect fix) - Update selectors for new page structure - Add serial mode for docs tests (SSR performance) - Increase timeouts for heavy SSR pages - Regenerate lp-index.json All 21 Playwright tests now pass.
- lp-2201, lp-5324: Fix Quasar links to consensus repo (github.com/luxfi/consensus/protocol/quasar/) - lp-2105: Fix Lamport links to crypto repo (github.com/luxfi/crypto/lamport/) Both implementations exist and are not "Planned".
- LP-0110 (Quasar Consensus): Review → Final - LP-2105 (Lamport OTS): Review → Final - LP-2106 (Threshold Lamport): Draft → Review Quasar and Lamport OTS are fully implemented. Threshold Lamport is implemented but needs review.
PQC Libraries (→ Final): - LP-2316: ML-DSA Post-Quantum Digital Signatures - LP-2317: SLH-DSA Stateless Hash-Based Digital Signatures - LP-2318: ML-KEM Post-Quantum Key Encapsulation Precompiles (→ Implemented): - LP-3500: ML-DSA Signature Precompile - LP-3501: SLH-DSA Signature Precompile - LP-3651: secp256r1 Curve Integration - LP-3665: KZG4844 Blob Commitments Precompile - LP-5104: FROST Threshold Signatures - LP-5321: FROST Threshold Signature Precompile - LP-7200: AI Mining Standard FHE (Draft → Review): - LP-0200: fhEVM Architecture - LP-0203: Threshold FHE Integration All implementations verified in ~/work/lux/crypto/ and ~/work/lux/precompiles/
Updated LP-2105 to point to github.com/luxfi/lamport instead of the incorrect crypto/lamport subdirectory path.
Comprehensive documentation for the T-Chain threshold FHE module: - Architecture diagrams and component overview - Complete RPC API specification (tfhe_* namespace) - Security hardening measures (11 items from CTO audit) - Integration patterns (Solidity, Go, TypeScript) - Error codes and configuration reference - Test coverage summary (289 tests, 84.9%) Covers: lifecycle management, DKG ceremonies, registry, warp payloads, and cross-chain decryption flow.
…itecture for node keys, genesis binding, PQ readiness
…onsensus + staking (performance)
…threshold MPC - LPS-016: OmnichainRouter (sovereign governance, MPC group key, 270 chains) - LPS-017: 18 native bridge programs (Solana, TON, Sui, Aptos, Cosmos, etc.) - LPS-018: Yield-bearing bridge tokens (ERC-4626, ShariaFilter, 29 strategies) - LPS-019: Threshold MPC (FROST, CGGMP21, LSS dynamic resharing)
…threshold MPC - LPS-016: OmnichainRouter — sovereign governance, MPC group key (2022) - LPS-017: 18 native bridge programs — Solana, TON, Sui, Aptos, etc. (2023) - LPS-018: Yield-bearing bridge tokens — ERC-4626, ShariaFilter (2024) - LPS-019: Threshold MPC — FROST, CGGMP21, LSS resharing (2021)
…removed in cleanup)
All PQ layers now marked as Deployed. Add Cloud HSM section, ML-DSA-65 JWT signing section, TLS PQ section, full scorecard table. HNDL attack vector closed.
…count signing Expand PQ scorecard from 11 to 13 layers. Add Quasar triple-hybrid consensus, Smart Account PQ signing (SafeMLDSASigner, SafeRingtailSigner, QuantumSafe), on-chain precompiles table, threshold signing protocols, sovereign L1 note, regulatory compliance mapping. Status: Final.
Add individual LP documents for every precompile that lacked one: - LP-110 BLS12-381 (EIP-2537), LP-111 Baby Jubjub, LP-112 Curve25519 - LP-113 Pasta (Pallas+Vesta), LP-114 X25519, LP-115 X-Wing hybrid KEM - LP-116 AES-256-GCM, LP-117 ChaCha20-Poly1305, LP-118 KZG (EIP-4844) - LP-119 Pedersen, LP-121 ECIES, LP-122 HPKE (RFC 9180) - LP-123 secp256r1 (EIP-7212), LP-124 Ed25519, LP-125 SR25519 - LP-126 BLAKE3, LP-127 TEE Attestation, LP-128 GraphQL Query - LP-129 Precompile Registry, LP-130 AI Mining LP-120 skipped — Poseidon2 already covered by LP-069. All addresses and gas costs sourced from luxfi/precompile contract.go.
Final semver tags pushed after LP-137 Red Final fixes (N1-N5 + D2) plus build/CI fixes landed on each repo's main: luxfi/mpc v1.11.0 (minor: cc/attest + Require* + experimental_tfhe) luxfi/crypto v1.18.3 (patch: pedersen DST + IPA blinding + verkle) luxcpp/crypto v1.4.0 (minor: bn254 GPU pairing + KZG parity + Metal cmov) luxfi/threshold v1.6.5 (patch: xrpl nilfix + ringtail + tfhe UNSAFE) luxfi/aml v1.0.1 (patch: go.sum + canonical CI) luxfi/evm v0.18.0 (minor: precompile + fhe bumps + GPU + anchor) luxfi/chains v1.1.0 (minor: thresholdvm staged + 22 precompiles) luxfi/evmgpu v0.2.0 (minor: gpu v1.0.1 + MLX cgo + go.sum) Already-tagged: luxfi/gpu v1.0.1, luxfi/precompile v0.5.12, luxfi/fhe v1.8.0, luxfi/hsm v1.1.3. Note: luxfi/precompile@v0.5.12 and luxfi/fhe@v1.8.0 tag commits are not reachable from current origin/main (single-commit branches); consumers pinning the tags get the intended surface, downstream merge into main is a follow-up housekeeping item.
Canonical adoption of Tokeny ONCHAINID (ERC-734/735) and T-REX (ERC-3643) as the Lux securities-token standard. Lux maintains brand-neutral forks under luxfi/onchain-id and luxfi/erc-3643 tracking upstream semver with no core interface drift. Jurisdiction-specific behavior (US Reg D/S/A+/CF, EU MiCA, UK FCA, Luxembourg CSSF, IOM IOMFSA) is delivered via overlay IModularCompliance modules layered on unmodified T-REX core. Pinned upstream state at adoption: - onchain-id/solidity 2.2.2-beta3 0e681fbf - ERC-3643/ERC-3643 4.1.3 b6c5fabf Status: Active. Supersedes nothing — formalizes the upstream-tracking commitment already implicit in LP-001 and LP-088.
LP-020 is the canonical Quasar consensus number per LP-INDEX. Updates lp-0900 chronology references.
…r, ringtail
Adds §0 ship update reflecting today's work on luxcpp/crypto HEAD
f35c6b22:
- 30 algorithm dirs (consolidated; was 32 in earlier audit — gpukit
is the shared-kernel library, not an algorithm)
- 2 real C-ABI NOTIMPL stubs remaining: sr25519 sign/verify and
poseidon_goldilocks. cggmp21_aggregate / cggmp21_verify are
network-bound (live Go-side); secp256r1 is build-conditional.
- LP-161 multi-curve Pippenger MSM lands 22/22 KAT pass on first
commit; lifts to 29/29 once BLS12-381 G1 first-party body lands
(header-only adapter is in place under
GPUKIT_MP_HAS_BLS12_381_G1)
- FROST aggregate + verify wired (RFC 9591 §5.2 + BIP-340-style
Schnorr verify); 6/6 frost_presign_test pass on debeab78
- CGGMP21 Paillier 2048-bit shipped (was deferred behind LP-163):
keygen / encrypt / decrypt / pi_enc_prove / pi_enc_verify, all
Z_{N^2} arithmetic via LP-163 Karatsuba 4096-bit modexp; 4/4
cggmp21_presign_test pass on f35eedd2
- Ringtail Ring-LWE first-party body wired (691 LOC); CRYPTO_ALG_RINGTAIL
bit set in crypto_status() on f35c6b22
- Acceleration kernels LP-160..LP-166 — see luxcpp/crypto
CROSSOVER.md §"Acceleration kernels" for measured per-kernel
crossovers
Replaces "Projected speedup" tables with measured M1 Max numbers plus CI-runner notes (hanzo-build-linux-amd64, CRYPTO_HAS_CUDA=1, CRYPTO_HAS_DAWN=1). Per CROSSOVER.md as the empirical source of truth; CUDA + WGSL columns now point at BENCHMARKS.md as those legs land in CI.
Drop the 6-set plan. Reuse the 2 hanzo-build ARC scale sets across hanzoai/luxfi/luxcpp/luxgpu/zooai. Free-plan orgs (no Enterprise) mean cross-org runner groups aren't available, so one ARC listener per org with all listeners advertising the same 2 labels: - hanzo-build-linux-amd64 (live, hanzo-k8s DOKS SFO3) - hanzo-build-linux-arm64 (paused — DOKS no arm64 droplets yet) No <org>-build-* labels exist or will be created. Workflows already correct (luxcpp/crypto/.github/workflows/* use hanzo-build-*).
Rewrites the LP-073 stub into the production canonical specification. Pins every constant to its derivation in luxfi/ringtail (sign/, threshold/, primitives/, utils/) and luxfi/lattice/v7. Documents the 2-round MAC-authenticated protocol (Gen, SignRound1, SignRound2Preprocess, SignRound2, SignFinalize, Verify), the byte-exact Lattigo WriteTo wire format (little-endian uint64 row/col/coeffs for Poly/Vector/Matrix), the BLAKE3 transcript construction (Hash, LowNormHash, GaussianHash, PRF, GenerateMAC), the Ziggurat Discrete-Gaussian sampler over BLAKE2-XOF, the Hamming-weight-kappa ternary challenge sampler, and the cross-impl KAT contract gating C++/Metal/CUDA/WGSL ports. Adds the consensus role (LP-020 Quasar BLS+Ringtail+ML-DSA triple lane), security analysis (MLWE hardness, Drijvers et al. defense via pairwise MAC, FullRankCheck, L2-norm forgery bound, identifiable abort, side-channel posture, nonce reuse), and future work (IdentifyCheater, GPU Round-1 acceleration, DKG-without-dealer, KAT generator). LP-137-ACTUAL-STATE: cross-ref Ringtail full spec (LP-073 + papers/lp-073-ringtail.pdf) in the 2026-04-28 ship section.
Adds the first application-layer LP — a canonical agent-to-agent payment protocol that unifies HTTP/402 (x402) discovery, ZAP-framed binary offers (LP-022), on-chain escrow, streaming sessions (LP-047), and threshold-signed multi-party flows (LP-019). The data model — PaymentOffer / PaymentProof — is transport-portable: the same EIP-712 struct is encoded as JSON over HTTP, fixed-offset binary over ZAP, an on-chain digest in AgentEscrow, and a stream ref under LP-047 streaming. Compliance hooks plug into the LP-088 / ERC-3643 ComplianceRegistry so security-token-denominated agent work executes on the same protocol as USDC payments. Reference implementation: kcolbchain/switchboard (Python + Solidity, MIT) — x402 middleware shipped, AgentEscrow + payment client shipped, ZAP wire encoding in PR luxfi#21. Updates LP-INDEX: - adds LP-167 entry under Markets / Draft - adds LP-167+ numbering rule for application-layer standards - bumps Last updated to 2026-05-01
1ff21a8 to
289f5d7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds LP-167 — Agent Payment Standard as the first application-layer LP. It unifies four payment surfaces under one transport-portable data model so AI agents can quote, negotiate, and settle without rolling bespoke plumbing per integration:
0x70PaymentOffer,0x71PaymentProof), fixed-offset, zero-copy.AgentEscrowinterface with timeout / challenge / mutual-cancel.OfferReflinking back to the originating quote.EIP-712 typed signing across all four. Compliance plugs into LP-088 / ERC-3643 (
ComplianceRegistry.canTransfer) so security-token-denominated agent work runs on the same protocol as USDC. Multi-party (MPP) sessions use threshold signatures via LP-019 / LP-154 / LP-155.Why now
Three rails exist in the wild — x402 (HTTP-native, no escrow), Sablier-style streaming (no HTTP discovery), and raw on-chain transfer (no negotiation) — but none compose. LP-167 is the union built on Lux primitives we already have. From the LP body:
Reference implementation already shipping
kcolbchain/switchboard — Python + Solidity, MIT.
x402_middleware.py— server-side HTTP/402 middleware (FastAPI/Flask drop-in)AgentEscrow.sol+payment_protocol.py— escrow + Python client + CLIgas_budget+nonce_manager— client-side spend caps, reorg-safe nonceszap_transport.py— ZAP wire encoding in switchboard PR #21 (depends on luxfi/zap PRs #1-#3)web/— public side-by-side explorer for x402 / MPP / AP2 / Circle / on-chain escrowIndex update
Adds the LP-167 row to
LP-INDEX.mdunder Markets / Draft, plus a new numbering-rule line:This positions 167+ as the home for application-layer specs — agent payments today, AI-native protocols (model-attestation, inference-billing, dataset-licensing) likely follow.
Status
Submitted as Draft. Roadmap inside the LP:
Test plan
x402_middlewaretest suite)tests/fixtures/zap_wire/)About this PR
Authored by kcolbchain (@abhicris) in coordination with the Lux app/financialization layer thesis discussed with the core team. Happy to iterate on numbering, scope, or split into multiple LPs (e.g., separate the HTTP/402 envelope from the on-chain escrow) if the editors prefer that shape.