Skip to content

Commit 7ac2ce8

Browse files
committed
Merge main into reference CLI
Resolve the stacked PR branch after main advanced with live-Anvil E2E and earlier RFQ/compliance work. Constraint: PR #30 must land after #29 as the final stacked CLI layer. Confidence: high Scope-risk: moderate Directive: Reconcile BUIDL/demo and roadmap state after the remaining independent PRs merge. Tested: git diff --check; git diff --cached --check Not-tested: full local scripts/check.sh for this conflict-only reconciliation; rely on GitHub CI after push
2 parents b3a47f9 + 65029e5 commit 7ac2ce8

20 files changed

Lines changed: 1293 additions & 78 deletions

DECISIONS.md

Lines changed: 48 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,52 @@ Router 밖 경로는 production deployment에서 다음 중 하나로 처리해
255255
- `ARCHITECTURE.md`
256256
- `docs/architecture/execution-routing.md`
257257

258-
## D007 — RFQ v2 hardening: maker approval, full-fill, non-custodial, nonce-scoped cancel
258+
## D007 — PD-1~PD-7 Phase 1 architecture baseline을 확정한다
259+
260+
Date: 2026-07-14
261+
262+
### Context
263+
264+
Phase 1 구현 전에 Manifest schema, Recipe evaluation, post-trade state,
265+
identity claim, enforcement action, governance와 lifecycle record 보존 방식에
266+
대한 개발팀 합의가 필요했다.
267+
268+
이 결정들은 BUIDL-like demo나 RFQ/API 구현보다 상위의 아키텍처 baseline이다.
269+
270+
### Decision
271+
272+
PD-1~PD-7을 Phase 1 architecture baseline으로 확정한다.
273+
274+
- PD-1: Manifest는 explicit core + registry-backed `RecipeBinding` 구조를 사용한다.
275+
- PD-2: Router/Engine은 Manifest-level multi-Recipe binding 모델을 사용한다.
276+
- PD-3: token transfer 기준 acquisition timestamp와 router execution context를 분리하고, post-trade commit은 idempotent하게 처리한다.
277+
- PD-4: investor qualification은 ERC-3643/ONCHAINID claim pipeline을 기본 인터페이스로 사용하고, Securitize/TA는 adapter boundary로 연동한다.
278+
- PD-5: `BLOCK`, `FLAG_ONLY`, `OPERATOR_REVIEW` 중심의 enforcement action 모델과 constrained override를 사용한다.
279+
- PD-6: governance authority는 외부 Safe-style multisig를 사용하고, compliance relaxation은 timelock을 요구한다.
280+
- PD-7: Manifest lifecycle은 semantic versioning, append-only history, central pause state와 hash-anchored record preservation을 사용한다.
281+
282+
### Alternatives Considered
283+
284+
- PD별 ADR을 7개로 분리: 현재 결정들이 하나의 Phase 1 구조 freeze를 구성하므로
285+
단일 baseline ADR로 묶는 편이 리뷰와 추적에 더 적합해 보류한다.
286+
- 현행 `issuanceRecipeId + fundRecipeId` 구조 유지: BUIDL-like demo에는 충분하지만
287+
future policy 조합과 path option을 표현하기 어려워 transitional 구조로만 남긴다.
288+
- Corner Store 전용 identity model 신설: ERC-3643/T-REX와 ONCHAINID 호환성을
289+
해치고 TA/KYC provider 연동성이 떨어져 제외한다.
290+
291+
### Consequences
292+
293+
- PD-1~PD-7은 더 이상 열린 구조 질문이 아니며, 후속 작업은 구현 명세와 migration issue로 진행한다.
294+
- 현재 코드의 transitional 구조는 별도 implementation branch에서 `RecipeBinding[]`, compiled plan, lifecycle registry 등으로 이전해야 한다.
295+
- 실제 Securitize/TA 연동은 공식/current interface 확인 후 별도 refinement issue에서 처리한다.
296+
297+
### Related Files
298+
299+
- `docs/decisions/ADR-007-pd-architecture-decisions.md`
300+
- `docs/decisions/decision-register.md`
301+
- `docs/architecture/phase1-structural-decisions-proposed.md`
302+
303+
## D008 — RFQ v2 hardening: maker approval, full-fill, non-custodial, nonce-scoped cancel
259304

260305
Date: 2026-07-04
261306

@@ -310,7 +355,7 @@ RFQ venue의 다음 정책을 확정한다.
310355
- `src/execution/adapters/rfq/RFQAdapter.sol`
311356
- `FEATURES.md`
312357

313-
## D008 — Reg D 506(c) recipe를 9-element reference set으로 확장한다
358+
## D009 — Reg D 506(c) recipe를 9-element reference set으로 확장한다
314359

315360
Date: 2026-07-04
316361

@@ -380,7 +425,7 @@ criteria remain approval-gated").
380425
- `test/unit/compliance/Recipes.t.sol`, `test/unit/compliance/Engine.t.sol`
381426
- `docs/ROADMAP.md`
382427

383-
## D009 — Manifest lifecycle를 validated state machine로 만들고 engine을 default-deny로 닫는다
428+
## D010 — Manifest lifecycle를 validated state machine로 만들고 engine을 default-deny로 닫는다
384429

385430
Date: 2026-07-04
386431

FEATURES.md

Lines changed: 40 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ passing
151151

152152
### Notes
153153

154-
- 정책 결정: D007(maker approval adapter-local, full-fill, non-custodial,
154+
- 정책 결정: D008(maker approval adapter-local, full-fill, non-custodial,
155155
nonce-scoped idempotent cancel).
156156
- Non-goals: partial fill, dealer inventory, signer key custody, shared dealer
157157
registry.
@@ -192,13 +192,28 @@ passing
192192
SwapFlow, Engine)는 shared setup helper로 9-element attestation을 추가해 유지.
193193
- `forge fmt`.
194194

195+
## DOC-002 — RFQ SDK and MVP Demo Planning
196+
197+
### Behavior
198+
199+
- RFQ backend 운영을 Corner Store가 제공하지 않는다는 제품 경계를 명확히 한다.
200+
- RFQ backend SDK, local reference example, MVP demo backend를 서로 다른 레이어로 분리한다.
201+
- 구현 순서는 SDK interface 정리 → local reference example → MVP demo backend로 기록한다.
202+
- production RFQ hardening(dealer approval, custody, cancellation, partial fill)은 별도 트랙으로 유지한다.
203+
- roadmap과 product spec index에서 RFQ SDK/MVP backend 후속 작업을 찾을 수 있다.
204+
205+
### Verification
206+
207+
- RFQ venue architecture, product-spec index, roadmap, FEATURES, PROGRESS 교차 검토
208+
- `git diff --check`
209+
195210
### State
196211

197212
passing
198213

199214
### Notes
200215

201-
- 정책 결정: D008(9-element in-place 확장, operator-gated setter, Lockup은
216+
- 정책 결정: D009(9-element in-place 확장, operator-gated setter, Lockup은
202217
fixture-only mock acquisition source).
203218
- Deferred follow-up: ungated legacy mock element(A-01/A-03/QP)의 operator-gate
204219
정렬, production data source 연결, acquisition/lot data source와 holding-period
@@ -287,17 +302,35 @@ passing
287302
- 기존 registry lifecycle state-machine unit test(Task 1, 25 tests)는 유지.
288303
- `forge fmt`.
289304

305+
- Product spec: `docs/product-specs/rfq-backend-sdk-and-demo.md`
306+
- 이 feature는 문서 계획 작업이며 `services/rfq` 구현은 후속 feature에서 진행한다.
307+
308+
## RFQ-SDK-001 — RFQ Backend SDK Interfaces
309+
310+
### Behavior
311+
312+
- `services/rfq`가 RFQ backend를 만들기 위한 TypeScript SDK helper를 제공한다.
313+
- integrator는 `createRFQService(...).quote(...)` high-level API로 taker/token/amount/venue만 넣고 `RFQAdapter` 호환 signed quote를 받을 수 있다.
314+
- SDK는 EIP-712 typed-data shape, chainId/verifyingContract binding, nonce, expiry, amount validation과 signature flow를 처리한다.
315+
- signer, nonce store, pricing provider, inventory/risk check는 교체 가능한 interface로 제공한다.
316+
- local reference component는 `InMemoryNonceStore`, `FixedRatePricingProvider`, `NoopInventoryRiskCheck`로 제한한다.
317+
- production server, hosted backend, pricing strategy, signer custody, inventory management와 compliance final decision은 범위 밖이다.
318+
319+
### Verification
320+
321+
- `cd services/rfq && npm test`
322+
- `scripts/check.sh`
323+
- `git diff --check`
324+
290325
### State
291326

292327
passing
293328

294329
### Notes
295330

296-
- 정책 결정: D009(lifecycle state machine, enum-append, setStatus 제거, engine
297-
positive-allowlist default-deny, clearUnregulated correction path, declaredBy=
298-
msg.sender와 factory consequence).
299-
- Non-goals: direction-aware element application, production onboarding governance
300-
key management.
331+
- SDK README: `services/rfq/README.md`
332+
- Product spec: `docs/product-specs/rfq-backend-sdk-and-demo.md`
333+
- MVP demo backend는 이 SDK를 기반으로 후속 feature에서 구현한다.
301334

302335
## CLI-001 — corner-store Reference CLI
303336

PROGRESS.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ source of truth로 사용한다.
2525
- `CMP-002 — Manifest Lifecycle & Operator Approval Flow`(validated state machine,
2626
setStatus 제거, engine positive-allowlist default-deny, clearUnregulated,
2727
factory register→approve)
28+
- `DOC-002 — RFQ SDK and MVP Demo Planning`
29+
- `RFQ-SDK-001 — RFQ Backend SDK Interfaces`
2830
- multi-venue 아키텍처와 책임 문서 작성
2931
- Corner Store용 Uniswap v3 최소 배포 profile 분리와 테스트
3032
- ExecutionRouter/VenueRegistry/VenueSelector와 AMM reference adapter skeleton
@@ -33,7 +35,7 @@ source of truth로 사용한다.
3335
- RFQ-002: operator-curated maker approval allowlist(`setMakerApproved`,
3436
`RFQMakerNotApproved`), maker-initiated nonce-scoped idempotent cancellation
3537
(`cancelQuoteNonce`/`cancelQuoteNonces`, `RFQQuoteCancelled`), venueType binding
36-
fix, `docs/rfq-threat-model.md` 위협 모델과 D007 결정 기록
38+
fix, `docs/rfq-threat-model.md` 위협 모델과 D008 결정 기록
3739
- legacy mock element(Sanctions A-01, AccreditedInvestor A-03, QualifiedPurchaser
3840
A-13)의 attestation setter를 `Governed`/`onlyOperator` + 이벤트로 정렬해 CMP-001
3941
이후 hardening divergence를 닫았다(Lockup C-01은 settable mutator가 없어 변경 없음).
@@ -64,16 +66,21 @@ source of truth로 사용한다.
6466

6567
## Next
6668

67-
1. acquisition/lot data source와 holding-period Recipe 활성화 조건을 결정한다
69+
1. MVP RFQ demo backend milestone/user flow를 별도 문서·feature로 구체화한다.
70+
기존 live-Anvil E2E/CLI 경로를 재사용한다.
71+
2. pending RFQ/E2E/CLI/BUIDL PR stack(#35)이 머지된 뒤
72+
roadmap과 feature 상태를 재조정한다.
73+
3. 남은 RFQ production policy를 별도 feature로 분리한다: custody, partial fill,
74+
production dealer/operator 책임.
75+
4. acquisition/lot data source와 holding-period Recipe 활성화 조건을 결정한다
6876
(C-01 Lockup은 현재 fixture-only mock acquisition source).
69-
2. 실제 Uniswap v3 pool 배포를 demo/E2E에 연결한다(현재 AMM venue는 MockPool;
77+
5. 실제 Uniswap v3 pool 배포를 demo/E2E에 연결한다(현재 AMM venue는 MockPool;
7078
`tools/deploy-v3` vendor isolation 유지).
71-
3. Order Book은 matching/custody/surveillance 모델 결정 후 구현한다.
72-
4. CI hardening(static analysis 등)을 강화한다.
79+
6. Order Book은 matching/custody/surveillance 모델 결정 후 구현한다.
7380

7481
## Last Session Summary
7582

76-
- `CLI-002` (corner-store CLI v2)를 landing했다. src/·script/ 변경 없이 `services/cli`
83+
- #30 merge preparation includes `CLI-002` (corner-store CLI v2) on top of current main. src/·script/ 변경 없이 `services/cli`
7784
명령 7개(check/sell/balances/watch/faucet/snapshot/restore/quote-inspect)를 더했다.
7885
- 변경한 파일:
7986
- CLI: `services/cli/src/`(abi/config/rfq/commands/index), `services/cli/test/smoke.ts`,

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,14 @@ forge fmt
9797
anvil
9898
```
9999

100-
### RFQ Reference Service
101-
102-
`services/rfq` is a minimal quote signer reference for RFQ v1. It builds the
103-
same EIP-712 typed data that `RFQAdapter` verifies, assigns expiry and nonce,
104-
and returns a signed quote. It is not a production dealer, pricing engine,
105-
inventory manager, custody service, websocket feed, orderbook, or compliance
106-
decision engine.
100+
### RFQ TypeScript SDK
101+
102+
`services/rfq` provides TypeScript SDK helpers for RFQ quote backends. It builds
103+
the same EIP-712 typed data that `RFQAdapter` verifies, assigns expiry and
104+
nonce, signs quotes through a caller-provided signer, and exposes pricing, nonce
105+
and risk-check interfaces for integrators. It is not a hosted production RFQ
106+
server, dealer, pricing engine, inventory manager, custody service, websocket
107+
feed, orderbook, or compliance decision engine.
107108

108109
```shell
109110
cd services/rfq

docs/ROADMAP.md

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,8 @@ Deliverables:
251251
- signature, nonce, expiry와 taker binding
252252
- Router-only RFQ Adapter와 latest compliance evaluation
253253
- 최소 TypeScript quote signer reference service
254+
- RFQ backend SDK interface와 local reference example 계획은 `docs/product-specs/rfq-backend-sdk-and-demo.md`를 따른다.
255+
- MVP demo backend는 SDK 정리 이후 별도 feature로 구현한다.
254256
- partial fill policy는 v1 non-goal로 유지
255257

256258
Completion:
@@ -317,16 +319,27 @@ SDK와 reference DEX를 반복 배포하고 Manifest/권한 상태를 검증 가
317319

318320
## Near-Term Issues
319321

322+
Open PR context:
323+
324+
- #24 covers RFQ maker approval and quote cancellation hardening.
325+
- #28 covers protected-router RFQ integration scenarios.
326+
- #29 covers live-Anvil E2E/demo runner.
327+
- #30 covers interactive CLI over the deployed demo stack.
328+
- #35 covers BUIDL-like ERC-3643 compliance fixture with mock TA facts.
329+
320330
가까운 후속 이슈:
321331

322-
1. `design(rfq): dealer/operator approval, custody, cancellation, partial-fill policy 확정`
323-
2. `security(rfq): direct venue, signer, custody, replay, quote-cancellation threat model 작성`
324-
3. `feat(compliance): production Asset Compliance Manifest lifecycle/schema 구현`
325-
4. `design(compliance): acquisition/lot data source와 holding-period Recipe 활성화 조건 결정`
326-
5. `test(e2e): live Anvil deployment와 regulated RFQ/AMM settlement smoke 자동화`
327-
6. `feat(orderbook): matching/custody/surveillance 모델 결정 후 Order Book adapter 구현`
328-
7. `chore(ci): deploy-v3 CI, static analysis, lint/warning budget 추가`
329-
8. `docs(ops): Manifest activation/suspension runbook과 incident drill 문서화`
332+
1. `feat(rfq): add TypeScript SDK interfaces for quote backend integration`
333+
2. `docs(demo): define MVP RFQ backend milestone and user flow`
334+
3. `feat(demo): add MVP RFQ backend using the RFQ SDK` — PR #29/#30이 머지되면 해당 E2E/CLI 경로를 재사용한다.
335+
4. `docs(roadmap): reconcile roadmap after pending RFQ/E2E/CLI/BUIDL PR stack merges`
336+
5. `design(rfq): remaining production RFQ policy beyond PR #24` — custody, partial fill, production dealer/operator 책임.
337+
6. `security(rfq): direct venue, signer custody, replay, quote-cancellation threat model 보강`
338+
7. `feat(compliance): production Asset Compliance Manifest lifecycle/schema 구현`
339+
8. `design(compliance): acquisition/lot data source와 holding-period Recipe 활성화 조건 결정`
340+
9. `feat(orderbook): matching/custody/surveillance 모델 결정 후 Order Book adapter 구현`
341+
10. `chore(ci): static analysis, lint/warning budget 추가`
342+
11. `docs(ops): Manifest activation/suspension runbook과 incident drill 문서화`
330343

331344
## Decision Backlog
332345

0 commit comments

Comments
 (0)