Skip to content

perp-mark-price-lag: Gains and GMX back (venue feeds instead of the Pyth proxy that 401s since 2026-08-27) - #2553

Merged
Flotapponnier merged 1 commit into
devfrom
fix/perp-mark-gains-gmx
Sep 20, 2026
Merged

Flotapponnier merged 1 commit into
devfrom
fix/perp-mark-gains-gmx

Conversation

@Flotapponnier

Copy link
Copy Markdown
Collaborator

Gains (and GMX v2) vanished from /benchmarks/perp-mark-price-lag because their success rate was 0: the harness read a Pyth Hermes proxy for both, and hermes.pyth.network has returned 401 to unauthenticated calls since 2026-08-27 (Hermes went behind API keys). 4,318 errors per venue per day for 24 days; the four orderbook venues read their own APIs and never stopped.

Fix, and an upgrade: both venues now read the mark they actually publish.

  • Gains: backend-pricing.eu.gains.trade/charts (BTC/ETH/SOL pair indices 0/1/33, one call per cycle cached across the three assets, snapshots older than 60 s are failures).
  • GMX v2: arbitrum-api.gmxinfra.io/prices/tickers, mid of minPrice/maxPrice, scaled from GMX's 30-decimal fixed point.

Live check against Binance spot before shipping: Gains 1.9–2.6 bps, GMX 2.0–3.3 bps on the three assets. Deployed on the VPS (container ocb-perp-mark-price-lag rebuilt; first cycle logged the same numbers). The frozen gauge values of the failing window (2026-08-27 → today) were purged from Prometheus for gains|gmx so the 24 h quantiles are not polluted; the health gauge history is kept as is (the failure was real), so the two rows come back on the page as the 24 h success average climbs over the next day.

Spec: the "structurally near zero" claims are replaced by the measured {{p50:gains}} / {{p50:gmx}}, methodology and tags name the venue feeds, and the FAQ says why the rows were empty.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HJgbZCqjR4nvCfcJSzofbw

…ricing backend, GMX v2 oracle price API) instead of a Pyth Hermes proxy; hermes.pyth.network has answered 401 since 2026-08-27 and both rows were empty for 24 days; spec copy no longer assumes a near-zero deviation, it shows the measured one

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HJgbZCqjR4nvCfcJSzofbw
@Flotapponnier
Flotapponnier merged commit 219ee30 into dev Sep 20, 2026
1 of 2 checks passed
@Flotapponnier
Flotapponnier deleted the fix/perp-mark-gains-gmx branch September 22, 2026 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants