news-crypto

How to Provide Liquidity on a Decentralized Exchange: LP Shares

Providing liquidity to an existing V2-style pool means depositing two tokens at the pool’s current ratio, receiving LP tokens for your share, and later burning those LP tokens to withdraw your share of both reserves.

A pool holds both tokens so traders can swap between them. In a constant-product pool, trades change the reserve balances according to x × y = k, where x and y are the amounts of each token. The Uniswap v2 Core whitepaper explains this reserve rule and how deposits create pool shares. That model applies to the V2-style pool here; your withdrawal amounts depend on the trades that happen after you deposit.

How do you provide liquidity from deposit to withdrawal?

You choose an existing token pair, approve and deposit both tokens, hold the LP tokens you receive, then approve and redeem those LP tokens when you want to leave.

  1. Start with both tokens and gas. Keep the two tokens in the same wallet on the pool’s network. On Ethereum, keep some ETH for transaction fees as well. Suppose your wallet holds token A and token B: having only token A ready will not let you make a two-token deposit into their existing pool.
  2. Choose the pair. Open the liquidity screen and select the existing token A/token B pair. For this step, use Fraxswap to find the pair and see the amounts its interface proposes for a deposit. Confirm the network and token identities before continuing; tokens with similar names can point to different contracts.
  3. Approve the deposit tokens. Give the Fraxswap Router permission to move the amount of token A you intend to deposit, then do the same for token B. Each approval may require its own wallet transaction and gas. An approval only grants spending permission: the tokens are still in your wallet until the add-liquidity transaction succeeds. Once both allowances are sufficient, the deposit can proceed.
  4. Add liquidity at the displayed ratio. Enter an amount for one token and review the amount filled in for the other. An existing pool requires deposits in proportion to its current reserves, so you cannot choose an arbitrary mix. If the pool changes while your transaction is pending, the interface’s limits may cause it to fail instead of accepting an amount outside your settings. Confirm the transaction and wait for it to complete.
  5. Receive and hold the LP tokens. Fraxswap pair contracts issue ERC-20 LP tokens when a deposit succeeds. Your LP token balance records a fraction of the pool: LP tokens you hold divided by all LP tokens outstanding. The two deposited tokens are now in the pair’s reserves, while the LP tokens are in your wallet. They are what you will need to redeem your share later.As traders swap, fees stay in the reserves. That gives each LP token a claim on more reserves than it would have without those fees. Trades also change the mix of tokens: if traders buy token A from the pool, its reserves contain less A and more B. Your LP token balance can stay the same while the amounts it represents change.
  6. Approve the LP token for exit. Open the remove-liquidity screen and choose how many LP tokens to redeem. The approvals you gave for token A and token B do not authorize the router to move the LP token. Unless a sufficient LP token allowance is already in place, approve it first and wait for that transaction to finish. Then submit the separate remove-liquidity transaction. Budget gas for both transactions on exit.
  7. Remove liquidity. Review the estimated amounts of both tokens and the minimum amounts you will accept. Removing liquidity sends your LP tokens to be burned and returns your fraction of each reserve at the pool’s current ratio. You may receive different amounts from those you deposited because swaps have changed the reserves. In the token A scenario, an exit after traders have bought A could return less A and more B.
  8. Confirm the withdrawal. After the remove transaction succeeds, look for both tokens back in your wallet and the redeemed LP tokens gone. Those balances, together with the transaction record, confirm that your share has been withdrawn.

What are LP tokens?

LP tokens are transferable receipts for a proportional claim on a pool’s reserves. Their count alone does not tell you how much of either token you will receive. Compare your LP balance with the total LP supply and the pool’s current reserves to understand the claim.

What is impermanent loss?

Impermanent loss is the difference between the value of your withdrawn pool share and the value you would have had by simply holding the original tokens. It arises when the tokens’ relative price changes and trading shifts the pool’s mix. The difference is realised when you withdraw; fees can offset some or all of it.

Is providing liquidity profitable?

Providing liquidity is profitable only if the value you withdraw, including your share of trading fees, exceeds the value of what you deposited and your transaction costs. Trading volume affects fees, relative price movement affects the token mix, and Ethereum gas adds a cost on both entry and exit.