Skip to main content

🌊 How Liquidity Works

HyperFX uses a Central Limit Order Book (CLOB) as its primary matching engine. Orders match directly between traders. The liquidity pool plays a supporting role β€” absorbing liquidations, bridging temporary gaps, and collecting fees.


πŸ“– Two systems working together​

SystemRole
CLOB (Order Book)Matches buy and sell orders directly between traders β€” the primary mechanism
Liquidity PoolAbsorbs liquidations, bridges temporary order gaps, earns all fees

πŸ“š The CLOB β€” how two traders find each other​

A Central Limit Order Book is a real-time, sorted list of all open buy orders (bids) and sell orders (asks). When a buyer and a seller agree on a price, the trade executes automatically.

Think of it like an auction happening simultaneously in both directions:

  • Every buyer announces: "I will pay this much for EUR/USD"
  • Every seller announces: "I will sell EUR/USD for at least this much"
  • The exchange continuously scans both lists for matches

:::info What is a bid and an ask?

  • Bid β€” the highest price a buyer is currently willing to pay
  • Ask β€” the lowest price a seller is currently willing to accept
  • Spread β€” the gap between the best bid and the best ask. This spread is what you pay as the cost of entry, and it goes to the liquidity pool as a fee.

When the best bid meets or exceeds the best ask, a trade executes.

:::

🎬 How order books work β€” visual explanation​

Warrior Trading β€” 'Order Book Trading Explained' β€” a visual walkthrough of how a real-time order book is structured, how bids and asks are matched, and what the depth of book tells you about market liquidity.

Live order book simulation (EUR/USD)​

The widget below shows a realistic EUR/USD order book. Red rows are sellers (ask prices). Green rows are buyers (bid prices). The "MATCHING" indicator shows where active trades are executing:

Price (EUR/USD)Size (units)Depth
1.085251,100,000
1.08529900,000
1.085333,200,000
1.085381,850,000
1.085422,400,000
Spread 0.5 pip↑ ASK Β |Β  BID ↓● MATCHING
1.085201,600,000
1.085162,900,000
1.08511750,000
1.085072,050,000
1.085021,350,000
Sellers (ASK)Buyers (BID)Illustrative EUR/USD data
🏦 When the Liquidity Pool steps in
EventPool actionType
Position liquidated (EUR/USD)Pool absorbs at discountLiquidation
No match in order bookPool bridges temporarilyTemp. cover
Trade executed (any)Spread + swap fee earnedFee income

In a real exchange, this book updates thousands of times per second as orders arrive and are filled.


πŸ”„ How a trade flows β€” step by step​

:::info Primary vs secondary execution path Every order first attempts to match directly against another trader in the order book. The pool only activates in two cases: (1) a position is being liquidated β€” the pool absorbs it at a discount β€” or (2) no counterparty exists yet β€” the pool bridges the gap until a real match arrives. In liquid conditions, pool intervention is rare and brief. :::


🏦 The liquidity pool β€” three specific roles​

The pool is not the counterparty on your trades. It has three clearly defined jobs:

πŸ”΄ Role 1 β€” Liquidation manager​

When a position reaches its liquidation price (the price at which the collateral can no longer cover the loss), the smart contract closes the position automatically. The pool then absorbs that position at a discount to the current market price.

The pool works to close the absorbed position at the best available market price, keeping the discount as profit. Because the pool always buys at a discount, its downside risk is structurally limited.

πŸ”΅ Role 2 β€” Temporary liquidity bridge​

If there is no matching counterparty in the order book for a brief window, the pool steps in as a temporary placeholder. It holds the position until a real counterparty arrives β€” then passes it on. This prevents slippage for the trader and keeps the exchange responsive.

🟒 Role 3 β€” Fee collector and distributor​

Every fee generated by every trade flows to the pool:

  • Spread fee β€” collected on each trade open/close
  • Swap/overnight fee β€” charged on positions held overnight
  • Trading commission β€” a flat fee on each transaction

All fees are automatically distributed to liquidity providers (LPs) in proportion to their share of the pool.


πŸ’Ή Full liquidity flow β€” CLOB + pool combined​


🎬 Liquidity pools explained​

Finematics β€” 'Liquidity Pools Explained' (9 min) β€” covers what liquidity pools are, how liquidity providers earn fees, and the risks involved. Directly relevant to understanding the HyperFX pool mechanics.


πŸ’Ό Becoming a liquidity provider​

Anyone can deposit USDT into the pool and start earning. There is no minimum, no whitelist, and no application.

AspectDetails
What you depositUSDT
What you earnPro-rata share of all spreads, swap fees, and commissions
Risk levelLower than AMM pools (no continuous directional exposure), but not zero β€” see note below
WithdrawalAvailable any time, processed in ~5 minutes
RequirementA crypto wallet and USDT on BNB Smart Chain

:::info Why the pool risk is lower than it looks

Unlike AMM liquidity pools (like Uniswap) which take full directional exposure on every trade, the HyperFX pool only participates in two specific, low-risk scenarios:

  1. Liquidated positions it acquires below market price β€” structural upside built in
  2. Temporary bridges unwound as soon as a match arrives β€” minimal time exposure

The pool's return driver is not price speculation β€” it is the steady flow of fees from normal trading activity.

:::

Worked example β€” how LP earnings accumulate​

Suppose the pool has $1,000,000 USDT in total, and you have deposited $10,000 USDT (a 1% share).

Imagine a typical trading day with:

  • 500 EUR/USD trades at 0.10 lot each
  • Average spread: 0.5 pip = $1.00 per trade
  • Average swap fee (overnight): $0.50 per position held
  • 2 liquidation events: pool earns $120 and $85 discount
Fee sourceDaily totalYour 1% share
Spread fees (500 Γ— $1.00)$500$5.00
Swap fees (200 positions Γ— $0.50)$100$1.00
Liquidation discounts$205$2.05
Total$805$8.05

At this rate, your $10,000 deposit earns approximately $8.05/day β†’ ~$2,940/year β†’ ~29.4% APY from fees alone β€” with no directional risk on the underlying Forex prices.

:::note Illustrative only This 29.4% figure is a purely illustrative example based on assumed trading volume. Actual LP returns depend entirely on protocol trading volume, fee levels, pool utilization, and liquidation frequency β€” all of which vary over time. This is not a projection or guarantee of returns. :::


πŸ“š Go deeper β€” study resources​

πŸ“„ References & official sources​

ResourceDescription
Investopedia β€” Order BookHow order books work in traditional exchanges
Investopedia β€” Market MakerWhat market makers do and why liquidity matters
CME Group β€” Introduction to FuturesHow professional exchanges operate order matching
Investopedia β€” Bid-Ask SpreadThe spread explained in detail, with examples
Investopedia β€” LiquidationWhat liquidation means in a leveraged trading context

πŸŽ₯ Educational videos​

VideoChannelDescription
Liquidity Pools ExplainedFinematicsHow DeFi liquidity pools work, how LPs earn fees, and the risk mechanics
Order Book Trading ExplainedWarrior TradingHow CLOB order books match buyers and sellers in practice
What is a Market Maker?InvestopediaThe role of market makers in providing liquidity

➑️ Up next​