Appchain Cloud Substrate
Permissionless decentralized cloud where every customer runs in its own Quasar-native appchain — GPU compute, storage, AI inference, DEX engines, and FHE priced per appchain via on-chain markets
LP-5624: Appchain Cloud Substrate
Abstract
Lux Cloud is the decentralized cloud substrate of the Lux Network. Every customer runs inside their own Quasar-native appchain, or shares one with similar-tenancy customers, executed by the QuasarGPU adapter and finalized by the Quasar certificate pipeline. Anyone can run a node by staking on P-Chain. Anyone can deploy an appchain. Resource consumption — GPU compute, storage, bandwidth, FHE bootstraps, AI inference tokens — is priced per appchain via on-chain markets and paid in native LUX or appchain-native tokens.
The unifying observation: every cloud workload is a Quasar appchain preset. There is no separate cloud stack; the same chains and the same wave-tick GPU kernel run consensus, DEX, EVM, FHE, AI inference, and customer workloads in lockstep.
Decentralization
Permissionlessness
| Property | Mechanism |
|---|---|
| Anyone can run a node | stake LUX on P-Chain, register a validator key, become eligible for any appchain's validator subset |
| Anyone can deploy an appchain | submit DeployAppchainTx on P-Chain with a BaseAppchainConfig; the validator subset auto-selects from the staked pool |
| No gatekeeper for tenancy | the appchain ID space is permissionless; collisions resolve by stake-weighted priority |
| No central operator | every workload runs across more than 2/3 of its appchain's validator subset; loss of any 1/3 is tolerated |
| Open source | node, adapter, EVM, FHE, and AI inference are MIT/Apache; builds are reproducible |
Validator selection per appchain
Each appchain's validator subset is committed in the
BaseAppchainConfig (see
lp-5623):
struct BaseAppchainConfig {
uint64_t chain_id;
Hash validator_subset_root; // P-Chain commitment
Hash qchain_ceremony_root;
Hash zchain_vk_root;
QuasarMode mode; // Nova or Nebula
uint64_t block_time_ms;
uint64_t gas_limit;
};
Subset selection is deterministic from (P-Chain validator set, chain_id, epoch). Subset size is policy: a tenant may pay for a larger
subset (more decentralization) or a smaller one (cheaper).
Failure-domain isolation
Cross-tenant isolation runs at the appchain boundary:
| Failure mode | Blast radius |
|---|---|
| Validator equivocation | one appchain (signed by the validator's stake share) |
| GPU node crash | one appchain's lane subset on that node |
| Network partition | partitioned appchains; others unaffected |
| Smart-contract bug | one appchain's contract space |
| FHE key compromise | one F-Chain key arena; rotated per the FHE key policy |
There is no shared mutable cloud control-plane state across tenants that could fan a single failure across the customer base.
Workload classes
Every workload maps to one or more chains in the canonical chain topology.
Stateful services — database, KV, queues
Native pattern: Base appchains on Quasar.
| Concept | Mapping |
|---|---|
| Database table / collection | domain component of the lane key |
| Row / record | H("base", chain_id, collection, record_id) lane |
| Read query | local read from the owned lane (gateway routes to the owner) |
| Write / mutation | Quasar tx in the QuasarGPU adapter |
| Transaction | distributed tx via per-lane cert artifacts |
| Realtime subscription | tail CertOut for subscribed lanes |
Throughput: Tier 2 (~100 M ops/s on a single GPU node). Finality: < 1.1 s strong; commit < 50 ms.
Stateless compute — workers, FaaS
Stateless workloads are C-Chain contracts (GPU-native EVM) deployed inside the customer's appchain. Cold start is zero — no container boot; the EVM fiber executes inside the wave-tick kernel. Function inputs and outputs are tx calldata and emitted events.
Auto-scaling: validator subset size determines compute-side capacity; the customer scales by paying for a larger subset. Read-side scaling is automatic via the gateway's lane-affinity routing.
AI inference
AI inference runs through a drain_ai service that consumes model
weights from content-addressed storage and runs inference inside the
QuasarGPU wave-tick kernel.
| Pattern | Authority |
|---|---|
| Model loading (weight hash) | content-addressed; pinned by P-Chain stake |
| Inference dispatch | C-Chain precompile call → AI-chain lane |
| Result attestation (proof of correct inference) | A-Chain attestation |
| Token-billed metering | per-inference fee charged to the caller's appchain account |
The inference cert lane is registered alongside the other lanes
(reserved enum slot ≥ 10). Confidential inference — encrypted weights or
encrypted inputs — routes through F-Chain (FheCompute service).
DEX engines — precompile-native
The DEX matching engine is a C-Chain precompile, not a contract. Order books live in lanes, match in the wave-tick kernel, and settle on X-Chain. DEX customers get sub-100 µs match latency on the same GPU process that serves their other workloads.
FHE compute — encrypted services
Encrypted workloads run on F-Chain via the drain_fhe service.
Customers pay per TFHE gate evaluation plus bootstrap. Use cases:
confidential token balances, private cross-chain transfer, encrypted
database queries, and encrypted ML inference.
Bootstrap-key material comes from an M-Chain ceremony output into the F-Chain key arena.
Resource economics
Per-appchain markets
Each appchain has its own gas and fee curve. The customer chooses:
| Knob | Effect |
|---|---|
gas_limit | per-block compute budget |
block_time_ms | latency vs cost trade-off |
validator_subset_size | redundancy / decentralization budget |
mode (Nova / Nebula) | linear order vs DAG fan-out |
fee_token | LUX or appchain-native (must be exchangeable for LUX at the validator level for stake-aligned settlement) |
Settlement: per-block fees split between the appchain's validator subset (compute reward) and the P-Chain global treasury (stake reward and slashing pool).
Per-resource pricing
Consumption is metered at the substrate level — there is no host-side metering. Every priced operation is a counter inside the wave-tick kernel:
| Resource | Counter | Settlement |
|---|---|---|
| EVM gas | per-tx gas used | per block, in fee token |
| GPU compute (kernel time) | service-tick count per service | per block, in fee token |
| Storage (state-trie bytes) | trie-node deltas per block | per block, in fee token |
| Bandwidth | bytes egressed via gateway | per billing window |
| TFHE gates | per-gate counter in drain_fhe | per block |
| Bootstrap | per-bootstrap counter | per block |
| AI inference tokens | per-token counter in the AI lane | per inference |
| DEX matches | per-match in the DEX precompile | per match |
All counters live in the same per-tx receipt. No external billing service is involved on the hot path.
Marketplace mechanics
Validator nodes advertise their resource availability — GPU model,
memory, bandwidth, TEE support — in a P-Chain registry. When a
DeployAppchainTx arrives, the subset selector matches the appchain's
resource requirements against advertised capacity. Oversubscription
resolves via stake-weighted bidding within the selection epoch.
TEE integration
Confidential workloads run inside SGX, SEV-SNP, or TDX with quotes attested to A-Chain:
- The tenant deploys a confidential appchain with
tee_required: trueinBaseAppchainConfig. - The validator subset selector restricts to TEE-capable nodes.
- Each node submits a TEE quote on join.
- Quotes verify via
drain_attestand commit toachain_attestation_root[32]inQuasarRoundDescriptor. - Customer contracts read the attestation root via precompile and gate sensitive operations on it.
TEE and FHE together — encrypted execution inside attested enclaves — provide defence in depth: a TEE compromise alone reveals only ciphertexts; an FHE compromise alone is irrelevant to data inside TEEs.
Hardware trust tiers are classified in lp-5610; the worker-level trust and capability records that a scheduler matches against are in lp-5626.
Migration and portability
Appchain state is portable:
| Step | Action |
|---|---|
| 1 | Customer issues SnapshotAppchainTx on their appchain |
| 2 | The validator subset produces a cert-protected snapshot at the named round |
| 3 | The snapshot artifact is (state_root, snapshot_blob_hash, quasar_cert), committed under an M-Chain ceremony root or a B-Chain bridge root |
| 4 | A new deployment — different chain ID, possibly different validator subset, possibly different cluster — imports the snapshot via RestoreAppchainTx, verifying the cert against the source epoch's QuasarRoundDescriptor |
| 5 | C-Chain contract addresses, Base records, and FHE ciphertexts all preserve identity |
This is lift-and-shift portability over a permissionless substrate — a stronger guarantee than typical cloud portability, because the certificate provides cryptographic continuity, not just data continuity.
Reference implementations
- Hanzo Cloud (
hanzoai/cloud) — the AI cloud (RAG, embedding providers, vector search) runs as an appchain. Each tenant gets a Base appchain for collections (knowledge bases, conversations), an AI lane for inference dispatch, and an F-Chain key arena for confidential RAG queries. - Lux Cloud (
luxfi/cloud) — the reference cloud frontend and dashboard over QuasarGPU engine RPCs. Drives appchain deployment, monitoring, and billing through P-Chain transactions. - Cloud operator (
luxfi/operator) — validator-node provisioning, GPU driver setup, and KMS sync. All cloud infrastructure deployment runs through the operator and the platform PaaS; developers do not touch the managed Kubernetes control planes directly.
Implementation plan
| Version | Scope |
|---|---|
| v0.50 | chain topology lands (M, F, A, B chains) |
| v0.51 | DeployAppchainTx on P-Chain; validator subset selector |
| v0.52 | per-appchain fee markets; receipt metering for GPU and storage |
| v0.53 | Base appchain template ships in the operator |
| v0.54 | F-Chain confidential appchain template |
| v0.55 | TEE-required appchain template (A-Chain attested) |
| v0.56 | AI inference appchain template |
| v0.57 | Snapshot/restore portability flow |
| v0.58 | Marketplace registry: GPU / TEE / bandwidth advertisement |
Security Considerations
- Stake-aligned validation. Every appchain's validator subset has stake at risk via slashing on P-Chain. There is no path where a compromised cloud node profits from misbehavior — slashing exceeds any rational reward.
- Tenant isolation by construction. Cross-tenant leakage requires either equivocation by at least 1/3 of an appchain's validator subset (slashed) or a substrate bug (in scope for audit).
- Resource-accounting integrity. Counters are part of the receipt,
covered by
execution_root, certified by Quasar. A node cannot under-report or over-report consumption without producing an invalid execution root. - Confidentiality. F-Chain (FHE) and A-Chain (TEE) provide two independent confidentiality paths. Customers needing both stack them.
- Snapshot replay. A snapshot artifact is bound to its
QuasarRoundDescriptor; replaying it into a chain with a differentpchain_validator_rootfails cert verification at restore time. - Bridge surface. Cross-cloud transfers go through B-Chain, which inherits all bridge security properties. There is no privileged "cloud bridge" with elevated permissions.
- DoS resistance. Appchains are economically rate-limited by their own gas and fee curves; one appchain saturating its subset has zero effect on other appchains running on the same physical nodes, because scheduling is lane-level.
- Data sovereignty. The storage layer is the Quasar state trie
itself, committed in
state_root— not an external object store. No off-chain data plane, no external availability assumption.
References
| Resource | Location |
|---|---|
| lp-0110 | Quasar consensus |
| lp-0130 | Chain topology |
| lp-1000 | P-Chain staking and validator registry |
| lp-4650 / lp-4655 | FHE runtime and GPU kernels |
| lp-4700 | Threshold MPC family |
| lp-5000 | A-Chain attestation |
| lp-5075 | TEE integration |
| lp-5200 | AI compute settlement |
| lp-5610 | Confidential-compute hardware tiers |
| lp-5620 | GPU-native EVM |
| lp-5622 | QuasarGPU adapter |
| lp-5623 | Quasar-native app stack |
| lp-6000 | B-Chain bridge |
| lp-7325 | KMS |
| lp-8000 | Z-Chain |
| lp-8200 | F-Chain FHE |
| lp-9000 | DEX engine |
Copyright
Copyright (C) Lux Industries Inc and Hanzo AI Inc. Licensed under the MIT License.