Vela uses an optimistic execution model with a ZK-based fraud proof mechanism. State transitions are assumed correct by default; any party with access to the data availability layer can independently verify them and generate a fraud proof if a discrepancy is found.Documentation Index
Fetch the complete documentation index at: https://docs.vela.monolithsystematic.com/llms.txt
Use this file to discover all available pages before exploring further.
Optimistic vs. ZK-Validity
There are two approaches to verifiable off-chain computation:| Approach | How it works | Trade-off |
|---|---|---|
| ZK-Validity | Every batch is accompanied by a zero-knowledge proof of correctness | High proving cost per batch, instant finality |
| Optimistic | Batches are assumed correct; fraud proofs challenge incorrect transitions | Low overhead per batch, challenge period required |
- The proving cost of a ZK-validity proof per batch would be prohibitive at Vela’s throughput (57k+ ops/sec)
- The fraud window provides sufficient security for exchange use cases
- Deterministic execution (fixed-point arithmetic, single-threaded engine) makes fraud proof generation tractable
Architecture
ZkvmInput Structure
Each batch published to the DA layer contains aZkvmInput:
requests vector contains every order placement, cancellation, and other state-modifying operation in the batch, in the exact order the engine processed them.
verify_execution()
Theverify_execution() function is the heart of the fraud proof system:
- The re-execution is deterministic: identical inputs (same requests, same pre-state) always produce the same outputs
- The engine used in the prover is the same codebase as the live engine — there is no separate “provable” implementation
- The first divergence is identified at the request level, not just the batch level, making fraud proofs maximally specific
FraudProof Structure
Current Status
| Component | Status |
|---|---|
zkvm crate | Complete — verify_execution() implemented and tested |
| Fraud proof generation | Working — generates FraudProof on divergence |
| DA batch publication | Active — LocalDaClient writes batch files |
| Test coverage | 100% of zkvm paths covered by test suite |
| On-chain verifier contract | Roadmap (M7) — Solidity contract to verify fraud proofs on-chain |
| Celestia/EigenDA integration | Roadmap (M7) — production DA layer |
The zkvm prover currently runs locally. In the full architecture, any third party with access to the DA layer can run the prover and submit fraud proofs to the on-chain verifier contract. This is the M7 milestone.
Determinism Guarantees
Fraud proofs only work if the prover’s re-execution is bit-for-bit identical to the original. Vela achieves this through:- Fixed-point arithmetic — no floating-point, no platform-dependent rounding
- Single-threaded engine — no nondeterministic scheduling
BTreeMapfor ordered iteration — noHashMapwith randomized iteration order on the hot path- Canonical serialization — all state is serialized with deterministic field ordering
- Same codebase — the prover uses the exact same
enginecrate as the live system