feat(rfq): add reference RFQ settlement adapter and quote signer#21
Open
0xMuang wants to merge 3 commits into
Open
feat(rfq): add reference RFQ settlement adapter and quote signer#210xMuang wants to merge 3 commits into
0xMuang wants to merge 3 commits into
Conversation
Implement the smallest reference RFQ path that preserves the existing Router/Adapter boundary while adding an offchain quote signer seam for future dealer work. Constraint: Keep the root Foundry layout and use the existing ExecutionRouter/VenueRegistry adapter slot. Rejected: Production dealer pricing, inventory, custody, cancellation, and partial-fill support | outside RFQ v1 reference settlement scope. Confidence: high Scope-risk: moderate Directive: Keep services/rfq reference-only until production dealer, custody, and cancellation decisions are specified. Tested: forge fmt; forge build; forge test --offline; cd services/rfq && npm test; git diff --check; scripts/check.sh Not-tested: Production dealer approval, custody, quote cancellation, partial fill, and live backend API deployment.
Refresh the roadmap and quality/testing/security docs so the branch describes the implemented foundation, AMM/RFQ reference paths, and remaining production milestones instead of the old Counter-era state. Constraint: Keep this as documentation and CI scope only; do not change runtime contracts after RFQ validation. Rejected: Large roadmap rewrite or new production RFQ policy decisions | the branch only needs current-state alignment before PR. Confidence: high Scope-risk: narrow Directive: Treat RFQ dealer approval, custody, cancellation, partial fill, and Order Book as follow-up features until separately specified. Tested: scripts/check.sh; git diff --check Not-tested: GitHub-hosted CI execution after adding RFQ service smoke step.
The CI install only includes TypeScript, so the smoke test should not rely on Node ambient globals unless @types/node is intentionally added. Constraint: Avoid adding dependencies for the minimal RFQ reference service. Rejected: Add @types/node | unnecessary for a one-line failure path. Confidence: high Scope-risk: narrow Directive: Keep services/rfq dependency-light until a real API/runtime requires Node typings. Tested: cd services/rfq && npm test Not-tested: GitHub-hosted CI rerun after push.
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.
Summary
Closes #20.
RFQ v1 reference settlement를 구현하고, 현재 코드 상태에 맞춰 roadmap / milestone 문서를 최신화했습니다.
이번 PR은 루트 Foundry 구조를 옮기지 않고, RFQ를 AMM과 같은
ExecutionRouter/ Adapter 구조에 붙는 모듈형 venue로 추가합니다. 온체인에서는 signed RFQ quote를 검증하고 settlement하며, 오프체인에는 quote를 생성·서명하는 최소 TypeScript reference service를 추가했습니다.What changed
Onchain RFQ settlement
RFQAdapter를 실제 동작하는 reference adapter로 구현했습니다.RFQQuotetype을 추가했습니다.SafeERC20.transferFrom기반으로 taker → maker, maker → taker를 원자적으로 수행합니다.RFQ reference service
services/rfq에 최소 TypeScript quote signer reference service를 추가했습니다.이 서비스는 다음만 담당합니다.
보강한 안전장치:
number입력을 거부합니다.package-lock.json과npm ci경로를 추가했습니다.명시적으로 포함하지 않은 것:
Tests
RFQAdapter 테스트를 추가했습니다.
커버한 케이스:
RFQ service smoke test는 다음을 검증합니다.
Docs / project state
FEATURES.md,PROGRESS.md,QUALITY.md,docs/testing.md,docs/security.md를 현재 코드 상태에 맞췄습니다.scripts/check.sh와 GitHub Actions CI에 RFQ service smoke test를 포함했습니다.Non-goals
이번 PR에서 의도적으로 제외한 범위입니다.
Verification
다음 검증을 통과했습니다.
결과:
scripts/check.sh: 10 passedNotes / remaining follow-up
ComplianceEngine.evaluate()로 수행합니다.