perp-mark-price-lag: Gains and GMX back (venue feeds instead of the Pyth proxy that 401s since 2026-08-27) - #2553
Merged
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.networkhas 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.
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).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-lagrebuilt; first cycle logged the same numbers). The frozen gauge values of the failing window (2026-08-27 → today) were purged from Prometheus forgains|gmxso 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