feat(apps): first-party data sources — HL node fills + GMX Subsquid - #1801
Merged
Conversation
Replace DeFiLlama proxy with first-party Hyperliquid node fills. - Reads fee/builderFee from node_fills_by_block on SGP (15.235.224.14) - hl-fills-agg.py aggregates daily totals, runs as pm2 on SGP:2116 - net_usdc = gross - builder = amount flowing to AF + HLP + deployers - Fills archive starts 2026-06-01, backfill runs automatically
First-party data from GMX-operated Subsquid GraphQL endpoint. Position fees (63% LP / 37% protocol) + swap fees split per governance. Borrowing fees classified as LP revenue (pool-only, no protocol cut). Amounts in GMX internal 1e30 precision, stored with Decimals=30.
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.
Summary
Replaces the DeFiLlama proxy with first-party protocol data sources.
Hyperliquid (hyperliquid:hypercore)
totalDataChartBreakdownto live node fillshl-fills-agg.pyruns on the SGP non-validating node, readsnode_fills_by_block/hourly/, aggregatesfee - builderFeeper day, serves HTTP on port 2116GMX v2 Arbitrum + Avalanche (gmx-v2:arbitrum, gmx-v2:avalanche)
position_fee/burn(protocol) +position_fee/lp(pool) — exact % comes from contract accounting, not a fixed modelswap_fee/burn(fee receiver) +swap_fee/lp(pool)borrow_fee/lp(pool-only per GMX design)Decimals=30(GMX internal PRICE_PRECISION) — no float64 precision lossInfra change
harnesses/apps/scripts/hl-fills-agg.pyis deployed on the SGP node (15.235.224.14:2116, pm2hl-fills-agg). Port 2116 opened in UFW.Test plan
fee_eventsforhyperliquid:hypercore