UnitFlow LogoUnitFlow Docs

Adding Liquidity

Adding liquidity means depositing a pair of tokens into a pool. In return you receive LP tokens representing your share. As traders swap through the pool, you earn a portion of the trading fees.

Before You Start

  • Wallet connected to Arc Testnet
  • Balances of both tokens you want to deposit
  • USDC for gas fees

Adding to an Existing Pool

  1. Go to Liquidity in the header, or navigate to /liquidity.
  2. Click Add Liquidity — or navigate from the Pools page by clickingAdd Liquidity on a specific pool card (tokens will be pre-selected).
  3. Select Token A and Token B from the token selectors.
  4. Enter an amount for one token. The other amount is calculated automatically based on the current pool ratio.
  5. Review the estimated LP tokens you will receive and your projected pool share.
  6. Click Approve Token A and confirm in your wallet (if not already approved). Repeat for Token B.
  7. Click Add Liquidity and confirm the transaction.
  8. LP tokens are minted to your wallet. Your position appears in My Pools.

Creating a New Pool

If no pool exists for your chosen token pair, you must create it first:

  1. In the Liquidity page, switch to the Create Pair tab.
  2. Select the two tokens for the new pool.
  3. Click Create Pool and confirm the transaction. This calls the Factory contract's createPair function.
  4. Once the pool is created, return to the Add Liquidity tab to deposit the initial liquidity. The ratio you deposit sets the initial price.
⚠️
The first liquidity deposit sets the price ratio for the pool. If you deposit tokens at a ratio that differs significantly from market prices, arbitrageurs will immediately rebalance the pool at your expense.

Understanding Your Position

After adding liquidity, your position in My Pools shows:

  • Pool Share — your percentage of the total pool
  • Your Tokens — estimated amount of each token you can withdraw
  • Your TVL — estimated USD value of your position
  • LP Balance — your raw LP token balance