ClearFills Security & Trust Model (v0.8.0)
ClearFills enforces a strict cryptographic and privilege boundary between untrusted AI agents, deterministic risk evaluation, human approval, and broker execution. AI agents never hold brokerage credentials, Kalshi RSA keys, Polygon private keys, or approval authority.
Core Cryptographic & Privilege Boundaries
- RFC 8785 JCS Canonical Order Digest: Every order payload is canonicalized under RFC 8785 JSON Canonicalization Scheme and hashed with SHA-256 to produce a deterministic
approval_hash. - Split-Key Ed25519 120-Second Policy Tickets: Approved orders receive a single-use Ed25519 signature over
(approval_hash, nonce, exp)with a 120-second TTL. Replaying a spent nonce fails closed withNONCE_ALREADY_SPENT. - Hardware-Bound WebAuthn P-256 Verification (
py_webauthn): Human approvals bind a server nonce and canonical order digest intosha256(nonce:approval_hash)signed in Apple Secure Enclave or a FIDO2 security key, then verified independently inside the localclearfills watchworker usingpy_webauthnbefore broker dispatch. - Token Privilege Separation: Agent tokens (
cf_agk_*and OAuth 2.1cf_oat_*) are strictly propose-only across 17 MCP tools;decide_approvalis removed from/mcpand restricted to human operator sessions (cf_sess_*+ Passkey). - Docker Isolation Kit (
deploy/isolated-worker/): Isolatesclearfills watchand IB Gateway networking in a separate container/UID so a compromised local AI agent running in your shell cannot read worker configs or reach IB Gateway loopback directly. - SHA-256 Hash-Chained Audit Ledger: Every proposal approval, veto, kill-switch event, and fill receipt links to the previous entry hash for tamper-evident verification via
verify_audit_chain.
Open Core (Apache-2.0) vs. ClearFills Cloud
| Module / Capability | Distribution | What Is Included |
|---|---|---|
| Deterministic Risk Firewall & Custom Guards | Open Core (Apache-2.0) | Limit-only orders, mandatory hard stops, NLV/heat caps, cumulative intraday notional and order-rate limits, kill-switch, and @firewall.guard plugins. |
| RFC 8785 Canonical Hashing & Split-Key Ed25519 Verifier | Open Core (Apache-2.0) | Deterministic JCS order digest (approval_hash), 120s single-use Ed25519 attestation tickets, nonce replay protection, and SHA-256 hash-chained audit ledger. |
WebAuthn P-256 Passkey Verifier (py_webauthn) |
Open Core (Apache-2.0) | Independent local verification of Touch ID, Face ID, and hardware security key signatures bound to sha256(nonce:approval_hash). |
Local IBKR clearfills watch Worker & Docker Isolation Kit |
Open Core (Apache-2.0) | Atomic claim loop, 50 bps fresh-quote collar, IBKR parent/child bracket dispatch, and deploy/isolated-worker/ Docker isolation separating worker UIDs from local AI agents. |
| Strategy Envelopes & Local MCP / CLI | Open Core (Apache-2.0) | Signed CPU strategy envelopes, plain-English policy compiler, local stdio MCP server (clearfills mcp), and policy regression suite (clearfills benchmark). |
| Hosted Multi-Entity Console & SnapTrade Sync | ClearFills Cloud | Unified Personal + OpCo + HoldCo + Trust net worth console, 1-tap Approval Inbox, sub-desks with scoped agent keys, and read-only SnapTrade (20+ brokerages) sync. |
| Cloud Venue Adapters & Multi-Channel Alerts | ClearFills Cloud | Hosted Alpaca Paper/Live, Kalshi v2, and Polymarket CLOB coordination, plus Push (Mobile & Web), Telegram, Email, SMS, and Slack alerts. |
| Tax, FX & Epistemic Compliance Engines | ClearFills Cloud | CCPC $50k SBD passive-income tracker, cross-entity wash-sale and superficial-loss guard, Canada-US Treaty Art. XXI & PFIC checks, FX spread router, and SEC EDGAR XBRL verifier. |
Explore more: Home | /audit | /docs | /docs/security | /docs/deep-dive | /challenge | /console | /llms.txt