TopazTOPAZDocs

Liquidity

Providing Liquidity

This page covers Topaz's v2-style pools — constant-product (volatile) and stableswap. For concentrated-liquidity Slipstream positions, see Concentrated Positions. The two are independent and can be used in parallel.

Before you LP

Liquidity provision pays you in two ways and costs you in one. Read both halves before you commit capital:

  • You earn fees. Every swap through the pool pays a fee that's shared pro-rata across LPs.
  • You earn emissions if you stake the LP token in the gauge — your share of TOPAZ flows for that gauge based on votes it receives.
  • You experience impermanent loss when the two tokens diverge in price. For correlated pairs (stables, LSDs) this is tiny. For uncorrelated pairs it can be meaningful — fees and emissions are the offset. Read the IL primer.

Volatile vs stable pools

A v2 pool is either volatile (constant product, x · y = k) or stable(x³y + y³x ≥ k). The choice is permanent — you can't convert. The app surfaces the recommended type for each pair, but the underlying rule is:

  • Correlated pairs (USDT/USDC, ETH/stETH, BTC/WBTC) → stable pool. Default fee 0.05%.
  • Uncorrelated pairs (everything else) → volatile pool. Default fee 0.30%.
  • Picking the wrong type bleeds value to arbitrageurs and hurts everyone in the pool.

Fees can be customized per pool by the protocol fee manager up to a 3% cap. See Pool Fees for the full fee story.

Adding liquidity

  1. 1Open app.topazdex.com/liquidity and find the pair (or create it).
  2. 2Verify pool type — stable or volatile. The first depositor sets the initial price ratio; subsequent depositors must match the current ratio.
  3. 3Enter an amount of either token. The app fills the matching amount based on the current ratio.
  4. 4Approve each token once (one transaction per token, per spender contract).
  5. 5Submit. You receive an LP token representing your share of the pool. It's an ERC-20 in your wallet.
  6. 6Optional: stake the LP token in the pool's gauge to earn TOPAZ emissions. See Staking in Gauges.
The MINIMUM_LIQUIDITY caveat
On the very first deposit to a pool, a small fixed amount of LP tokens (1,000 wei) is burned to the dead address. This prevents the "empty pool dust attack" — locking the price forever — and costs new pool creators ~nothing.

Withdrawing liquidity

Withdrawing is the same flow in reverse. Burn LP tokens, receive your share of both tokens back at the current pool ratio.

  1. 1If your LP token is staked in a gauge, unstake first (claim emissions while you're there).
  2. 2Open the pool's position card on app.topazdex.com.
  3. 3Choose an amount to remove (25%, 50%, 100%, or custom).
  4. 4Confirm. You receive both underlying tokens proportional to your share at exit.
Withdrawing crystallizes IL
If the pool's price ratio has moved since you deposited, you'll receive a different mix of the two tokens than you put in. That's the moment any paper IL becomes realized P/L. If you expect prices to mean-revert and you're in no rush, sometimes waiting beats withdrawing immediately.

Zaps

Don't hold both tokens? Topaz's router supports zaps: provide one token, the router swaps part of it to the other and adds liquidity in a single transaction. Zap-out goes the opposite way: withdraw liquidity and convert both tokens back to one of your choosing. Both flows skip the manual split-and-add step.

Zaps don't support fee-on-transfer tokens — if a token deducts on transfer (some BSC tokens do), zap will fail with an unhelpful message. Add liquidity manually in that case.

Creating a new pool

Anyone can create a new v2 pool through PoolFactory.createPool(tokenA, tokenB, stable). Once created, the address is deterministic via CREATE2 — the same two tokens with the same stable flag will always map to the same pool address.

  • Tokens are sorted by address; the lower one is token0.
  • Initial deposit sets the price ratio. Anyone can be the first depositor.
  • Creating the pool alone doesn't add it to the app's discoverability — for that, see the integration guide on whitelisting.
  • A pool only gets a gauge — and thus emissions — after Voter.createGauge() runs (permissioned).

Project teams listing a new pair should also read the Integration Guide for the full listing flow.

Continue reading