Skip to content

feat(rfq): add TypeScript SDK interfaces for quote backend integration #36

Description

@0xMuang

RFQ backend를 직접 운영용 서버로 제공하는 것이 아니라, 운영자나 MVP demo backend가 Corner Store RFQAdapter와 호환되는 quote backend를 만들 수 있도록 TypeScript SDK 인터페이스와 helper를 정리한다.

현재 services/rfq에는 quote typed-data 생성과 signing smoke test가 있지만, 아직 backend SDK로 쓰기 좋은 signer / nonce / pricing / validation 경계가 충분히 분리되어 있지 않다.

이 이슈의 목표는 이후 MVP용 RFQ backend를 만들기 전에, 그 기반이 되는 SDK 레이어를 먼저 정리하는 것이다.

Scope

  • RFQ backend SDK 인터페이스 정리
    • signer interface
    • nonce store interface
    • pricing provider interface
    • inventory/risk precheck placeholder
  • 기존 EIP-712 typed-data / quote generation 로직을 재사용 가능한 SDK 형태로 정리
  • quote request validation 강화
    • address format
    • uint-safe amount handling
    • TTL / expiry
    • chainId
    • verifyingContract
    • venue binding
  • local-only reference example 추가
    • mock pricing
    • in-memory nonce
    • no custody
    • no production key management
  • smoke test 추가/정리
    • quote generation
    • nonce uniqueness
    • unsafe number rejection
    • invalid request rejection
    • typed-data shape compatibility with RFQAdapter

Non-goals

  • Production RFQ server 제공 안 함
  • Hosted backend 제공 안 함
  • Market-making strategy 구현 안 함
  • Custody / inventory management 구현 안 함
  • Production signer/key custody 구현 안 함
  • Backend에서 compliance 최종 판단 안 함
  • Dashboard 구현 안 함

Acceptance criteria

  • services/rfq가 SDK-style interfaces와 helpers를 제공한다.
  • 기존 quote generation은 RFQAdapter와 호환성을 유지한다.
  • local reference example이 mock pricing + in-memory nonce로 signed quote를 생성할 수 있다.
  • tests가 quote generation, validation, nonce behavior, typed-data shape를 검증한다.
  • 문서에서 RFQ backend 운영 책임은 integrator/operator에게 있고, Corner Store는 SDK와 local example만 제공한다고 명확히 설명한다.

Follow-up

이 이슈 이후 별도 이슈/브랜치에서 MVP demo backend 마일스톤을 문서화한다.

후속 작업 예시:

  • feat(demo): add MVP RFQ backend using the RFQ SDK
  • 사용자 관점 flow 정리
    • quote 요청
    • signed quote 반환
    • Router/RFQAdapter 제출
    • compliance 통과/실패 확인
  • BUIDL-like demo asset과 연결되는 local demo config 정리
  • 필요 시 CLI 또는 dashboard는 별도 이슈로 분리

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions