Methodology

Details: How every metric is computed

Back to Dashboard

Trading data sources

Source: `userFillsByTime` from timestamp 0 to now, with window splitting and de-duplication, plus `spotMeta`, `meta`, and `outcomeMeta` for market-type classification. If empty, fallback to `userFills`. Dense wallets can require many time-window requests, so the app retries Hyperliquid rate limits and marks the result as truncated only if splitting cannot finish. When splitting stops because of a rate limit or request budget, HL-Viewer stores recovered fills and remaining time windows in server memory; `Continue API scan` resumes those remaining windows instead of restarting from zero.

The dashboard can also request a full history export from the Hypedexer/Enigma exporter referenced by Hyperliquid docs. HL-Viewer requests this export from `2023-01-01` to tomorrow UTC. The export is a `.csv.gz` file with `time, coin, dir, px, sz, ntl, fee, feeToken, closedPnl, hash`, then the same classification and metric engine is reused. HL-Viewer compares fill counts and keeps whichever source is more complete. The full export is limited to one request per wallet/user per UTC day and shows a quota message if the daily export is already used.

Base formulas per fill:

- Volume = `abs(px * sz)`

- PVL = `closedPnl` (fallback keys: `closed_pnl`, `pnl`)

- Winrate = `wins / (wins + losses) * 100` (only pnl > 0 and pnl < 0 count)

Outcomes Volume / PVL / Winrate

A fill is classified as Outcomes when it matches `outcomeMeta` market names or encoded outcome ids (`#N` / `+N`), or when coin includes explicit outcome markers (`?`, `-YES`, `-NO`), or when `dir` contains `SETTLEMENT` / `DELIST`. As fallback, `BUY/SELL` fills that are neither known spot (`spotMeta`) nor known perp (`meta`) are treated as Outcomes.

XYZ Volume / PVL / Winrate

A fill is classified as XYZ when coin matches XYZ patterns (`(XYZ)`, `XYZ`, `XYZ/...`, `.../XYZ`, `XYZ:...`, `...:XYZ`).

Perps Volume / PVL / Winrate

A fill is classified as Perps when `dir` contains `LONG`, `SHORT`, `OPEN`, `CLOSE`, or `ADD`.

Spot Volume

A fill is counted as Spot only when coin matches known spot assets from `spotMeta` (for example `@index` or known spot pair name). Outcomes are excluded from spot even if `dir` is `BUY` or `SELL`.

Spot TWAB (USD)

Computed as SpotState TWAB minus Vault TWAB (method 1 split). SpotState TWAB comes from Hyperliquid `portfolio -> allTime.spotState.accountValueHistory`, then vault component is removed to isolate spot-held value.

Vault TWAB (USD)

Method 1 split: reconstruct user vault exposure using `userNonFundingLedgerUpdates` (`vaultDeposit`, `vaultWithdraw`, `vaultDistribution`) and each vault's NAV history from `vaultDetails -> portfolio.allTime.accountValueHistory`, then compute time-weighted average USD value.

HYPE Staking TWAB

Computed from Hyperliquid staking-native endpoints `delegatorHistory` and `delegatorSummary`. Delegate and undelegate events are replayed forward per validator, each validator balance is capped at zero, then TWAB is computed as a time-weighted average staked balance.

Unit Volume / Fees / Trades

Subset of Spot fills matched to Unit markets via spotMeta pair base token mapping (plus symbol fallback). Volume uses `abs(px * sz)`. Stable fee tokens (`USDC`, `USDT`, `USDT0`, `USDE`, `USDH`, etc.) are already USD-like and are added as `fee`; explicit non-stable fee tokens are converted with `fee * px`. Trades is the number of matched fills.

Unit TWAB (USD)

Computed with the exposure-share fallback method: `Unit TWAB = Spot TWAB × (Unit Volume / Spot Volume)`, with the ratio clamped to `[0, 1]`.

Volume total (perps + spot + outcomes)

Computed as `outcomes.volume + spotVolume + perps.volume`.

Fills counted

Number of deduplicated fills returned by the API flow.

Fees paid (Outcomes / XYZ / Perps)

For each bucket, fees are summed from fill `fee` only when `fee > 0` (actual paid fee). Negative values (maker rebates/credits) are not counted as paid fees.

Important: categories are not exclusive. The same fill can contribute to multiple buckets (for example Outcomes and Perps), exactly as implemented in the calculation logic.

HEVM

Source: HyperEVM explorer datasets `txlist`, `tokentx`, and `txlistinternal`, with pagination and de-duplication.

TWAB

Computed as exact-time integration `sum(valueUSD * duration) / totalDuration` using the protocol-aware reliable flow model. Transfers are grouped by transaction, reliable USD entries are added, reliable USD exits are subtracted, and partially priced bidirectional txs are ignored. HYPE is valued with historical Hyperliquid candles when available, Unit assets use their underlying historical prices, and current-price fallbacks are only used for recognized liquid assets when no historical source is available.

HEVM TWAB is a best-effort conservative estimate. Open LP positions may temporarily lower the TWAB because deposited assets leave the wallet and the LP position may not always be fully valued until it is closed or partially withdrawn. Lending is treated as net exposure when possible, receipt/vault/LST/LP tokens are valued only when reliable pricing or conversion data exists, and tokens without reliable prices are ignored to avoid inflated results from partially understood DeFi flows.

Volume (USD)

Sum of outgoing account tx + outgoing token transfers, valued at historical USD price at transfer time. Native and HYPE-like assets use historical HYPE/USD (CoinGecko); stablecoins are counted at nominal USD; other tokens use contract historical series when available.

Fees paid (USD)

Primary method: outgoing `txlist` rows from Etherscan V2 (chainid 999), including failed tx if gas was spent; fee is `gasUsed * gasPrice` in HYPE, converted to USD with latest HYPE/USD. Fallback uses legacy API sources.

Different contracts

Unique `to` addresses from outgoing account transactions (`txlist`), excluding zero address.

Different active days

Number of UTC days with at least 1 outgoing account transaction.

Different active months

Number of UTC months with at least 3 outgoing account transactions.

Since first tx (d/m/y)

Primary method: Etherscan V2 `txlist` (chainid 999) when `ETHERSCAN_API_KEY` is configured. Fallback method: HyperevmScan page parsing, then legacy API rows.

Total tx (explorer-style)

Primary method: Etherscan V2 `txlist` row count (chainid 999) when `ETHERSCAN_API_KEY` is configured. Fallback method: HyperevmScan page metadata, then legacy API rows.

Initiated tx (wallet actions)

Count of deduplicated outgoing account transactions only (`txlist` where `from == wallet`), excluding self-transfers.

Pricing reliability safeguards: token historical pricing requests are capped (top contracts by transferred amount), and unsupported contracts are excluded from USD valuation with warnings.

Unit Bridge

Source: HyperUnit operations API (/operations/{address}) with cursor pagination. The app follows cursors until the end, with a hard safety cap on pages.

Volume (USD)

Estimated from operation `sourceAmount` converted by asset decimals, multiplied by current Hyperliquid `allMids` prices (not historical-at-time).

Different contracts

Unique bridged assets (symbol-level, normalized), excluding assets in the exclusion list (currently `ena`).

Different active days / months

Unique UTC days and months based on operation creation timestamp (`opCreatedAt`).

Nb of chain source / destination

Unique values of `sourceChain` and `destinationChain` across operations.

Since first tx (d/m/y)

Age from earliest operation timestamp.

Number of tx

Count of deduplicated operations after excluded assets filtering.

Note: Unit bridge USD volume is an estimate using current mids at query time. If a price is missing for an asset, that asset is excluded and a warning is shown.