ClearFills Technical Deep Dive & Honest Threat Model (v0.8.0)

ClearFills publishes explicit cryptographic primitives and an honest threat model stating what each deployment mode defends against and where additional OS or hardware isolation is required. Note that Fly.io runs Firecracker microVMs, not hardware TEEs; protecting against cloud hypervisor inspection requires the AWS Nitro Enclave Enterprise VPC kit.

Honest Threat Model Matrix

Attack Vector Mitigation Deployment Mode Required
Prompt-injected AI submits rogue market or oversized order Deterministic Guard Packs + custom Python guards (MARKET_ORDER_FORBIDDEN, MISSING_HARD_STOP, notional/heat/tax caps) and decide_approval removed from /mcp. Local Open Core ($0) or Cloud
Compromised agent key (cf_agk_ / cf_oat_) tries to self-approve Token-prefix separation: agent keys cannot call approval endpoints; only human cf_sess_ + WebAuthn P-256 co-sign can approve. Cloud + Dual-Key Passkey
Replay or parameter tampering between approval and execution RFC 8785 JCS digest + 120s single-use Ed25519 nonce + WebAuthn P-256 signature verified independently in clearfills watch + 50 bps fresh-quote collar. Local Open Core or Cloud + clearfills watch
Compromised ClearFills Cloud server tries to forge an order clearfills watch rejects any order lacking a valid user WebAuthn P-256 signature over approval_hash; Polymarket requires local MetaMask EIP-712 signing. Cloud + Dual-Key Passkey + Local clearfills watch / MetaMask
Cloud host operator / hypervisor inspection of in-memory keys Hardware-isolated AWS Nitro Enclave with cryptographic PCR attestation and KMS/HSM Ed25519 key release. AWS Nitro Enclave (Enterprise VPC kit)
Untrusted Portfolio / Clock Spoofing: agent fabricates NAV, positions, or timestamps to bypass risk caps Trusted PortfolioProvider reads authoritative broker or ledger state outside the agent context, enforces a server-side UTC clock (ignoring agent-supplied timestamps), and applies cumulative intraday notional and order-rate caps. Local Open Core ($0) or Cloud (with PortfolioProvider)
Same-UID Shell Exposure: compromised local agent shares an OS user with clearfills watch or IB Gateway Run clearfills watch inside deploy/isolated-worker/ Docker, under a separate OS user, or on a remote Tailscale VM so the agent cannot read worker configs or reach IB Gateway loopback, paired with pinned hardware Passkey co-signing. Isolated Docker / separate OS user / Tailscale VM + Passkey

Explore more: Home | /audit | /docs | /docs/security | /docs/deep-dive | /challenge | /console | /llms.txt