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:
- Stage 1 Deterministic Checks (
< 50 ms): 10 zero-cost analyzers (json_schemavia AJV,row_count,unique_field,regex_field,word_count,csv_schema,forbidden_terms, SSRF-hardenedlink_check, Shannon-entropyjunk_detector). - Stage 2 Dual-LLM Rubric + Verbatim Grounding: Structured tool calling requiring exact verbatim substring quotes from the deliverable; ungrounded claims downgrade automatically.
- Stage 3 Prompt Injection Defense: 11 regex classes + zero-width/bidi Unicode cluster detection + AI classifier.
- Stage 4 Pure Policy Engine: Zero-I/O deterministic
decide()function fuzzed across 5,000 property cases (0 / 19false passes in evaluation).
- Stage 1 Deterministic Checks (
- 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/sdkserver 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 (forbidAgentlocks so human buyers always approve PayPal funding). - Multi-Agent Advisory Dispute Tribunal (
/demo/tribunal):SentinelBot(buyer advocate),LexiBot(seller respondent), andJusticeBot(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-authorizeddemo_poollane (FOR UPDATE SKIP LOCKED) plus fault injection proving zero double captures across timeouts, duplicate webhooks, worker crashes, and LLM outages (13 / 13chaos 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, partialcapture,void, webhook verification,PayPal-Request-Ididempotency). - 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) deployingproofpay-web,proofpay-worker, and managedproofpay-postgresPostgreSQL 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
- ag-grid
- anthropic-claude
- apimatic
- drizzle-orm
- groq
- model-context-protocol
- nextjs
- paypal
- postgresql
- react
- render
- typescript
