KingSparta69 GitHub avatar

chainlink-twap-research

KingSparta69

这是一个 TypeScript 研究工具集,用于探索 Polymarket 的 Chainlink TWAP 价格,支持解码已签名的 V2 报告、从 Chainlink Data Streams 与 Polymarket RTDS 获取数据,并对比现货与 TWAP。

Stars

38

7 天增长

暂无数据

Fork 数

73

开放 Issue

0

开源协议

暂无数据

最近更新

2026-07-31

AI 仓库情报摘要
FR-AI / ANALYSIS

为什么值得关注

它填补了 Polymarket 现货预言机与未来 Chainlink TWAP 中继之间的空白,提供精确的 E18 十进制处理、feed ID 映射,以及用于实时对比和记录的 CLI 命令。

适合谁使用

  • 集成 Polymarket 加密市场决议的开发者
  • 研究 Chainlink TWAP 与现货价格行为的研究人员
  • 关注 Polymarket 收盘价数据的交易者或分析师
  • 使用 Chainlink Data Streams 签名报告的后端工程师

典型使用场景

  • 在市场临近收盘时比较现货与 30 秒/60 秒 TWAP 价格
  • 流式接收并记录 Chainlink 签名 TWAP 报告以进行分析
  • 将 feed ID 映射到资产和时间窗口以解码报告
  • 为 2026 年 Polymarket RTDS TWAP 中继上线做准备

项目优势

  • 使用精确十进制字符串处理 E18 定点数,避免 JavaScript number 精度损失
  • 同时支持 Chainlink Data Streams 直连和 Polymarket RTDS 中继两种方式
  • 提供 selfcheck、watch、compare、analyze 等实用 CLI 命令
  • 清晰记录 observationsTimestamp 等时间戳和 schema V2 字段,便于验证新鲜度

使用前须知

  • RTDS TWAP 流要到 2026 年 8 月 4 日才上线,目前生产级中继测试受限
  • 直连 Chainlink 需要凭证,且只能在可信后端运行,不能暴露到浏览器
  • 解析器不验证 DON 签名,且测试网 feed ID 是临时的,需等待主网 ID 发布

README 快速开始

Chainlink TWAP Research

TypeScript tooling to explore Polymarket Chainlink TWAP prices: Chainlink-computed 30-second and 60-second time-weighted average prices (TWAPs) for crypto assets used in Polymarket resolution.


What is Chainlink TWAP?

Polymarket crypto markets (e.g. BTC Up/Down 5m) resolve against Chainlink, not Binance or Coinbase spot. Today most tooling streams the spot oracle (crypto_prices_chainlink on RTDS) — a point-in-time Chainlink price tick. TWAP is a different product: a time-weighted average over a fixed lookback window, computed and signed by Chainlink’s Data Streams DON.

Spot oracle (crypto_prices_chainlink)Chainlink TWAP
What it isLatest Chainlink observationAverage price over the last 30s or 60s
Who computes itRelayed via Polymarket RTDSChainlink Data Streams (signed report)
Typical useLive charts, near-close momentumSettlement-style averaging, smoother reference
Available nowYes (RTDS)Testnet via credentials; RTDS relay Aug 4, 2026
Value formatJS number or decimal stringSigned E18 fixed-point (bigint / exact decimal string)

Lookback window ≠ update frequency

The 30 and 60 refer to the lookback window in seconds, not how often reports arrive. Chainlink computes the TWAP over that window and signs a report; update cadence is independent. Do not infer the window from message spacing — use observationsTimestamp (Chainlink observation time) for freshness.

Two windows, two feeds per asset

Each asset has separate feed IDs for 30s and 60s TWAP. Reports do not include symbol or window labels in the payload — you must map report.feedID yourself (see src/feeds.ts).

Example BTC/USD testnet:

WindowFeed ID
30s0x00027603752fe85a4c86c3adcc71abcb5ed826831d8afd4fd746a11c10cee188
60s0x0002e64f0b0166fa748cc05cd510a11442be16279873574f98c8cfa06b42b3dd

Supported testnet symbols: BTC, ETH, SOL, XRP, DOGE, LINK, BNB, TRX, ZEC, HYPE — each with 30s + 60s feeds (full table in docs).

Signed reports (schema V2)

Chainlink TWAP f

项目描述

chainlink twap research engine with 30-sec and 60-sec windows

相关仓库与替代方案

根据分类、Topic 和编程语言匹配的相似项目。

makecindy
精选
makecindy GitHub avatar

cindy

Cindy is an open-source AI agent that runs locally on your machine, integrates multiple AI harnesses and models, and provides memory, skills, and automation to perform real work in your projects and apps.

AI 与机器学习大语言模型
958
mereyabdenbekuly-ctrl
精选
mereyabdenbekuly-ctrl GitHub avatar

clodex-ide

Clodex is an open-source, local-first agentic IDE that combines persistent AI tasks, code, terminal, browser, Git, models, memory, and governed execution in one Electron workspace, currently in technical preview.

AI 与机器学习AI 智能体
859
RongleCat
精选
RongleCat GitHub avatar

grok-app

Grok App is a desktop command center built with Tauri 2 that wraps the local Grok Build CLI into a graphical workbench for managing sessions, projects, media, automations, and accounts.

开发者工具CLI 与终端
356