Skip to content

Capture full-update Polymarket CLOB evidence for token microstructure research #235

Description

@proerror77

Parent

#219

Change contract

Add a research-only Polymarket CLOB evidence stream that preserves every received book update with market_id, token_id, semantic side, source time, received time, sequence or update identity, and reconnect boundaries, so token microstructure models no longer rely on one-second sampled checkpoints.

Acceptance evidence

  • Up and Down updates remain independent streams for every market_id.
  • Every row records source and received clocks plus venue update identity when available.
  • Snapshot seed, reconnect, resubscription, sequence gap, duplicate, empty book, and one-sided book states are explicit.
  • The immutable manifest reports event, token, update, gap, reconnect, latency, and coverage counts.
  • Missing seed, unexplained time reversal, cross-token mixing, or silent sequence loss fails closed.
  • Shadow collection and canonical immutable readback both verify SHA and success markers.
  • Evidence is labeled full-update L2 only; it does not claim L3 queue position, endogenous impact, or full venue completeness that the source cannot prove.

Out of scope

Snapshot evaluator changes; settlement prediction; 15-second target logic; Binance collectors; execution, Paper, or Live.

Dependency and merge order

Depends on #220 quote-state semantics. This is a collector and evidence-contract issue and must not share a PR with research logic.

Focused validation

Use focused fixtures for two tokens in one market, overlapping markets, reconnect, duplicate, gap, empty, and one-sided updates; then run one shadow artifact readback gate.

Rollout and rollback impact

Separate collector deployment unit with one named controller. Rollback returns to sampled evidence without reclassifying historical sampled artifacts as full-update.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestready-for-agentFully specified and safe for an autonomous agent

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions