/** * HIP-3 Deployed Dex Asset Mapping. * * Maps assets across Hyperliquid deployed dexes to their common underlying. * Assets with the same base name (e.g., xyz:TSLA and flx:TSLA) are auto-matched. * Known aliases (e.g., CL = OIL = crude oil) are explicitly mapped. * * Verified mismatches (NOT the same asset despite similar names): * USAR ($17) ≠ US500 ($666) ≠ USA500 ($6646) * SEMI ($319) ≠ SEMIS ($381) * USOIL ($113) ≠ CL ($93) * GOLDJM ≠ GOLD (different products) * SILVERJM ≠ SILVER * URNM ≠ URANIUM */ export interface DexAsset { /** Full symbol as returned by API (e.g., "xyz:TSLA") */ raw: string; /** Base name without prefix (e.g., "TSLA") */ base: string; /** Dex name (e.g., "xyz") or "hl" for native */ dex: string; /** Mark price */ markPrice: number; /** Raw funding rate */ fundingRate: number; /** Max leverage */ maxLeverage: number; /** Open interest (USD notional) */ openInterest: number; /** 24h volume (USD) */ volume24h: number; /** Size decimals for order precision */ szDecimals: number; } export interface DexArbPair { /** Canonical underlying name */ underlying: string; /** Long side (lower funding rate) */ long: DexAsset; /** Short side (higher funding rate) */ short: DexAsset; /** Annualized funding spread % */ annualSpread: number; /** Mark price difference % between the two sides */ priceGapPct: number; /** Min OI (USD) across both legs — practical cap on position size */ minOiUsd: number; /** Min 24h volume (USD) across both legs — liquidity indicator */ minVolume24hUsd: number; /** Viability grade: "A" (>$1M OI), "B" (>$100K), "C" (>$10K), "D" (<$10K) */ viability: "A" | "B" | "C" | "D"; } /** * Fetch all assets from all Hyperliquid dexes (native + deployed). */ export declare function fetchAllDexAssets(): Promise; /** * Find all cross-dex arb pairs. * * Groups assets by canonical underlying, then finds pairs across different dexes * with a funding rate spread. Validates by checking mark price similarity (< maxGapPct). */ export declare function findDexArbPairs(assets: DexAsset[], opts?: { /** Max price gap % to consider same underlying (default: 5%) */ maxPriceGapPct?: number; /** Min annual spread % to include (default: 0 = all) */ minAnnualSpread?: number; /** Include native HL perps in comparison? (default: true) */ includeNative?: boolean; }): DexArbPair[]; /** * Fetch and return arb opportunities across all HIP-3 dexes. * Single convenience function for CLI commands. */ export declare function scanDexArb(opts?: { minAnnualSpread?: number; maxPriceGapPct?: number; includeNative?: boolean; }): Promise;