payouts: exact on-chain resolution timestamps via Etherscan V2 (resolution_time)

CTF ConditionResolution logs, full-range topic query (Alchemy free tier
caps getLogs at 10 blocks), cached forever in resolution_times. Verified:
Brewers Jul-7 market truly resolved 2026-07-08 04:51 — the cached
endDate-metadata res_t was 29h wrong; Kruto's sell provably 365 min
pre-resolution. Key = etherscan_key (gitignored config). Migration of
trust/validate/portfolio onto true res_t queued in HANDOFF.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
jaxperro
2026-07-08 18:05:21 -04:00
parent a81d9b1462
commit 43de3845a7
3 changed files with 61 additions and 1 deletions
+1 -1
View File
@@ -244,7 +244,7 @@ runner is retired (GitHub throttled `*/5` to ~2h in practice — it copied 1 of
|--------|--------------|
| [Goldsky Turbo Pipelines](https://docs.goldsky.com/chains/polymarket) | per-fill order events with timestamps for *every* wallet (Polymarket killed subgraphs with the 2026-04-28 v2 migration) — fixes the cache's two blind spots: no entry times, and position-level aggregation hiding scalps. See also [warproxxx/poly_data](https://github.com/warproxxx/poly_data), [Bitquery](https://docs.bitquery.io/docs/examples/polymarket-api/) |
| [PolymarketData.co](https://www.polymarketdata.co/) | HISTORICAL order-book snapshots (Aug 2025+) → depth-aware backtest fills. Forward-going depth is now captured in-house: every copy logs `book` {bb, ba, spread, bid5c, ask5c} to the fills ledger (2026-07-08) |
| free Etherscan-V2 (Polygonscan) API key | topic-filtered logs over wide ranges → EXACT `ConditionResolution` timestamps (CLOB/gamma have no true resolution time; `end_date_iso` can be months wrong) + restores the funding-cluster tracer (Alchemy FREE tier caps `eth_getLogs` at 10 blocks as of 2026-07) |
| ~~free Etherscan-V2 key~~ **WIRED 2026-07-08**: `payouts.resolution_time(cond)` returns the exact on-chain `ConditionResolution` timestamp (cached forever in `resolution_times`; key = `etherscan_key` in gitignored config.json, 5 req/s free tier). Verified: the Jul-7 Brewers market truly resolved 2026-07-08 04:51 — cached metadata res_t was 29h wrong. NEXT: migrate trust/validate/portfolio to consume it (alignment-grade change, do carefully), and port the funding-cluster tracer off Alchemy getLogs (free tier caps at 10 blocks) |
| Pinnacle closing lines via [SharpAPI](https://sharpapi.io/sportsbooks/pinnacle-odds-api) / [sportsapis.dev](https://sportsapis.dev/historical-odds) / [BettingIsCool](https://api.bettingiscool.com/) (Pinnacle closed its public API 2025-07) | closing-line-value as an independent "was this bet sharp" ground truth; a Pinnacle *suspension* on an ITF/esports match is itself a fixing signal |
| [Polysights Insider Finder](https://gizmodo.com/tracking-insider-trading-on-polymarket-is-turning-into-a-business-of-its-own-2000709286) | cross-check for flagged insider wallets |