Skip to content

docs(uniswap): vendor integration plan, reconciled with reality (PR-0)#28

Merged
temrjan merged 1 commit into
mainfrom
docs/uniswap-integration-plan
Jun 23, 2026
Merged

docs(uniswap): vendor integration plan, reconciled with reality (PR-0)#28
temrjan merged 1 commit into
mainfrom
docs/uniswap-integration-plan

Conversation

@temrjan

@temrjan temrjan commented Jun 23, 2026

Copy link
Copy Markdown
Member

What

PR-0 of the UniswapX × Rustok delivery roadmap: vendor the integration plan into meta/docs/UNISWAP-INTEGRATION.md as the versioned source of truth (private), reconciled against verified facts. Docs-only.

Reconciliations (vs the original ~/Downloads/PLAN.md)

  • No testnet for UniswapX. Verified: UniswapX V2 is mainnet-only (Ethereum/Arbitrum/Base/Unichain) — there is no testnet resolver network. So M1 gates are validated on a mainnet-fork + adversarial-order fixtures; execution = a tiny mainnet swap. The M1 criterion (a gate rejects a deliberately bad order) is fork-based and routing-size-independent.
  • Dropped testnet-first from Controls (kept limits / approval thresholds / kill switch).
  • Net-new infrastructure named explicitly (fork harness · evil-order corpus · exposure-seam design note · Trading API client · TS→core transport · submit/orchestration).
  • Load-bearing invariants recorded: reconstruct-before-sign · no signing path bypasses the gates · a signed order is a bearer instrument until deadline (cancel by spending its Permit2 nonce) · freshness = refuse-to-sign-when-stale.
  • Phased PR roadmap + the effectiveness-over-plan principle embedded; the gates-location / transport fork is left to a spike + design note, not frozen.

Spike findings folded in (2026-06-23, live Trading API /quote)

  • The verifier reproduces the API permitData digest byte-for-byte — proven feasible; wired in code for post-fill today, the quote-time path lands in PR-2.
  • Quote-time order is an UnsignedV2DutchOrder (pre-cosign), not CosignedV2DutchOrder.
  • Routing is size-dependent (small swaps route CLASSIC) — flagged as an open fork.
  • Decode + gates live in the glue/orchestrator, not core (core signs two hashes and never sees the order).

Review

Reviewer: APPROVED WITH NITS — both MINORs (DONE-split for post-fill vs quote-time; decode/gate localized to the glue, not txguard) folded in this round, plus NIT-3/4/5 (not-yet-wired wording · Permit2-nonce abort · M1 fork-independence). Facts cross-checked against core/crates/grpc/src/server.rs and the spike.

Docs-only; meta CI validates compose/Caddyfile and does not lint markdown.

Vendor the UniswapX × Rustok integration plan into meta/docs as the versioned
source of truth, reconciled against verified facts:

- UniswapX has no testnet resolver network → M1 gates validated on a
  mainnet-fork + adversarial-order fixtures; execution = tiny mainnet swap
  (was "on testnet"). M1 criterion (a gate rejects a deliberately bad order)
  is fork-based and routing-size-independent.
- Drop "testnet-first" from Controls (keep limits / approval thresholds /
  kill switch).
- Name net-new infrastructure explicitly (fork harness, evil-order corpus,
  exposure-seam design note, Trading API client, TS->core transport, submit).
- Record load-bearing invariants: reconstruct-before-sign; no signing path
  bypasses the gates; a signed order is a bearer instrument until deadline
  (cancel by spending its Permit2 nonce); freshness = refuse-to-sign-when-stale.
- Embed the phased PR roadmap + the effectiveness-over-plan principle; leave
  the gates-location / transport fork to a spike + design note, not frozen.
- Fold in spike findings: quote-time order is UnsignedV2DutchOrder (pre-cosign);
  routing is size-dependent; the verifier reproduces the API permitData digest
  byte-for-byte (proven feasible; wired in code for post-fill today, quote-time
  path lands in PR-2). Decode + gates live in the glue/orchestrator, not core
  (core signs two hashes and never sees the order).
@temrjan temrjan merged commit e7d66af into main Jun 23, 2026
1 check passed
@temrjan temrjan deleted the docs/uniswap-integration-plan branch June 23, 2026 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant