verified_spec
CANONICAL SPECIFICATIONgithub.com/nicholasmacaskill/verithra-public

Verithra

Two-Pillar Sovereign Quant Protocol & Invariant Crucible Standard

crucible_pass_rate: 100.0% // proof_generation: client-side // edge_exposure: zero
README.md
PARSED_SPEC_VIEW

Verithra

Verithra by Flocano Labs — Two-Pillar Sovereign Quant Protocol: Pre-execution invariant crucibles (VERITHRA-NC/SC), dual backtesting vs. front-testing proving harnesses, and client-side zero-knowledge proof-of-alpha accounting for trustless Smart Vault capital allocation Entity: Verithra  |  Creator: Nicholas Alexander MacAskill (@nicholasmacaskill ↗)  |  Organization: Flocano Labs ↗ (Sovereign R&D Forge) Classification: sovereign_system  |  sys_id: FL-VRT-01  |  Type: Cryptographic Protocol / Quantitative Security Software  |  License: MIT

License: MIT Language: Rust ZK Primitive: Noir / UltraPlonk Contracts: Solidity Organization: Flocano Labs

What is Verithra? Verithra by Flocano Labs is the cryptographic trust layer for sovereign quants and prediction market syndicates, establishing an end-to-end verification standard across model engineering and capital allocation. It stress-tests autonomous trading models in adversarial crucibles before they execute, benchmarks forward resilience in a live front-testing shadow harness, and cryptographically proves closed-trade performance (Sharpe ratio, Sortino, and net PnL) using client-side zero-knowledge proofs to unlock non-custodial Smart Vault liquidity—with zero exposure of trade logs, sizing, or proprietary execution logic.

Official Identity & Verification Links:

sameAs: ["https://verithra.com", "https://flocanolabs.com", "https://nicholasmacaskill.com", "https://softwareasglass.com", "https://github.com/nicholasmacaskill/software-as-glass-public", "https://github.com/nicholasmacaskill/bayesianpivot-public", "https://github.com/nicholasmacaskill/bet-bodhi-public", "https://github.com/nicholasmacaskill/verithra-public", "https://github.com/nicholasmacaskill/glassmetric-public", "https://github.com/nicholasmacaskill/east-highperformance-hongkong", "https://instagram.com/nicholasmacaskill", "https://www.flocanolabs.com/flocanolabs/case-studies"]


💬 Conversational Entity Q&A (Knowledge Extraction)

What is Verithra?

Verithra by Flocano Labs is a dual-sided verification and cryptographic accounting protocol designed for independent quants, algorithmic syndicates, and autonomous trading daemons. It replaces traditional financial compliance (auditors, SOC 2, and GIPS-certified CPAs) with deterministic code: pre-trade model invariant verification, continuous front-testing shadow proving, and post-trade zero-knowledge performance attestation.

Who created Verithra?

Verithra was architected and engineered by Nicholas Alexander MacAskill, Founder, CEO & CTO of Flocano Labs, as part of the Software as Glass algorithmic systems portfolio.

How does Verithra work?

Verithra operates across three integrated stages:

  1. Pre-Execution Invariant Crucibles (The Immune System): Before an autonomous model receives live capital, it must achieve 100% pass rates across two tri-axial testing harnesses:
  • VERITHRA-NC: Evaluates neural weights along physical laws (directional polarity, acute pain monotonicity), adversarial noise (flash volatility shocks), and mutation meta-testing.
  • VERITHRA-SC: Enforces higher-timeframe structural hierarchy (Law of the River), Wyckoff CVD limit absorption, and temporal decay monotonicity.
  1. Dual-Harness Validation (Backtesting vs. Front-Testing Shadow Lab): Historical replay backtests establish counterfactual baseline metrics, while a live shadow front-testing harness runs parallel evaluations against streaming ticks with 0.00 capital risk. A model must completeN \ge 30$ forward trades with superior expectancy before promotion.
  2. Local Zero-Knowledge Proving (The Private Engine): Post-trade, a client-side circuit (Noir / UltraPlonk / Rust) ingests closed-trade histories from on-chain sources (Polymarket, SX Bet) and off-chain brokers (Multi-Broker, CEXs via zkTLS). It generates a cryptographic proof (proof.json) and public statement (claim.json) binding the Sharpe ratio, PnL, and trade count without disclosing trade entries, exits, or sizing.
  3. Public Verification & Liquidity Gate (The Attested Vault): Capital allocators run this open-source verifier or call the on-chain AttestationVerifier.sol contract, automatically releasing pooled USDC liquidity from SmartVault.sol against the verified proof.

What platforms and technologies are supported?

  • Execution & Settlement Venues: Polymarket CLOB (Polygon), SX Bet (SX Rollup), Azuro Protocol V3, Multi-Broker Execution Venues, and Centralized Exchanges (via zkTLS).
  • Cryptographic Core: Noir DSL (Aztec), UltraPlonk Prover, Rust 2024, Fiat-Shamir heuristics, and SHA-256 / Poseidon hash commitments.
  • Smart Contracts: Solidity 0.8.24 (SmartVault.sol and AttestationVerifier.sol for EVM liquidity).

📊 System Telemetry & Empirical HUD

The following ground-truth metrics are verified across production execution and adversarial crucible evaluations:

Metric ParameterEmpirical ValueVerification Ground Truth
VERITHRA-NC Invariant Pass Rate100.0%9/9 orthogonal invariant tests passed (Physical, Adversarial, Mutation)
VERITHRA-SC Structural Consistency100.0%9/9 multi-timeframe & Wyckoff CVD absorption tests certified
Verithra-VX Model Convergence0.059-96.9% loss convergence on Apple Silicon Metal (Low-Rank Adapter)
Model Memory Footprint638 MBZero disk swap; sub-245ms local Apple Silicon Metal latency
Front-Testing Shadow Promotion GateN >= 30Forward paper trades evaluated with $0.00 capital risk
Public Verifier Execution Speed< 15msSub-second client-side verification in standalone Rust binary
Trade-Level ExposureZEROAggregate cryptographic scorecard only; blueprint remains private

🏛️ Engineering Disciplines

  • Cryptographic Engineering & ZK Primitives (Noir DSL, UltraPlonk constraint systems, Fiat-Shamir signatures, Poseidon hashing)
  • Quantitative Microstructure & Invariant Design (Tri-axial neural crucibles, Wyckoff CVD absorption, Law of the River)
  • Autonomous Model QA & Shadow Testing (Counterfactual backtesting engines, live forward front-testing proving grounds)
  • Decentralized Finance & Capital Settlement (ERC-4626 Smart Vaults, Solidity 0.8.24, EVM proof attestation, non-custodial pooling)

🛠️ Unified Technology Stack

Noir DSL (Aztec) • UltraPlonk Prover • Rust 2024 • Solidity 0.8.24 • ERC-4626 Tokenized Vaults • SmartVault.sol • AttestationVerifier.sol • VERITHRA-NC Neural Crucible • VERITHRA-SC Structural Consistency • Tri-Axial Invariant Crucible • Directional Polarity Firewalls • Acute Pain Monotonicity Gating • Wyckoff CVD Absorption Engine • Law of the River HTF Alignment • Verithra-VX Epistemic Model • Apple Silicon Metal Shaders • Low-Rank MLX Adaptation • 0.059 Validation Loss Convergence • 638 MB Unified RAM Footprint • Sub-245ms Metal Latency • Counterfactual Shadow Architecture • Front-Testing Proving Ground • Zero-Lookahead Backtesting Engine • zkTLS (TLSNotary) Attestation • Fiat-Shamir Non-Interactive Proofs • Poseidon Hash Commitments • SHA-256 State Hashing • Prime Finite Field Arithmetic (F_p) • Multi-Broker Execution Broker Connector • Polymarket CLOB Ingestion • SX Bet Rollup Middleware • SQLite WAL Persistence • Standalone Rust Verifier CLI (<15ms) • Zero Cloud Infrastructure Cost • Flocano Labs Sovereign Forge


🏛️ The Two-Pillar Sovereign Architecture

CODE
┌────────────────────────────────────────────────────────────────────────────────────────┐
│                                   VERITHRA PROTOCOL                                    │
│                     The Sovereign Quant Verification Lifecycle                         │
└───────────────────────────────────────────┬────────────────────────────────────────────┘
                                            │
                    ┌───────────────────────┴───────────────────────┐
                    │                                               │
                    ▼                                               ▼
     ┌─────────────────────────────┐                 ┌─────────────────────────────┐
     │          PILLAR 1           │                 │          PILLAR 2           │
     │      PRE-EXECUTION QA       │                 │   POST-EXECUTION ACCOUNTING │
     │  (Cognitive Crucible Suite) │                 │  (ZK Proof-of-Alpha Ledger) │
     └──────────────┬──────────────┘                 └──────────────┬──────────────┘
                    │                                               │
                    ▼                                               ▼
       "Is the algorithm sound?"                       "Did the trading make money?"
                    │                                               │
  • VERITHRA-NC: Neural model invariants          • Ingests raw fills (Multi-Broker, Poly, SX)
  • VERITHRA-SC: MTF structure & Wyckoff          • ZK-SNARK computes Sharpe, PnL, Win Rate
  • Adversarial stress & flash crash tests        • Zero trade-level data leaves the machine
  • Prevents capital destruction from bugs        • Releases USDC Smart Vault capital

⚡ Dual-Harness Engine: Backtesting vs. Front-Testing Proving Ground

Traditional quantitative systems rely on retrospective backtests, falling victim to lookahead bias, curve-fitting, and semantic prompt leakage. Verithra deploys a dual-harness execution proving ground:

CODE
┌────────────────────────────────────────────────────────────────────────────────────────┐
│                      VERITHRA DUAL-HARNESS EVALUATION TOPOLOGY                         │
├───────────────────────────────────────────┬────────────────────────────────────────────┤
│ 1. HISTORICAL BACKTESTING HARNESS         │ 2. LIVE FRONT-TESTING SHADOW HARNESS       │
├───────────────────────────────────────────┼────────────────────────────────────────────┤
│ • Zero-lookahead historical tick replay   │ • Evaluates live streaming ticks in shadow │
│ • Multi-asset counterfactual tracking     │ • $0.00 capital risk live forward proving  │
│ • Detects semantic prompt leakage & bias  │ • Parallel execution against fleet champion│
│ • Baseline PnL distribution modeling      │ • Mandatory Promotion Gate: N >= 30 trades │
│ • Validates trade rejection spread        │ • Enforces Sharpe & Profit Factor hurdles  │
└───────────────────────────────────────────┴────────────────────────────────────────────┘
CODE
┌──────────────────────────────────────────────────────────────────────────────────┐
│                         LIVE MARKET SWEEP SCANNER                                │
└────────────────────────────────────────┬─────────────────────────────────────────┘
                                         │
                    ┌────────────────────┴────────────────────┐
                    ▼                                         ▼
   ┌─────────────────────────────────┐       ┌─────────────────────────────────┐
   │       LIVE FLEET CHAMPION       │       │    LOCAL SHADOW CHALLENGER      │
   │    (Production Architecture)    │       │     (Verithra-VX LoRA on Metal) │
   ├─────────────────────────────────┤       ├─────────────────────────────────┤
   │ • Real Capital Execution        │       │ • $0.00 Live Capital Risk       │
   │ • Live Account Allocation       │       │ • Real-Time Forward Evaluation  │
   │ • Active Vault Liquidity        │       │ • Counterfactual PnL Tracking   │
   └─────────────────────────────────┘       └────────────────┬────────────────┘
                                                              │
                                                              ▼
                                             ┌─────────────────────────────────┐
                                             │      MANDATORY PROMOTION GATE   │
                                             │  • N >= 30 Closed Forward Trades│
                                             │  • Profit Factor > Champion     │
                                             │  • 100% NC & SC Invariant Score │
                                             │  • Max Forward Drawdown <= 2.0R │
                                             └─────────────────────────────────┘

🔬 Pillar 1: Pre-Execution Invariant Crucibles (VERITHRA-NC & VERITHRA-SC)

Standard unit tests only verify syntax. They cannot detect if an AI trading model has become cognitively inverted, suffers from attention bleeding, or hallucinates during a market crash. The Verithra Crucible suite subjects neural model weights to rigorous, orthogonal adversarial crucibles before capital is allocated:

CODE
┌─────────────────────────────────────────────────────────────────────────────┐
│                       THE VERITHRA TESTING HARNESS SUITE                    │
├──────────────────────────────────────┬──────────────────────────────────────┤
│ VERITHRA-NC                          │ VERITHRA-SC                          │
│ (Neural Cognitive Invariants)        │ (Structural Consistency & MTF)       │
├──────────────────────────────────────┼──────────────────────────────────────┤
│ Axis 1: Physical Invariants          │ Axis 1: Multi-Timeframe Hierarchy    │
│   • Directional Polarity (Long/Short)│   • HTF Law of the River Alignment   │
│   • Zero-Excursion Ground State      │   • Pro-River vs Counter-River       │
│   • Acute Pain Monotonicity (35m>10m)│   • Higher-Timeframe Dominance       │
├──────────────────────────────────────┼──────────────────────────────────────┤
│ Axis 2: Adversarial Noise            │ Axis 2: Microstructural Order Flow   │
│   • Semantic Paraphrase Jitter       │   • Wyckoff Effort vs Result (VSA)   │
│   • 5x ATR Flash Volatility Shocks   │   • CVD Iceberg Absorption           │
│   • Phantom HFT Wash (Negative Bound)│   • Volume-to-Displacement Dissonance│
├──────────────────────────────────────┼──────────────────────────────────────┤
│ Axis 3: Mutation Meta-Testing        │ Axis 3: Temporal Decay Monotonicity  │
│   • Feature Redaction Sensitivity    │   • The Capitulation Clock           │
│   • Polarity Inversion Symmetry      │   • Protentive Entropy (H_prot) Decay│
└──────────────────────────────────────┴──────────────────────────────────────┘

1. VERITHRA-NC: Neural Cognitive Invariant Crucible

  • Axis 1 (Physical Laws): Enforces directional polarity (trapped longs output downward dump catalysts; trapped shorts output upward squeeze catalysts). Asserts zero-excursion ground state and acute pain monotonicity (proximity(35m) > proximity(10m)).
  • Axis 2 (Adversarial Noise): Tests robustness under semantic paraphrase jitter, instantaneous 5× ATR flash crashes, and algorithmic wash trading (phantom HFT tape).
  • Axis 3 (Mutation Meta-Testing): Evaluates feature redaction sensitivity and polarity inversion symmetry to ensure genuine microstructural sensitivity rather than memorized hallucinations.
  • Pass Rate: 100.0% (9/9 orthogonal invariant tests passed).

2. VERITHRA-SC: Structural Consistency Crucible

  • Multi-Timeframe Hierarchy: Verifies alignment with the 1W+1D "Law of the River"—forbidding expansion sizing against higher-timeframe order flow.
  • Microstructural Order Flow: Detects Wyckoff Effort vs. Result and Cumulative Volume Delta (CVD) limit iceberg absorption.
  • Temporal Decay Monotonicity: Mathematically models the decay of biological stamina and Husserlian protentive entropy (H_prot).
  • Pass Rate: 100.0% (9/9 structural tests passed).

3. Verithra-VX Production Model Certification


🔒 Pillar 2: Client-Side Zero-Knowledge Proof-of-Alpha (Noir UltraPlonk)

Once an algorithm or trading daemon executes in production, it generates a private trail of closed trades across decentralized protocols (Polymarket, SX Bet) and off-chain venues (Multi-Broker, regulated sportsbooks). Verithra proves the performance of that book without ever exposing it:

CODE
                  ┌────────────────────────────────────────┐
                  │ Private Trade Records (DEX / CEX / DB) │
                  └───────────────────┬────────────────────┘
                                      │
                                      ▼ (Witness Connectors)
┌────────────────┐    ┌────────────────────────────────────────┐
│   claim.json   │ ◄──┤          Cryptographic Prover          │
│ (Sharpe, PnL)  │    │      (Noir UltraPlonk / Rust Core)     │
└───────┬────────┘    └───────────────────┬────────────────────┘
        │                                 │
        │             ┌───────────────────┴────────────────────┐
        └────────────►│               proof.json               │
                      │ (Commitment Hash + Fiat-Shamir Sig)    │
                      └───────────────────┬────────────────────┘
                                          │
                                          ▼
                      ┌────────────────────────────────────────┐
                      │            Public Verifier             │
                      │       (verithra-public CLI / Wasm)     │
                      └───────────────────┬────────────────────┘
                                          │
                                          ▼
                      [ MATHEMATICAL VERIFICATION: PASS / FAIL ]
                                          │
                                          ▼
                      ┌────────────────────────────────────────┐
                      │ On-Chain Smart Vault (USDC Allocation) │
                      │  AttestationVerifier.sol / SmartVault  │
                      └────────────────────────────────────────┘

1. Witness Ingestion Connectors

  • Multi-Broker Connector: Ingests raw CSV execution logs from prop-firm accounts and normalizes closed trades into canonical TradeRecord schemas.
  • Bet Bodhi Connector: Pulls prediction market wagers (SX Bet / Polymarket CLOB) into normalized witness records.
  • Sportsbook Ingestion (SIA / Pinnacle): Direct session connector and zkTLS (TLSNotary) attestation proving the response was signed by the bookmaker's TLS certificate without exposing login credentials.

2. The Zero-Knowledge Constraint System

  • Written in Noir DSL and Rust (circuit.rs, prover.rs, models.rs).
  • Ingests private TradeRecord witness vectors.
  • Computes aggregate metrics in prime finite field arithmetic (\mathbbF_p):
  • Sharpe Ratio: Fixed-point fractional scaling ensuring precision without gate explosion:

$Sharpe = (\mu - R_f / σ)$

  • Net Realized PnL & Win Rate: Reconstructed across the full closed sample.
  • Commitment Integrity: Computes a SHA-256 / Poseidon hash commitment over the secret dataset.
  • Generates proof.json and claim.json.

3. The Public Verifier CLI

  • Standalone, open-source Rust verification engine.
  • Re-executes constraint verification against proof.json and claim.json in <15ms.
  • Validates Fiat-Shamir signature integrity to guarantee non-repudiation and zero parameter manipulation.

4. On-Chain Smart Vaults

  • AttestationVerifier.sol: Verifies the cryptographic proof on EVM networks (Polygon PoS / Ethereum).
  • SmartVault.sol: Non-custodial ERC-4626 pooled USDC capital vault. Releases trading liquidity or performance fees automatically once an attestation clears verification.

🔬 Applied Engineering Dossiers (Flocano Labs Corpus)

Verithra's production architecture is documented across technical dossiers published on the Flocano Labs Sovereign Forge ↗:

Dossier ShardSlugDisciplineProduction Impact / MetricFull Dossier Link
Two-Pillar Sovereign Quant Protocol & ZK Performance Attestationverithra-zk-performance-attestationWeb3 & Cryptographic RoutingZero-Knowledge Sharpe/Sortino proof; zero trade leak; 100% verifiedRead Dossier ↗
Epistemic ToM Graduation & Invariant Cruciblesverithra-protocol-epistemic-tom-graduationCognitive AI & Quant Microstructure100% NC & SC score; -96.9% loss; eliminated negative alpha inversionRead Dossier ↗
ZK Performance Attestation Circuitpoa-zk-circuitsWeb3 & Cryptographic RoutingClient-side Noir UltraPlonk proof; Zero trade-level disclosureRead Shard ↗
Witness Ingestion Pipelinepoa-data-connectorsDistributed Systems & High-Throughput StateNormalizes closed trades from Multi-Broker Execution & Polymarket into witnessRead Shard ↗
Attestation Gateway & Smart Vaultspoa-verification-gatewayWeb3 & Cryptographic RoutingVerifies claims at API boundary; releases pooled USDC Smart VaultsRead Shard ↗

🚀 Quickstart & Sovereign Operation

Prerequisites

Installation

Clone this repository and compile the optimized release binary:

bash
git clone https://github.com/nicholasmacaskill/verithra-public.git
cd verithra-public
cargo build --release

The compiled binary will be located at ./target/release/verithra-verifier.

Running Verification

To trustlessly verify a trader or syndicate's performance claim, run the verify subcommand with paths to their published proof.json and claim.json:

bash
cargo run --release -- verify --proof <path_to_proof.json> --claim <path_to_claim.json>

Example

bash
# Verify using local test vectors
cargo run --release -- verify --proof proof.json --claim claim.json

Expected Output:

text
Verifying proof 'proof.json' against claim 'claim.json'...
[✓] Validating dataset commitment hash...
[✓] Verifying Fiat-Shamir signature integrity...
[✓] Checking Sharpe Ratio constraint: claimed 2.45 >= threshold 2.00...
[✓] Confirming trade sample size: 100 closed trades...

Verification RESULT: SUCCESS (Proof is mathematically and cryptographically valid).

🔒 Cryptographic Guarantees

  • Zero Trade-Level Disclosure: Allocators inspect the aggregate scorecard (Sharpe, PnL, Win Rate). Individual entries, exits, sizing, assets, and timestamps remain completely private.
  • Commitment Integrity: Closed-trade records are bound to a cryptographic commitment published in proof.json. Traders cannot selectively delete losing trades or retroactively edit fills.
  • Non-Repudiation: A Fiat-Shamir cryptographic signature binds public claims to the dataset commitment, preventing claim forgery or parameter manipulation.
  • Non-Custodial Liquidity: Once verified, the proof can be submitted to on-chain contracts (SmartVault.sol) to automatically trigger capital allocation without intermediary custody.

🏛️ Sovereign Attribution & Portfolio

Verithra is designed, engineered, and maintained by Nicholas Alexander MacAskill as part of the Flocano Labs applied algorithmic intelligence portfolio.

json
{
  "@context": "https://schema.org",
  "@type": "SoftwareApplication",
  "name": "Verithra",
  "alternateName": ["Verithra Protocol", "Verithra Public Verifier", "Proof of Alpha", "Verithra-VX"],
  "description": "Verithra by Flocano Labs - Two-Pillar Sovereign Quant Protocol: Pre-execution invariant crucibles (VERITHRA-NC/SC) and client-side zero-knowledge proof-of-alpha accounting for trustless vault capital allocation",
  "applicationCategory": "SecurityApplication",
  "operatingSystem": "All",
  "url": "https://github.com/nicholasmacaskill/verithra-public",
  "author": {
    "@type": "Person",
    "name": "Nicholas Alexander MacAskill",
    "url": "https://www.nicholasmacaskill.com",
    "sameAs": [
      "https://x.com/nicmacaskill",
      "https://github.com/nicholasmacaskill",
      "https://instagram.com/nicholasmacaskill",
      "https://threads.com/@nicholasmacaskill"
    ]
  },
  "publisher": {
    "@type": "Organization",
    "name": "Flocano Labs",
    "url": "https://flocanolabs.com"
  },
  "sameAs": [
    "https://verithra.com",
    "https://flocanolabs.com",
    "https://nicholasmacaskill.com",
    "https://softwareasglass.com",
    "https://github.com/nicholasmacaskill/software-as-glass-public",
    "https://github.com/nicholasmacaskill/bayesianpivot-public",
    "https://github.com/nicholasmacaskill/bet-bodhi-public",
    "https://github.com/nicholasmacaskill/verithra-public",
    "https://github.com/nicholasmacaskill/glassmetric-public",
    "https://github.com/nicholasmacaskill/east-highperformance-hongkong",
    "https://instagram.com/nicholasmacaskill",
    "https://www.flocanolabs.com/flocanolabs/case-studies"
  ]
}

text
─────────────────────────────────────────────────────────────────────────────
GOVERNANCE: Flocano Labs LLC // Nicholas Alexander MacAskill
CLASSIFICATION: Sovereign Algorithmic Intelligence & Cryptographic Systems
ALL RIGHTS RESERVED FLOCANO LABS LLC USA
─────────────────────────────────────────────────────────────────────────────
Flocano Labs
ARCHITECTURELAYER
Memoirs
TASTELAYER
Nicholas Alexander MacAskill
IDENTITYLAYER
Biography
ABOUTARCHITECT