Skip to content

veritaschain/vcp-payout-dispute-poc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

VCP v1.1 Payout Dispute Resolution PoC

"When payout disputes happen, CSV logs are not evidence. Dual cryptographic logs are."

This PoC demonstrates VCP v1.1 Three-Layer Architecture for tamper-evident audit trails.

VCP Version License Python

The Problem

Every year, thousands of prop firm traders lose payouts to disputes they cannot win:

  • "Our records show you violated the drawdown limit"
  • "The execution price in our system differs from yours"
  • "We have no record of that trade"

CSV logs can be edited. Screenshots can be faked. Your word against theirs is not evidence.

The Solution: VCP v1.1 Three-Layer Architecture

┌─────────────────────────────────────────────────────────────────────┐
│  LAYER 3: External Verifiability                                    │
│  ─────────────────────────────────                                  │
│  • Digital Signatures (Ed25519)                                     │
│  • External Anchoring (OpenTimestamps/Blockchain)                   │
│  • Third-party verification without trusting the producer           │
├─────────────────────────────────────────────────────────────────────┤
│  LAYER 2: Collection Integrity                                      │
│  ────────────────────────────────                                   │
│  • Merkle Tree (RFC 6962 compliant)                                │
│  • Batch completeness proof                                         │
│  • Audit path for each event                                        │
├─────────────────────────────────────────────────────────────────────┤
│  LAYER 1: Event Integrity                                           │
│  ───────────────────────────                                        │
│  • EventHash (SHA-256 of canonical event)                          │
│  • PrevHash (optional hash chain)                                   │
│  • Individual event completeness                                    │
└─────────────────────────────────────────────────────────────────────┘

VCP-XREF: Dual Logging for Dispute Resolution

┌─────────────────────┐                    ┌─────────────────────┐
│   TRADER SIDECAR    │                    │   PROP FIRM SYSTEM  │
│  (Your Evidence)    │                    │  (Their Evidence)   │
└─────────┬───────────┘                    └─────────┬───────────┘
          │                                          │
          │    CrossReferenceID: shared-uuid         │
          │    OrderID: ORD-2025-001234              │
          │                                          │
          ▼                                          ▼
┌─────────────────────┐                    ┌─────────────────────┐
│ VCP v1.1 Event Log  │                    │ VCP v1.1 Event Log  │
│ • EventHash         │                    │ • EventHash         │
│ • Merkle Tree       │                    │ • Merkle Tree       │
│ • Digital Signature │                    │ • Digital Signature │
│ • External Anchor   │                    │ • External Anchor   │
└─────────┬───────────┘                    └─────────┬───────────┘
          │                                          │
          └──────────────────┬───────────────────────┘
                             ▼
                  ┌─────────────────────┐
                  │ Independent Verifier│
                  │  (Auditor/Regulator/│
                  │   Third Party)      │
                  └──────────┬──────────┘
                             ▼
                  ┌─────────────────────┐
                  │  CROSS-REFERENCE    │
                  │    VERIFICATION     │
                  │                     │
                  │  ✓ Both logs match  │
                  │  ✗ Discrepancy alert│
                  └─────────────────────┘

Guarantee: Unless both parties collude AND compromise external anchors, any discrepancy is detectable and provable.

3-Minute Quick Start

1. Generate VCP v1.1 Compliant Events

python scripts/generate_events_v1_1.py

This creates:

  • evidence/trader_events.jsonl - 23 trader-side events
  • evidence/propfirm_events.jsonl - 23 prop firm-side events
  • evidence/anchor_records.json - External anchor records

2. Verify Both Logs Match

python verifier/verify.py \
    --trader evidence/trader_events.jsonl \
    --propfirm evidence/propfirm_events.jsonl \
    --anchor evidence/anchor_records.json

Output:

Layer 1: Event Integrity
  ✓ Trader event hashes:   23/23 valid
  ✓ PropFirm event hashes: 23/23 valid

Layer 2: Collection Integrity
  ✓ Trader Merkle tree:    VALID
  ✓ PropFirm Merkle tree:  VALID

Layer 3: External Verifiability
  ✓ Trader anchor:         VALID
  ✓ PropFirm anchor:       VALID

VCP-XREF: Cross-Reference Verification
  ✓ NO DISCREPANCIES DETECTED

This verification is MATHEMATICALLY PROVABLE per VCP v1.1.

3. Demonstrate Tamper Detection

# Simulate prop firm editing an execution price
python scripts/tamper_demo.py

# Verify and detect the tampering
python verifier/verify.py \
    --trader evidence/trader_events.jsonl \
    --propfirm evidence/propfirm_tampered.jsonl

Output:

Layer 1: Event Integrity
  ✗ PropFirm event hashes: 22/23 valid

✗ DISCREPANCIES DETECTED

  CRITICAL: 1
    • [EXE] ORD-2025-001002: execution_price
      ├─ Trader:   2658.20
      └─ PropFirm: 2655.50

These issues are CRYPTOGRAPHICALLY PROVABLE per VCP v1.1.

Repository Structure

vcp-payout-dispute-poc/
├── README.md                           # This file
├── LICENSE                             # CC-BY-4.0
├── requirements.txt                    # Dependencies (standard library only)
├── evidence/
│   ├── trader_events.jsonl             # 23 trader-side VCP v1.1 events
│   ├── propfirm_events.jsonl           # 23 prop firm-side VCP v1.1 events
│   └── anchor_records.json             # External anchor records
├── verifier/
│   └── verify.py                       # VCP v1.1 Three-Layer verification
├── scripts/
│   ├── generate_events_v1_1.py         # Generate VCP v1.1 compliant events
│   └── tamper_demo.py                  # Demonstrate tamper detection
└── docs/
    └── architecture.md                 # Detailed architecture

VCP v1.1 Compliance

This PoC implements the following VCP v1.1 requirements:

Requirement Status Reference
Three-Layer Architecture Section 6.0
EventHash (SHA-256) Section 6.1.1
PrevHash (optional) Section 6.1.2
Merkle Tree (RFC 6962) Section 6.2.1
Merkle Proof Section 6.2.3
Digital Signatures Section 6.3.1
External Anchor Section 6.3.3
Policy Identification Section 5.5
VCP-XREF Dual Logging Section 5.6
UUIDv7 Event IDs RFC 9562
JSON Canonicalization RFC 8785

Event Structure (VCP v1.1)

{
  "header": {
    "event_id": "UUIDv7",
    "timestamp_int": "nanoseconds",
    "timestamp_iso": "ISO 8601",
    "event_type": "SIG|ORD|ACK|EXE|REJ",
    "...": "..."
  },
  "payload": {
    "trade_data": { "...": "..." },
    "vcp_gov": { "...": "..." }
  },
  "vcp_xref": {
    "version": "1.1",
    "cross_reference_id": "shared UUID",
    "party_role": "INITIATOR|COUNTERPARTY",
    "shared_event_key": { "order_id": "...", "..." }
  },
  "policy_identification": {
    "version": "1.1",
    "policy_id": "org.example:policy-001",
    "conformance_tier": "SILVER|GOLD|PLATINUM",
    "verification_depth": { "..." }
  },
  "security": {
    "version": "1.1",
    "event_hash": "SHA-256 hex",
    "prev_hash": "previous event hash",
    "signature": "Ed25519 base64",
    "merkle_root": "batch root",
    "merkle_index": 0,
    "merkle_proof": [{ "hash": "...", "position": "left|right" }],
    "anchor_reference": "anchor-id"
  }
}

Why This Matters for Prop Firms

Scenario Without VCP With VCP v1.1 Dual Logging
Trader claims execution at $X "Trust us, it was $Y" Three-layer cryptographic proof shows $X
Drawdown dispute CSV can be edited Merkle tree proves timeline integrity
Missing trade "No record in our system" CrossReferenceID + anchor proves existence
Payout denial Months of email disputes Mathematical verification in seconds

For Prop Firms: Why Adopt This?

  1. End disputes permanently - Mathematical proof replaces "he said, she said"
  2. Reduce legal costs - Disputes resolve in seconds, not months
  3. Build trader trust - "VC-Certified" badge signals transparency
  4. Regulatory readiness - MiFID II, EU AI Act compliance preparation

For Traders: Protect Yourself

  1. Run the VCP Sidecar alongside your trading
  2. Your logs are YOUR evidence (independently anchored)
  3. Cross-reference verification catches manipulation
  4. External anchoring proves your timeline

Installation

# Clone repository
git clone https://github.com/veritaschain/vcp-payout-dispute-poc.git
cd vcp-payout-dispute-poc

# No dependencies required - uses Python standard library only
python --version  # Requires Python 3.9+

# Generate events and run verification
python scripts/generate_events_v1_1.py
python verifier/verify.py -t evidence/trader_events.jsonl -p evidence/propfirm_events.jsonl

Requirements

  • Python 3.9+
  • No external dependencies (standard library only)

Related Resources

License

This PoC is released under CC-BY-4.0.

Contact


Remember: When payout disputes happen, CSV logs are not evidence. VCP v1.1 Three-Layer cryptographic logs are.


This repository is a technical demonstration. It does not constitute legal, trading, or compliance advice.

Built by VeritasChain Standards Organization — Verify, Don't Trust.

About

Dual cryptographic logging PoC for independently proving payout dispute discrepancies between traders and prop firms, without adjudication or access to internal systems.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages