Proof Generation Time
Proof Generation Time
Full User Trade Flow: Average Prover Speed (Local + Remote)
SnarkSide's architecture mandates that every private trade execution, from intent submission to vault update, results in a cryptographically verifiable zero-knowledge proof. This proof, constructed using the Groth16 proving system (with future migration paths to recursive SNARKs), attests to the correctness of user-signed intents, matched counterparties, and private margin state transitions—without revealing any sensitive data.
This section benchmarks the end-to-end proof generation time for both local and remote proving environments, characterizing trade latency from a user's perspective as well as system-wide throughput across relayer nodes. It covers the full lifecycle from intent creation to on-chain settlement.
Trade Execution Flow (Proof Lifecycle)
Each user-submitted intent passes through the following stages:
Intent Signing (Client-Side)
User signs trade parameters off-chain (amount, direction, leverage, etc.)
Local hash:
Poseidon(intent_struct)Time: ~0.2–0.8ms (constant)
Intent Submission to Relayer
Transmitted over encrypted relay P2P mesh or gRPC gateway
Time: ~4–12ms network roundtrip
Off-Chain Matching (Relayer)
Intent matched with compatible counterparty (private symmetric match)
Time: ~7–21ms (batching adds 2–5ms per extra match)
Witness Construction
Flattening of matched intents and collateral positions into R1CS-compatible witness
Time: ~120–180ms
Proof Generation (Groth16, WASM Prover)
Intent circuit invoked
Proof includes matching symmetry, margin bounds, nullifier uniqueness, vault pre-state
Time (Local): ~740–960ms
Time (Remote via GPU): ~420–540ms (via distributed prover mesh)
Proof Broadcast + Settlement Tx
SNARK proof + calldata submitted to verifier
On-chain time: 1–2 blocks (depends on chain finality policy)
Benchmarked Prover Runtimes
Local (CPU, WASM)
Intel i7-12700H
~860ms
No parallelization
Local (Native)
i9-13900K
~720ms
Optimized with native binary
Remote (GPU Cluster)
RTX 3090 node
~430ms
Shared proving node pool
Mobile (ARM64)
M1 MacBook
~1.9s
Not recommended for trading
These values assume Groth16 circuits with 250k–310k constraints, 4–6 public inputs, optimized flattening.
Latency Breakdown (One Encrypted Trade)
Client Intent Signing
0.5ms
Network Relay (P2P)
8ms
Matching Logic
14ms
Witness Gen (Intent + Vault)
160ms
Prover Runtime (Groth16)
740ms (local CPU)
Submit to Verifier
~2s (on-chain)
→ Total: ~920ms (off-chain) → Total w/ Settlement Finality: ~2.8–3.2s
Scaling Considerations
Batching Efficiency: Increasing the number of matches per proof improves amortized prover time (e.g., 12 trades in ~1.9s). However, constraint growth is ~linear, and memory pressure becomes significant beyond 32 intents.
Parallel Proof Mesh: SnarkSide’s architecture supports remote ZK proving mesh using GPU-backed nodes for latency-sensitive execution. Remote provers may service VIP trades with <500ms latency guarantees.
Recursive Upgrade Path: Groth16 will be phased out (module by module) in favor of Halo2 + aggregation in Q4 2025. Expected recursive proof generation for 64 intents is <2s with native Rust provers.
Latency Tradeoffs
Traditional CEX
❌
~200ms
Medium
❌ (Opaque)
Transparent Perp DEX
⚠️
~400ms
Medium–High
✅ (but exploitable)
SnarkSide
✅
~2.8s
Low amortized
✅ (ZK-enforced)
SnarkSide accepts marginally higher latency to enforce a guaranteed privacy-preserving execution layer for institutional-scale perp traders. Future upgrades (e.g., recursive folding, native GPU stacks) will significantly close this gap.
Summary
Average single-intent proof generation: ~860ms (local) / ~430ms (remote)
Witness generation is the largest non-proving bottleneck (~160ms)
Batching improves throughput but saturates at 12–24 intents/circuit
On-chain latency still bounded by chain finality (1–2 blocks typical)
SnarkSide’s ZK proving infrastructure is engineered not just for correctness, but for performance at encrypted scale—a foundation for private, MEV-resistant perpetual futures at institutional grade.
Last updated

