Technical Docs
Smart Contracts

Smart Contract Addresses

All hx.finance smart contracts deployed on Hyperliquid (Chain ID: 999).

Core Contracts

Core Contracts

ContractAddressDescription
Factory0x41ba59415eC75AC4242dd157F2a7A282F1e75652Creates new pools
PoolDeployer0x0d1D2Af74a59A2A0F266fD75Fb081F637c4ec9C2Deploys pool contracts
Vault0x9ffc63B7f284fA9A8071017b29a594B7e667f5d9Manages reserves
Multicall0x1094487796e6b8A24A587456Dbac00f13Fc00c8CBatch transactions

Periphery Contracts

ContractAddressDescription
SwapRouter0xCAfDa2b3E5c2B5E30f6d67FEFa5AfFD3f6a93b0aExecute swaps
NFTDescriptor0x4E34402645f3622355Bc81a646Bd03A443DeF50bNFT metadata
NonfungiblePositionManager0x578D8A2D07B60b12993559f1DDF90EB2af3eA496LP positions
QuoterV20x6dE3843D846543eEE20F73601ecc3Eb43E1B932bQuote swaps
TickLens0x6029685D415288F818FefF7345e4980742f79456Read tick data

Points System

ContractAddressDescription
PointsAdmin0x54c655e0C42AAfc8c5b835313fC6d3509F5C7e62Points configuration

Token Addresses

Supported Tokens

TokenAddressDecimalsDescription
WHYPE0x555555555555555555555555555555555555555518Wrapped HYPE
UETH0xBe6727B535545C67d5cAa73dEa54865B92CF790718Wrapped ETH
UBTC0x9FDBdA0A5e284c32744D2f17Ee5c74B2849934638Wrapped BTC
USDe0x5d3a1ff2b6bab83b63cd9ad0787074081a52ef3418Ethena USDe
USDXL0xca79db4b49f608ef54a5cb813fbed3a6387bc64518Last USD
LHYPE0x5748ae796AE46A4F1348a1693de4b5056048556218Liquid HYPE
BUDDY0x47bb061C0204Af921F43DC73C7D7768d2672DdEE6alright buddy

Active Liquidity Pools

Major Pools with Points Multipliers

PoolAddressFeePoints MultiplierLiquidity
WHYPE/USDe0x59544154B152B8C8FD2488bFF41c1E2215B1B1eDDynamic3xActive
USDe/UBTC0xB65C69fD8339Fb70ef7201d9C96B968519D7F21EDynamic2.5xActive
BUDDY/USDe0xdf18bA1C935e1bf943696Da9312bAD2d3B652441Dynamic2xActive
LHYPE/USDe0x9ba8d33c4DE40c6CbAef13dC2468990F10Ddf038Dynamic2xActive

Additional Pools

PoolAddressFeeStatus
USDe/UETH0x5b7eaD40334D20294c0a245177d77B78e5193514DynamicActive

Integration Guide

For Developers

Reading Pool Data

import { ethers } from 'ethers';
 
const FACTORY_ABI = [...]; // Factory ABI
const POOL_ABI = [...];    // Pool ABI
 
const provider = new ethers.JsonRpcProvider('https://rpc.hyperliquid.xyz/evm');
const factory = new ethers.Contract(FACTORY_ADDRESS, FACTORY_ABI, provider);
 
// Get pool address
const poolAddress = await factory.getPool(TOKEN0, TOKEN1, FEE);
 
// Read pool data
const pool = new ethers.Contract(poolAddress, POOL_ABI, provider);
const slot0 = await pool.slot0();
const liquidity = await pool.liquidity();

Executing Swaps

const ROUTER_ABI = [...]; // Router ABI
const router = new ethers.Contract(ROUTER_ADDRESS, ROUTER_ABI, signer);
 
// Approve tokens first
await tokenContract.approve(ROUTER_ADDRESS, amountIn);
 
// Execute swap
const params = {
  tokenIn: TOKEN_IN,
  tokenOut: TOKEN_OUT,
  recipient: userAddress,
  deadline: Math.floor(Date.now() / 1000) + 60 * 20,
  amountIn: amountIn,
  amountOutMinimum: 0,
  sqrtPriceLimitX96: 0
};
 
const tx = await router.exactInputSingle(params);
await tx.wait();

Subgraph Access

Main Analytics Endpoint: https://api.goldsky.com/api/public/project_cmay1j7dh90w601r2hjv26a5b/subgraphs/hx-analytics/v1.3.2/gn

Additional Subgraphs:

  • Farming: https://api.goldsky.com/api/public/project_cmay1j7dh90w601r2hjv26a5b/subgraphs/algebra-farming/1.0.0/gn
  • Multisig: https://api.goldsky.com/api/public/project_cmay1j7dh90w601r2hjv26a5b/subgraphs/hxfinance-multisig/1.8.0/gn

Example Queries

Get Pools

{
  pools(first: 10, orderBy: totalValueLockedUSD, orderDirection: desc) {
    id
    token0 {
      symbol
      decimals
    }
    token1 {
      symbol
      decimals
    }
    feeTier
    liquidity
    totalValueLockedUSD
    volumeUSD
  }
}

Get User Positions

{
  positions(where: {owner: "0xuser..."}) {
    id
    liquidity
    token0 {
      symbol
    }
    token1 {
      symbol
    }
    collectedFeesToken0
    collectedFeesToken1
  }
}

Contract Verification

All contracts are verified on Hyperliquid Explorer:

Security

Audits

  • Core contracts: Audited by multiple firms
  • Custom contracts: Audit pending
  • Bug bounty program: Coming soon

Best Practices

  • Always verify contract addresses
  • Check transaction details before signing
  • Use official interfaces when possible
  • Monitor slippage settings

Emergency Contacts

Network Configuration

Hyperliquid Mainnet

{
  "chainId": 999,
  "chainName": "Hyperliquid",
  "nativeCurrency": {
    "name": "HYPE",
    "symbol": "HYPE",
    "decimals": 18
  },
  "rpcUrls": ["https://rpc.hyperliquid.xyz/evm"],
  "blockExplorerUrls": ["https://hyperevmscan.io"]
}

Gas Settings

  • Gas Price: Usually 0.1 gwei
  • Gas Limit: Auto-estimated
  • Max fee: Not required (no EIP-1559)

Contract Interfaces

Factory Functions

  • createPool(): Create new trading pair
  • getPool(): Get pool address
  • feeAmountTickSpacing(): Get tick spacing

Router Functions

  • exactInputSingle(): Swap exact input
  • exactOutputSingle(): Swap exact output
  • exactInput(): Multi-hop swap

Position Manager Functions

  • mint(): Create new position
  • increaseLiquidity(): Add to position
  • decreaseLiquidity(): Remove from position
  • collect(): Collect fees
  • burn(): Close position

Version Information

  • Core Contracts: 1.0.0
  • Periphery Contracts: 1.0.0
  • Custom Contracts: 1.0.0
  • Subgraph: 1.0.0

Useful Links