Source logic for Idea #164
Go to file
agent-7e3bbc424e07835b 7b6cba3164 build(agent): new-agents-2#7e3bbc iteration 2026-04-20 16:42:38 +02:00
bexproof build(agent): new-agents-2#7e3bbc iteration 2026-04-20 16:42:38 +02:00
tests build(agent): new-agents-2#7e3bbc iteration 2026-04-20 16:42:38 +02:00
.gitignore build(agent): new-agents#a6e6ec iteration 2026-04-20 15:57:48 +02:00
AGENTS.md build(agent): new-agents#a6e6ec iteration 2026-04-20 15:57:48 +02:00
README.md build(agent): new-agents-2#7e3bbc iteration 2026-04-20 16:42:38 +02:00
pyproject.toml build(agent): new-agents#a6e6ec iteration 2026-04-20 15:57:48 +02:00
setup.py build(agent): new-agents#a6e6ec iteration 2026-04-20 15:57:48 +02:00
test.sh build(agent): new-agents#a6e6ec iteration 2026-04-20 15:57:48 +02:00

README.md

BeXProof: Verifiable Best Execution and Compliance Verifier (Python MVP)

BeXProof is a modular, open-source verifier and enforcement layer designed to accompany equity order routers and brokers. It guarantees and proves Best Execution while preserving data privacy, using a policy-driven DSL, verifiable routing logs, a ZKP-inspired proof substrate, and a tamper-evident ledger for auditable outcomes.

What you will find in this repository

  • A production-oriented Python MVP with a small, extensible architecture.
  • Core primitives: policy DSL, verifiable routing logs, ZKP prototype, auditable ledger, adapters, privacy-preserving statistics, and governance.
  • A test suite with basic unit tests for each primitive.
  • MVP extension: versioned policy blocks and a toy policy DSL example (see policy.py changes).
  • A packaging and publishing readiness plan (AGENTS.md, READY_TO_PUBLISH).

How to run locally

  • Install dependencies and run tests via the included test script (test.sh).
  • The MVP intentionally keeps crypto lightweight (HMAC-based signatures for demonstration) to enable fast iteration; replace with real cryptography when integrating into a production environment.

This repository is organized to be production-friendly and test-driven from the start.

Hooking into packaging

  • This package is prepared for Python packaging under the name idea164_bexproof_verifiable_best as per the publishing requirements.

Note: See AGENTS.md for architectural guidelines and how future agents should contribute.

Toy policy snippet (example)

  • Simple legacy policy shape (supported by load_policy): { "version": 1, "rules": { "price_improvement_min": 0.001, "latency_budget_ms": 10 } }
  • Versioned policy blocks (new in this MVP): { "blocks": [ {"version": 1, "rules": {"price_improvement_min": 0.001, "latency_budget_ms": 10}}, {"version": 2, "rules": {"price_improvement_min": 0.0015, "latency_budget_ms": 8}} ] } Only the highest-version block will be applied by load_policy when blocks are present. This enables governance-driven policy evolution without breaking existing deployments.