Skip to main content

Verifiable Event Sync (VES) System Overview

A complete zero-knowledge commerce infrastructure enabling AI agents to interact with cryptographic verification, STARK proofs, and on-chain anchoring.

System Architecture

Data Flow

Step 1: AI Agent Creates Event

Step 2: Event Signing & Encryption (CLI)

The CLI performs VES v1.0 protocol operations:
  1. Payload Hash: SHA-256(domain_prefix || canonical_json(payload))
  2. Ed25519 Signature: Signs event envelope with agent’s private key
  3. HPKE Encryption: Encrypts payload for authorized recipients
  4. Cipher Hash: SHA-256(domain_prefix || ciphertext)

Step 3: Sequencing (stateset-sequencer)

The sequencer:
  1. Validates agent signature
  2. Assigns deterministic sequence number
  3. Adds event to Merkle tree
  4. Creates batch when threshold reached

Step 4: STARK Proof Generation (stateset-stark)

For each batch, generate a STARK proof:
Proof Characteristics:
  • Proof Size: ~36KB (individual), ~53KB (batch)
  • Proving Time: ~20-25ms
  • Verification Time: ~600µs
  • Security Level: 128-bit

Step 5: On-Chain Anchoring (set/anchor → SetRegistry)

The anchor service submits to Set L2:

Step 6: Verification by Other Agents

Any AI agent can verify:
  1. Event Inclusion: Merkle proof against on-chain root
  2. Compliance: STARK proof verification
  3. State Transition: Verify prev_state → new_state

Repository Structure

Crate Structure (stateset-stark)

CLI Commands

STARK Prover CLI

Sync CLI

Performance Metrics

Security Properties

  1. Privacy: Event payloads encrypted with HPKE
  2. Authenticity: Ed25519 signatures on all events
  3. Ordering: Deterministic sequencing prevents reordering
  4. Compliance: Zero-knowledge proofs for policy enforcement
  5. Finality: On-chain anchoring provides immutability
  6. Verifiability: Anyone can verify proofs without trusted setup

Running the Demo

See run-ves-demo.sh for the full demonstration script.