AI Mining Precompile
The compute-to-earn precompile — miners submit work proofs attesting to GPU compute time, verified through TEE attestation and post-quantum signatures, with reward priced by compute minutes, privacy level, and hardware trust score, and a spent-set that stops double claims
Abstract
The AI mining precompile verifies compute-to-earn work on the Lux EVM. Miners submit work proofs attesting to GPU compute time; the precompile verifies them through TEE attestation and ML-DSA signatures, then calculates the reward from compute minutes, privacy level, and hardware trust score. Double claims are prevented by a spent-set keyed on a BLAKE3 work ID.
Specification
Address
0x0300 — the AI range. The authoritative as-built address table is
LP-1210.
Interface
0x01 VerifyMLDSA: paramSet(1) + pubkey + signature + message -> bool(32)
0x02 CalculateReward: work_proof -> reward(32)
0x03 VerifyTEE: tee_quote + nonce -> { verified(bool), trust_score(uint8) }
0x04 IsSpent: work_id(32) -> bool(32)
0x05 ComputeWorkId: work_proof -> work_id(32) (BLAKE3 hash)
0x06 MarkSpent: work_id(32) -> () (state write)
Work proof layout:
bytes 0-31: device_id (32 bytes)
bytes 32-63: nonce (32 bytes)
bytes 64-71: timestamp (uint64, big-endian)
bytes 72-73: privacy_level (uint16)
bytes 74-77: compute_minutes (uint32)
bytes 78+: tee_quote (optional, variable)
Privacy levels
| Level | Multiplier | Description |
|---|---|---|
| 1 (Public) | 0.25× | Open compute, no TEE |
| 2 (Private) | 0.50× | Software isolation |
| 3 (Confidential) | 1.00× | Hardware TEE (SGX / TDX) |
| 4 (Sovereign) | 1.50× | Full confidential compute plus local attestation |
Gas schedule
| Operation | Gas |
|---|---|
VerifyMLDSA | 3,000 |
CalculateReward | 1,000 |
VerifyTEE | 5,000 |
IsSpent | 100 |
ComputeWorkId | 50 |
MarkSpent | 5,000 |
GPU acceleration handles batch ML-DSA verification (NTT-based) and batch attestation verification where available.
Security Considerations
- Work proofs are bound to a specific
device_idand timestamp. Replay is prevented by the spent-set. - TEE attestation is platform-agnostic — NVIDIA NVTrust, Intel TDX, ARM CCA. Verification is local, with no cloud API in the path.
- ML-DSA signatures (FIPS 204) give post-quantum authentication of work proofs.
- Privacy-level multipliers incentivize higher security tiers. The Sovereign tier requires both hardware confidential compute and local-only attestation, with no cloud dependency.
MarkSpentis a state write and is callable only by authorized mining contracts.
References
- Source:
github.com/luxfi/precompile/ai/ - LP-5010 — the broader AI virtual machine.
- LP-5310 — TEE verification details.
- LP-5200 — the mining standard this precompile serves.
Copyright
Copyright and related rights waived via CC0.