Security model

Closed adapter architecture

SweepExecutor's constructor fixes exactly two adapter addresses — PancakeV2Adapter and UniswapV3Adapter. There is no registry, no owner-adjustable adapter list, and no way for a plan to name an arbitrary adapter address. A plan can only select AdapterKind.PANCAKE_V2 or AdapterKind.UNISWAP_V3.

Permit2 witness binding

Every signature is a Permit2 SignatureTransfer authorization witnessed to a specific executionPlanHash. A signature for one plan cannot be replayed against a different plan, a different chain, or a different SweepExecutor deployment.

Exact amounts, never unlimited

Permit2 permissions authorize exactly the token amounts a plan requires — never an open-ended allowance.

Three-layer transaction review

Before signing: (1) a canonical intent manifest is hashed, (2) the encoded calldata is decoded and compared field-by-field against that manifest, and (3) the transaction is simulated read-only against live chain state. Signing is blocked if any layer fails.

Independently audited

Contract security verification (fuzzing, invariants, adversarial mocks, fork tests, Slither triage, manual review, and an independent adversarial audit) is documented in PHASE_7_SECURITY_COMPLETION_REPORT.md and docs/threat-model.md.