docs(uniswap): vendor integration plan, reconciled with reality (PR-0)#28
Merged
Conversation
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
PR-0 of the UniswapX × Rustok delivery roadmap: vendor the integration plan into
meta/docs/UNISWAP-INTEGRATION.mdas the versioned source of truth (private), reconciled against verified facts. Docs-only.Reconciliations (vs the original
~/Downloads/PLAN.md)testnet-firstfrom Controls (kept limits / approval thresholds / kill switch).Spike findings folded in (2026-06-23, live Trading API
/quote)permitDatadigest byte-for-byte — proven feasible; wired in code for post-fill today, the quote-time path lands in PR-2.UnsignedV2DutchOrder(pre-cosign), notCosignedV2DutchOrder.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 againstcore/crates/grpc/src/server.rsand the spike.Docs-only;
metaCI validates compose/Caddyfile and does not lint markdown.