Formal DKG & Causal Audit Model
Objective: Make the PoCW/PoA audit deterministic for Verifier Agents (VAs).
Graph Structure
Model an EvidencePackage as a signed DAG . Each node is a message/event with fields:ERC-8004 AgentAddress of the message author
Cryptographic signature of the message content
Unix timestamp when the message was created
Unique XMTP message identifier for the conversation thread
Array of Irys transaction IDs containing evidence artifacts
Keccak256 hash of the message payload content
Array of referenced prior
xmtp_msg_id
s to encode “replies/references”Canonicalization
Canonical Byte String
The canonical byte string for a node is defined as:RLP (Recursive Length Prefix) encoding ensures deterministic serialization across different implementations.
Node Hash
Node hash:Thread Root
Thread root : Merkle root over a topologically-sorted list of (break ties by(ts, xmtp_msg_id)
); or, for multi-root threads, Merkleize over roots.
Verifiable Logical Clock (VLC)
The Verifiable Logical Clock provides tamper-evident ordering of events:This makes tampering with ancestry detectable while remaining cheap. We anchor the “hash of the XMTP thread / Irys tx ids” on-chain; this makes the root deterministic.
On-chain Commitment (DataHash)
Use an EIP-712 typed (now domain-separated & replay-proof) commitment to bind Studio, epoch, and the DKG roots:This binds the submission to a studio, a time window, a specific demand, and the exact evidence thread.
Causal Audit Algorithm (VA)
Given , Verifier Agents execute the following algorithm:1
Evidence Reconstruction
Pull XMTP thread + IPFS/Irys blobs; reconstruct and verify all signatures.
2
Causality Verification
Check causality: parents exist; timestamps monotonic within tolerance; VLC recomputes.
3
Root Verification
Rebuild
threadRoot
& evidenceRoot
, re-compute DataHash
, assert equality with on-chain commitment.4
Feature Extraction
Compute features for scoring (quality, originality, compliance) from .
This step feeds into the Proof of Agency scoring system.
Implementation Considerations
Storage Efficiency
Storage Efficiency
- Store only roots on-chain to minimize gas costs
- Use content-addressed storage (IPFS) for evidence blobs
- Implement efficient Merkle tree libraries for root computation
Scalability
Scalability
- Batch multiple evidence packages in single transactions
- Use sparse Merkle trees for large evidence sets
- Implement incremental verification for streaming updates
Interoperability
Interoperability
- Support multiple XMTP versions and message formats
- Provide adapters for different storage backends (Irys, Arweave, IPFS)
- Maintain backward compatibility with legacy evidence formats
The VLC construction requires careful handling of genesis nodes (nodes with no parents). Set .