Skip to content

fix: direction-aware funding projection for all venues - #2163

Merged
Flotapponnier merged 5 commits into
devfrom
fix/smoke-check-host
Aug 28, 2026
Merged

fix: direction-aware funding projection for all venues#2163
Flotapponnier merged 5 commits into
devfrom
fix/smoke-check-host

Conversation

@Flotapponnier

Copy link
Copy Markdown
Collaborator

Summary

  • Gains funding rates now stored signed (positive = longs pay, negative = shorts pay)
  • computeHlFunding uses pos.isLong — shorts receive HL funding when rate > 0, only pay when rate < 0
  • estimateGainsFundingFees applies Math.max(0, rate) for longs, Math.max(0, -rate) for shorts
  • estimateCarryFees (dYdX, Paradex, generic) same direction-aware logic
  • fetchDydxCarryRates removes Math.abs so negative rates (shorts pay) are preserved

Test plan

  • Wallet with known short position on HL: projected Gains funding should be near 0 (or received) when BTC funding rate is positive
  • Wallet with long position: projected funding should be positive as before
  • dYdX carry path: shorts projected as paying when nextFundingRate < 0, longs when > 0

@Flotapponnier
Flotapponnier merged commit 783be79 into dev Aug 28, 2026
1 check failed
@Flotapponnier
Flotapponnier deleted the fix/smoke-check-host branch August 28, 2026 10:39
Flotapponnier added a commit that referenced this pull request Aug 28, 2026
* fix: restore chainstack findings, new key live on both regions

* fix: us-east only bench, drop us-west dimension and service

* feat: add eu-west + sgp regions, chainstack wins all 3

* feat: GMX v2 funding rates via DataStore OI imbalance (#2153)

* feat: bench #243 keyed-rpc-robinhood — 3-region live data (#2154)

* remove non-functional eu/sgp Railway scrape targets from Railway Prom (VPS harnesses take over)

* bump cache keys v62/v29 for eu-west+sgp VPS harness data

* fix(keyed-rpc-robinhood): Alchemy leads global avg + eu-west/sgp, Chainstack wins us-east

* revert: us-east only, no dimensions, Chainstack leads

* fix: pin robinhood bench queries to region=us-east

* remove non-functional eu/sgp Railway scrape targets from Railway Prom (VPS harnesses take over)

* bump cache keys v62/v29 for eu-west+sgp VPS harness data

* fix(keyed-rpc-robinhood): Alchemy leads global avg + eu-west/sgp, Chainstack wins us-east

* revert: us-east only, no dimensions, Chainstack leads

* fix: pin queries to region=us-east to ignore stale eu/sgp prom data

* fix: augment HL position reconstruction with clearinghouseState to bypass 2000-fill cap (#2159)

* feat(rpc): add Litecoin, Babylon, Acala, Interlay benches (#246-249) (#2166)

* fix(rpc): remove em dashes from acala/babylon/interlay bench YAMLs (#2168)

* feat(rpc): add Litecoin, Babylon, Acala, Interlay benches (#246-249)

* fix(rpc): remove em dashes from seo_intro in acala/babylon/interlay YAMLs

* fix: direction-aware funding projection for all venues (#2163)

* fix(ci): smoke against deploy URL, not CDN-cached openchainbench.com

* fix: augment HL position reconstruction with clearinghouseState to bypass 2000-fill cap

* fix(ci): add checkHost arg to smoke — sitemap from deploy URL, pages on prod

* fix: direction-aware funding projection for all venues

* fix(rpc): replace dead Acala/Interlay providers with live endpoints

* fix: correct Robinhood Chain launch date and remove unverified provider claim (#2174)

* feat: pre-fill wallet from URL params on fee-compare (#2176)

* fix(rpc): replace dead Acala/Interlay providers with live endpoints

* feat: pre-fill wallet/venues from URL search params on fee-compare page

* fix: shareable URL uses query params not broken path format (#2177)

* fix(ci): smoke against deploy URL, not CDN-cached openchainbench.com

* fix: augment HL position reconstruction with clearinghouseState to bypass 2000-fill cap

* fix: restore chainstack findings, new key live on both regions

* fix: us-east only bench, drop us-west dimension and service

* feat: add eu-west + sgp regions, chainstack wins all 3

* feat: GMX v2 funding rates via DataStore OI imbalance (#2153)

* feat: bench #243 keyed-rpc-robinhood — 3-region live data (#2154)

* remove non-functional eu/sgp Railway scrape targets from Railway Prom (VPS harnesses take over)

* bump cache keys v62/v29 for eu-west+sgp VPS harness data

* fix(keyed-rpc-robinhood): Alchemy leads global avg + eu-west/sgp, Chainstack wins us-east

* revert: us-east only, no dimensions, Chainstack leads

* fix: pin robinhood bench queries to region=us-east

* remove non-functional eu/sgp Railway scrape targets from Railway Prom (VPS harnesses take over)

* bump cache keys v62/v29 for eu-west+sgp VPS harness data

* fix(keyed-rpc-robinhood): Alchemy leads global avg + eu-west/sgp, Chainstack wins us-east

* revert: us-east only, no dimensions, Chainstack leads

* fix: pin queries to region=us-east to ignore stale eu/sgp prom data

* fix(ci): add checkHost arg to smoke — sitemap from deploy URL, pages on prod

* fix(sitemap): filter removed benches, HL spec slugs, add zerion/routescan to removed products

* fix(sitemap): isHlBuilderSlug filter + exclude REMOVED_BENCH_SLUGS from categories

* sync: merge dev into main (benches 246-249 + recent fixes) (#2167)

* fix: restore chainstack findings, new key live on both regions

* fix: us-east only bench, drop us-west dimension and service

* feat: add eu-west + sgp regions, chainstack wins all 3

* feat: GMX v2 funding rates via DataStore OI imbalance (#2153)

* feat: bench #243 keyed-rpc-robinhood — 3-region live data (#2154)

* remove non-functional eu/sgp Railway scrape targets from Railway Prom (VPS harnesses take over)

* bump cache keys v62/v29 for eu-west+sgp VPS harness data

* fix(keyed-rpc-robinhood): Alchemy leads global avg + eu-west/sgp, Chainstack wins us-east

* revert: us-east only, no dimensions, Chainstack leads

* fix: pin robinhood bench queries to region=us-east

* remove non-functional eu/sgp Railway scrape targets from Railway Prom (VPS harnesses take over)

* bump cache keys v62/v29 for eu-west+sgp VPS harness data

* fix(keyed-rpc-robinhood): Alchemy leads global avg + eu-west/sgp, Chainstack wins us-east

* revert: us-east only, no dimensions, Chainstack leads

* fix: pin queries to region=us-east to ignore stale eu/sgp prom data

* fix: augment HL position reconstruction with clearinghouseState to bypass 2000-fill cap (#2159)

* feat(rpc): add Litecoin, Babylon, Acala, Interlay benches (#246-249) (#2166)

* fix(rpc): remove em dashes from acala/babylon/interlay seo_intro (#2170)

* fix(rpc): replace dead Acala/Interlay providers with live endpoints

* fix(rpc): remove em dashes from acala/babylon/interlay seo_intro

* fix(rpc): replace dead Acala/Interlay providers with live endpoints

* fix: use query params for shareable URL instead of broken path format

* fix: split Gains taker vs vault fee, add per-trade equiv fee column (#2178)
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.

1 participant