Skip to main content

Liquidity Pools

The OTC Desk is now legacy

Liquidity pools replace the per-pair OTC Desk. Your existing OTC deals keep working under Operator Controls → Exchange → Legacy → OTC Desk while you move them to pools. For the old screens, see OTC Desk (legacy).

A liquidity pool is a set of assets quoted against one account on your exchange. You list each asset once with its own price, and every pair between the pool's assets becomes quotable. The pool account's balances are its inventory. Users trade against pools through Quick Trade (Convert).

With the OTC Desk you needed one deal per pair. With a pool, three assets give you three pairs and ten assets give you 45, all from one setup.

You manage liquidity in Operator Controls → Exchange → Liquidity:

PageWhat it's for
OverviewEach pool at a glance: the price of each asset, how much the pool account holds against its limits, and any hedge that needs attention.
PoolsCreate, test, activate, pause and edit pools.
RoutingChoose which liquidity sources a conversion between two assets may use.
ActivityEvery pool fill and OTC deal fill, and what happened to its hedge.
Network poolsPools that other HollaEx exchanges share through the network.

How pools price a pair​

Each asset in a pool has one USDT price and its own spread. A pair is priced as one asset's price over the other's, and the pair's spread is the sum of both assets' spreads. Users buy above the mid price and sell below it.

Spreads are in basis points: 100 bps = 1%. For example, if BTC has a spread of 20 bps and USDT has 10 bps, the BTC/USDT pair carries 30 bps (0.3%).

Before you start​

  • Choose the pool account. This is the user on your exchange whose balances the pool trades. Fund it with every asset the pool pays out. The account must be registered on the HollaEx network, it can back only one pool, and you can't change it after the pool is created.
  • Turn on Quick Trade. Pools answer conversions, so Quick trade (Convert) must be on under Operator Controls → Exchange → Configuration → Features.

Create a pool​

Go to Operator Controls → Exchange → Liquidity → Pools and click New pool. The setup has five steps, then a review.

1. Basics​

  • Name: the pool's name.
  • Account user id: the user ID of the pool account. Operator Controls shows that user's email so you can check you typed the right ID.

2. Pricing safety​

  • Quote lifetime (seconds): how long a price quoted to a user stays valid before they must ask again, from 10 to 120 seconds. Shorter is safer when prices move fast.
  • Oracle tolerance (bps): a safety check for assets priced by a formula. The formula is also run on oracle prices; if the two results are further apart than this, the pool refuses to quote the asset. Up to 5000 bps. Assets priced by the oracle aren't checked.

3. Assets​

Click Add asset for each asset in the pool. A pool can hold up to 50 assets. For each one, set:

  • Asset: a coin listed on your exchange.
  • Price source: where the asset's USDT price comes from.
    • Oracle: the HollaEx oracle's USDT price.
    • Exchange price: one exchange's ticker for this asset, converted to USDT. Choose the Exchange and the Market.
    • Custom formula: your own arithmetic over exchange tickers. The Formula (USDT price) must give the USDT price of one unit of the asset. You can build it step by step, start from a common recipe, or type it in the text editor.
  • Spread (bps): your margin on this asset.
  • Order size: the smallest and largest amount of this asset, in its own units, that one trade may move. Quotes outside this range are refused.
  • Inventory: bounds on the pool account's holding of this asset. At the minimum, the pool stops paying this asset out (0 lets it pay out everything). At the maximum, it stops taking this asset in. Leave the maximum empty for no cap.
  • Hedge: whether and where this asset's fills are offset (see step 5).

The asset's current price is shown as you set it up, so you can check it before saving.

4. Sharing​

Turn on Share with other exchanges to let other HollaEx exchanges on the network convert against the assets you mark as shared in this pool. Unshared assets, and any fiat, stay with your own users. Prices are pushed to the network every 30 seconds, and the network stops quoting the pool within 75 seconds of the pushes stopping.

An isolated exchange keeps its pools to itself and can't share them.

5. Hedging​

Turn on Hedge fills to offset each fill with the opposite trade. After each fill, the pool buys back what it paid out and sells what it took in, so its holdings stay steady and the spread is what it keeps. With hedging off, fills change the pool account's holdings and nothing offsets them.

  • Hedge against: the asset hedge trades are made against, for example usdt for BTC/USDT.
  • Exchange accounts: the external exchanges hedges can be placed on, each with an API key, API secret and, if the exchange uses one, a Passphrase. Secrets aren't shown again once saved. Every hedged asset's market (for example BTC/USDT) must exist on the exchange it hedges on.
  • Hedge (per asset, in step 3): Off, one of your exchange accounts, or On this exchange's order book. With more than one account, each asset can hedge on a different exchange while the pool keeps one inventory.
  • Order book slippage (bps): for hedges placed on your own order book, how far the hedge order's limit price may be from the best price. A leg is placed only when the book has enough depth within that range.

When an external exchange keeps refusing a hedge order, the leg is placed on your own order book instead, within the slippage. If your exchange has no market for that asset, the failed leg is recorded on the Activity page for you to hedge by hand.

Review and save​

Check the summary, use Edit on any step to change it, then click Create paused. Every new pool starts paused.

Test and activate a pool​

  1. On the Pools page, click Test quote on the pool. Choose the Base, the Quote, whether The user buys or sells the base, and the Amount of base. The test prices the pair exactly as a user would be quoted, including order size and inventory bounds. Nothing is traded.
  2. When the prices look right, change the pool's status to Activate. A pool needs at least two assets to be active.
  3. Make sure routing lets the pair use Liquidity pools (it does by default; see below).

A pool has three statuses:

StatusWhat it means
PausedQuotes nothing. Fills already made are still hedged.
ActiveQuotes users and settles their conversions against the pool account.
StoppedRetired for good. A stopped pool can't be changed or restarted.

Choose liquidity sources with Routing​

Operator Controls → Exchange → Liquidity → Routing decides which sources a conversion between two assets may use. A policy covers both directions of a pair. Click Add policy, pick the pair (or turn on For every pair without a policy of its own), and tick the Allowed sources:

SourceWhat it is
Order bookThe pair's market, when its convert source is the order book.
Liquidity poolsYour active pools that hold both assets.
Shared poolsOther exchanges' pools shared through the HollaEx network. Off unless a policy names them.
OTC dealA legacy OTC Desk deal set as the pair's convert source.
HollaEx networkThe network swap, when it's the pair's convert source.
Chain tradeA multi-step conversion through other markets, when nothing else quotes the pair. See Smart Chain Trading.
  • With no policies, every pair may use every source except shared pools.
  • The order book and pools compete on price.
  • A pair whose OTC deal or network swap isn't allowed is answered by pools instead. This is how you move a pair from the OTC Desk to pools.
  • A pair with no source allowed is Closed and can't be converted.

Use Preview a conversion on the Routing page to see which source a user would be served from, and why each of the others wasn't. Choose From, To and an amount. Nothing is traded and no quote is issued.

Move OTC deals to a pool​

If you already run OTC Desk deals, you don't have to rebuild them by hand:

  1. On the Pools page, click Build from OTC deals (or Build a pool from these deals on the OTC Desk page).
  2. Choose the Deal account whose deals you want to convert, and enter a Pool name.
  3. Check which deals will be Converted and which are Left out, with the reason for each. Left-out deals keep working as OTC deals; add their assets to the pool by hand later if you want them there.
  4. Create the pool. It starts paused and prices each asset the same way the deals did.

Your deals keep working until you activate the pool and set those pairs' routing so the OTC deal source is no longer allowed.

Track fills and hedges​

Operator Controls → Exchange → Liquidity → Activity lists every pool fill, leg by leg, and every OTC deal fill, newest first. Filter by Source (pools, OTC deals or both) and Hedge status:

Hedge statusMeaning
Pending, Placing, RetryingThe hedge is in progress.
HedgedThe hedge order was placed.
FailedThe hedge didn't go through. The position is unhedged.
Check venueThe hedge may or may not have reached the exchange and wasn't retried. Check on that exchange.
Not hedgedThe fill wasn't meant to be hedged, for example because the pool or the asset doesn't hedge.

Rows marked Failed or Check venue are positions left unhedged. Hedge them by hand on the venue.

The Overview page flags pools with a hedge that needs attention.

Network pools​

Operator Controls → Exchange → Liquidity → Network pools lists the pools other HollaEx exchanges share through the network, who runs each one, and which of their pairs you also list. Fiat is never shared.

Your users can convert against these pools only once a routing policy names Shared pools. They then compete on price with your order book and your own pools.

Good practice​

  • Keep the pool account funded with every asset it pays out. Set inventory minimums so the pool stops paying an asset out before it runs dry.
  • Test quotes on every new pair before you activate a pool.
  • Check the Activity page regularly for Failed and Check venue rows.
  • Use a dedicated account for each pool so its balances are easy to follow.