DEV Community

ABROWNFOX001
ABROWNFOX001

Posted on

TWAP60 Is the Settlement Change Bots Still Get Wrong

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

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

Live profile: https://polymarket.com/@abrownfox001

Part 1 mapped the live stack: settlement, rate limits, CLOB V2, SDKs, data.

Part 2 is the first break for a 5-minute crypto engine. If this layer is wrong, better signing and faster cancels just lose money more cleanly.

1. What Actually Shipped

Date Change
Aug 4, 2026 Polymarket RTDS began relaying Chainlink TWAP
Aug 7, 2026 Crypto Up/Down left snapshot settlement
Aug 7 launch mapping 5m → 30s TWAP; 15m/4h → 60s TWAP
Aug 14, 2026 5m crypto moved to 60s TWAP on markets deployed since that date

Current binding rule for new 5-minute BTC Up/Down:

Official target = 60-second Chainlink TWAP.

Price-to-beat and final settlement should come from that same family.

60 seconds is a lookback, not an update frequency.

2. Why Bots Still Get It Wrong

The July announcement is still circulating. It says 5-minute markets use 30 seconds.

Live 5-minute markets deployed since Aug 14 name the 60s stream. Market rules beat blog posts.

Three leftover bugs I keep seeing:

  1. Stream TWAP, but pin open from Binance mid
  2. Score live path on 60s, label research on snapshot close
  3. Keep 30s features after the 5m window doubled

Any one of those creates a third market nobody settles.

3. The State a 5m Engine Must Store

For each btc-updown-5m-* slot:

twap_open       = 60s Chainlink TWAP at slot start
twap_now        = latest 60s Chainlink TWAP
twap_ts         = observation timestamp
t_left          = seconds remaining
resolution_src  = rtds_twap | gamma
Enter fullscreen mode Exit fullscreen mode

If twap_ts is stale, skip. Do not invent a close from CEX last.

Gamma outcomePrices remains the authoritative scoring fallback after the slot ends. RTDS is the live path. Snapshot close is retired.

4. Feed Path

Preferred production path for most builders:

  • Polymarket RTDS WebSocket
  • topic for 60s TWAP
  • filter form such as {"symbol":"btc/usd"}
  • reconnect with backoff
  • ping keepalive
  • exact decimal / bigint math

Direct Chainlink Data Streams still exist. RTDS is the path that does not require separate Chainlink credentials.

In the public repo this belongs in src/twapFeed.ts.

Older comments that say “30s window” are historical. Live 5m wiring should request 60s.

5. What the Longer Window Does to a Signal

Moving 5m from 30s to 60s did not change the payout ($1 / $0).

It changed the variable you are allowed to forecast.

Effects a bot should expect:

  • smoother official path
  • weaker last-second wick features
  • more damage from open-reference mismatch
  • scratch thresholds that look “too twitchy” if they were fit on 30s
  • CEX lead-lag still exists, but it cannot dominate P(up)

The question is no longer “where does spot print at the bell?”

It is “where does the official average sit versus open?”

6. Minimal Rewire Checklist

  • [ ] Confirm the live market’s resolution source names 60s TWAP
  • [ ] Subscribe to the 60s series, not a leftover 30s topic
  • [ ] Pin twap_open from that same series
  • [ ] Recompute P(up) only on that path
  • [ ] Drop snapshot-close labels for post-cutover slots
  • [ ] Log window_seconds, twap_open, twap_now, resolution_src
  • [ ] Refuse the slot when the official series is stale

If this list is incomplete, do not tune entry size yet.

7. How This Maps to abrownfox001

The public engine is a BTC 5m specialist:

  • TWAP path vs open
  • mid-band 45–55¢
  • re-score every 10–30s
  • scratch decay / redeem strength

That loop only stays honest if the path is the current 60s series.

The repo name already assumes this: twap60-prediction-trigger-system.

8. What Part 3 Covers

Settlement tells you what to predict.

CLOB V2 and volume-tiered rate limits decide whether you can act on that prediction without getting clipped.

Part 3 is the access layer: signing, fees, collateral, Retry-After, and why V1 clients are done.

Links

Not financial advice. Read the live market rule and current docs before you ship a feed change.

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

#Polymarket #TWAP #Chainlink #BTC #TradingBot #AlgoTrading #RTDS #PredictionMarkets
Enter fullscreen mode Exit fullscreen mode

Top comments (0)