Security architecture

The product is the boundary.

OpenZaps does not sell invisible autonomy. It sells explicit execution limits: fixed adapters, spend caps, postconditions, private submission, wallet-reviewed policies, and owner revoke paths.

Current postureContracts are deployed on Base, but real-fund creation is not production-cleared.

The repo contains a reference implementation and tests. Production use still needs external audit, formal verification, adapter governance, and a monitored launch path.

Architecture

A user or Safe creates a per-policy capsule through the factory. The capsule holds funds and accepts only owner-signed intents that match the frozen policy hash. Hermes can simulate, submit, monitor, and alert, but cannot choose arbitrary targets, recipients, assets, or calldata.

User / Safe
  -> OpenZapFactory
  -> OpenZap clone with frozen policy
  -> allowlisted adapter
  -> recipient-bound postcondition

Hermes:
  simulate -> submit -> monitor -> alert -> revoke escalation
  no discretionary custody
  no arbitrary calldata

Controls

No arbitrary calls

Execution is restricted to governed adapters and known selectors; not a universal router.

Nonce consumed first

Authorization is consumed before external calls to narrow replay and reentrancy surfaces.

Exact approvals

Approvals are scoped to the exact step amount and reset to zero on success and revert paths.

Balance-delta checks

Postconditions assert tracked output assets, recipient, min-out, and residual allowance.

Private submission

Price-sensitive routes can use private orderflow after late-block simulation.

Owner revoke

The owner can pause, invalidate nonce space, or emergency-exit without Hermes.

Threat model

MEV / sandwiching

Private submission, strict min-out, short deadlines, and public receipt review.

Approval leakage

Exact approvals, zero reset, post-exec allowance checks, and emergency exit.

Scope drift

Policy hash, adapter allowlist, chain-aware nonce, and typed intent domain.

Relayer optionality

Fee caps, allowed submitters, self-submit fallback, and human approval gates.

Oracle manipulation

Liquidity floors, TWAP sanity checks, and blocked protective zaps until review.

Production gates

Production-ready means the system fails closed across contract, interface, relayer, governance, monitoring, and incident-response layers. These gates are intentionally visible in the product.

P0

External audit

Independent review of factory, clone init, EIP-712/1271 verification, approval reset, and adapter boundaries.

P1

Formal checks

Certora or equivalent prover run for AUTH, APPR, SURF, REC, ISO, and TOK invariants.

P2

Adapter governance

Safe plus timelock ownership, adapter bytecode manifests, and rollback process.

P3

Testnet soak

Public testnet with real wallet review, alerts, receipts, and revoke drills.

P4

Incident runbook

Emergency pause, disclosure process, chain-monitor alerts, and postmortem template.

Contracts

Factory0xc7C589...
Adapter registry0x8d62b6...
Token allowlist0x0E6608...