Inspiration

What it does Inspiration

Freelance teams and autonomous AI agents exchange datasets, code modules, and technical deliverables every day—yet buyers risk paying for broken work, and sellers risk non-payment. Holding customer balances creates regulated money-transmitter custody risk. ProofPay eliminates both risks without ever holding pooled funds.

What It Does

  • Zero-Custody PayPal REST v2 Authorization Holds (Not Escrow): Initiates POST /v2/checkout/orders (intent: AUTHORIZE), enforces 29-day hold lifecycle guards, and settles milestone-by-milestone via idempotent partial captures (POST /v2/payments/authorizations/{id}/capture), cleanly voiding unused amounts on cancellation.
  • Contract Studio (/studio): Compiles plain-English scopes into strict canonical JSON contracts (contract_json) with integer minor-unit milestone budgets, deterministic schema checks, and AI rubric thresholds.
  • 4-Stage Verification & Adversarial Shield:
    1. Stage 1 Deterministic Checks (< 50 ms): 10 zero-cost analyzers (json_schema via AJV, row_count, unique_field, regex_field, word_count, csv_schema, forbidden_terms, SSRF-hardened link_check, Shannon-entropy junk_detector).
    2. Stage 2 Dual-LLM Rubric + Verbatim Grounding: Structured tool calling requiring exact verbatim substring quotes from the deliverable; ungrounded claims downgrade automatically.
    3. Stage 3 Prompt Injection Defense: 11 regex classes + zero-width/bidi Unicode cluster detection + AI classifier.
    4. Stage 4 Pure Policy Engine: Zero-I/O deterministic decide() function fuzzed across 5,000 property cases (0 / 19 false passes in evaluation).
  • Zero-Hallucination Loophole Finder (/demo/loophole): Red-teams contract rules before buyer authorization using concrete fake exploits, confirms bypasses against real Stage 1 code, and seals vulnerabilities in one click with RFC 6902 JSON Patches.
  • Autonomous Agent & MCP Infrastructure (/demo/mcp, /demo/agent-wallet): Standalone @modelcontextprotocol/sdk server exposing 6 guarded tools (create_contract, accept_contract, get_funding_link, submit_deliverable, get_verification_report, get_contract_status), paired with per-contract Spend Policies (forbidAgent locks so human buyers always approve PayPal funding).
  • Multi-Agent Advisory Dispute Tribunal (/demo/tribunal): SentinelBot (buyer advocate), LexiBot (seller respondent), and JusticeBot (neutral arbitrator) weigh objective logs to draft transparent split briefs requiring human sign-off.
  • 90-Second Express Sandbox & Chaos Lab (/demo/express, /demo/lab): Pre-authorized demo_pool lane (FOR UPDATE SKIP LOCKED) plus fault injection proving zero double captures across timeouts, duplicate webhooks, worker crashes, and LLM outages (13 / 13 chaos cases passing).
  • AG Grid Financial Audit Ledger, 1099-K Tax & Offline ProofPacks (/ledger, /app, /verify, /transparency): Interactive AG Grid v33 audit table, IRS Form 1099-K / W-9 compliance tracking, Ed25519 KMS signatures, RFC 3161 TSA timestamps, Merkle checkpoints, and offline browser Web-Crypto SHA-256 verification.

Sponsor Technologies Used

  • PayPal Developer Platform: REST v2 Orders & Authorizations (AUTHORIZE, partial capture, void, webhook verification, PayPal-Request-Id idempotency).
  • Anthropic & Groq AI: claude-sonnet-4-5, claude-haiku-4-5, and Groq LPU (qwen/qwen3.8-27b) via Model Context Protocol (@modelcontextprotocol/sdk).
  • AG Grid Community v33: Multi-column sortable, filterable SHA-256 financial ledger (/ledger) with synchronized light/dark Quartz theming and CSV export.
  • APIMatic: OpenAPI 3 specification (public/openapi.json + apimatic.json) configured for TypeScript, Python, C#, Java, Go, and PHP SDK generation + interactive explorer (/docs).
  • Render: Turnkey multi-service Blueprint (render.yaml) deploying proofpay-web, proofpay-worker, and managed proofpay-postgres PostgreSQL 16.

How we built it

Challenges we ran into

Accomplishments that we're proud of

What we learned

What's next for ProofPay

Built With

Share this project:

Updates

Submission history