DEV Community

ABROWNFOX001
ABROWNFOX001

Posted on

TWAP60 Is the Target Variable

GitHub: https://github.com/abrownfox0/abrownfox001-twap60-prediction-trigger-system

YouTube walkthrough: https://www.youtube.com/watch?v=XzhugRL6BV4

Part 1 defined the engine.

Part 2 is the settlement target the engine is built to predict.

Live profile: @abrownfox001

Current Rule

Polymarket short crypto Up/Down markets settle on Chainlink TWAP.

Duration Current window
5-minute 60-second TWAP
15-minute 60-second TWAP
4-hour 60-second TWAP

5-minute markets started on a 30s window, then moved to 60s for markets deployed since August 14, 2026.

The README still documents the older 30s wording in places. Live production should treat 60s as the 5m target.

60 seconds is a lookback, not an update frequency.

State Variables That Matter

twap_open = 60s Chainlink TWAP at slot start
twap_now  = latest 60s Chainlink TWAP
t_left    = seconds remaining
Enter fullscreen mode Exit fullscreen mode

Auxiliary only:

  • CEX mid for lead-lag (cexFeed.ts)
  • flow / book features
  • time-in-slot calibration

Not a primary target:

  • Binance last
  • Coinbase close guess
  • leftover 30s logic on new 5m markets

Signal Shape

Private layer:

[
P(up)t = f(\text{TWAP path vs } twap{open},\ \text{lead-lag},\ \text{flow},\ t_{left})
]

Rules:

  1. Anchor to the official series first
  2. Use CEX only as timing context
  3. Treat a 52% read at t=20s as different from 52% at t=280s
  4. Keep output calibrated as probability
  5. Pin open and score live path on the same 60s window

The formula stays closed. The structure does not need to.

Code Map

Module Job
twapFeed.ts Chainlink TWAP via Polymarket RTDS
signal.ts P(up) vs open reference
cexFeed.ts auxiliary mid
engine.ts consume probability and run the slot

Production feed:

  • RTDS 60s topic / windowSeconds: 60
  • exact filter {"symbol":"btc/usd"}
  • freshness on observation time
  • exact decimal / bigint math

Why the 30s → 60s Move Matters

Smoother series means:

  • spike features lose power
  • scratch thresholds shift
  • open-reference mismatch becomes a silent killer
  • any snapshot model is now research-only

This is why the public repo is framed as a TWAP60 prediction-trigger system. The trigger is not “price moved.” It is “the official average path now implies a tradeable probability.”

What Part 3 Covers

Once P(up) exists: staggered mid-band entries, 10–30s re-score, scratch vs redeem.

Links

Not financial advice. Verify the live market’s resolution source.

If you have more questions, please feel free to contact me at any time: https://t.me/abrownfox001

My Polymarket Activity: https://polymarket.com/@abrownfox001?tab=activity




**Tags:** `#Polymarket #TWAP #Chainlink #BTC #TradingBot`
Enter fullscreen mode Exit fullscreen mode

Top comments (0)