This article provides a detailed tutorial on adding PancakeSwap liquidity, focusing on the latest features and processes of the V3 version. PancakeSwap is a decentralized exchange (DEX) running on the BNB chain that allows users to trade and provide liquidity to earn trading fees. This guide aims to provide users with clear steps and explain the relevant risks and precautions.

pancakeswap-slerftools

Background and Overview

PancakeSwap is a popular DEX in the BNB chain ecosystem, similar to Uniswap on Ethereum. It uses an automated market maker (AMM) model where users can facilitate transactions by providing tokens to the liquidity pool and receive a share of the transaction fees. The V3 version introduces a centralized liquidity feature that allows liquidity providers (LPs) to provide liquidity within a specific price range, thereby improving capital efficiency.

Providing liquidity involves depositing two tokens into a pool in exchange for liquidity provider (LP) tokens, which represent your share in the pool and can be used to earn fees and potential rewards. However, this also comes with risks, such as impermanent loss (when the price of the tokens in the pool changes, the value of your LP tokens may be lower than holding the tokens separately).

Preparation

Before starting, users need to:

  • A wallet compatible with the BNB Chain, such as MetaMask or Trust Wallet, and ensure it is connected to the BNB Chain network.

  • The tokens you plan to add liquidity for, ensuring there is enough balance in your wallet.

  • Understand the risks of providing liquidity, especially impermanent loss, and only invest funds you can afford to lose.

Also, ensure your wallet has some BNB for transaction gas fees. Gas fees fluctuate based on network congestion, typically ranging from a few cents to a dollar (in BNB).

Detailed step-by-step guide

1. Visit the PancakeSwap website

Open the official PancakeSwap website. This is the main entry point for adding liquidity.

2. Connect your wallet

Click the 'Connect Wallet' button in the top right corner, select your wallet provider (such as MetaMask or Trust Wallet), and follow the prompts to complete the connection.

  • Ensure your wallet is switched to the BNB Chain network. If it is defaulted to the Ethereum network, the system will prompt you to switch networks.

  • Once connected, confirm that your wallet address is correct and that you have enough BNB to pay for gas fees.

3. Navigate to the liquidity page

In the top navigation bar of the website, hover over the 'Earn' tab, then click on 'Liquidity'. This will take you to the liquidity management page where you can add or remove liquidity.

4. Select the token pair

On the liquidity page, use the input box on the top left to select the two tokens you want to add liquidity for.

  • Use the search function to find the tokens, or select from the list.

  • For example, you can choose BNB and CAKE, or other BEP-20 token pairs.

  • If you need one of the tokens, you can swap on PancakeSwap (refer to How to Trade on PancakeSwap).

5. Ensure to use V3 liquidity

PancakeSwap interface defaults to adding V3 liquidity, but there are exceptions:

  • If the trading pair has an active PancakeSwap V2 farm, V2 liquidity will be added by default.

  • If there is an existing V2 liquidity pool for the trading pair, a link to 'Add V2 Liquidity' will be displayed, which you can click to switch to V2.

  • To confirm that you are adding V3 liquidity, check the displayed information 'V3 LP - x% fee tier'. If it shows 'V2 LP - 0.25 fee tier', then it is a V2 pool.

  • For this tutorial, we assume you are selecting a V3 pool. If there is no V3 pool, you may need to choose a different pair or wait for the pool to be created.

6. Select the trading fee tier

V3 offers four trading fee tiers: 0.01%, 0.05%, 0.25%, and 1%.

  • 0.01% is suitable for stablecoin pairs (like USDT/USDC), which have low price volatility and high trading frequency.

  • 0.05% is suitable for assets with slightly higher volatility, offering higher fee income to incentivize LPs.

  • 0.25% is the standard tier, applicable to most moderately volatile token pairs.

  • 1% is suitable for highly volatile or low-volume assets to compensate for the higher impermanent loss risk.

  • The interface usually automatically selects the most popular fee tier, but you can click 'More' to customize your selection. It is recommended to choose the most popular tier to ensure maximum liquidity utilization.

7. Set the price range

The core innovation of V3 is concentrated liquidity, allowing LPs to provide liquidity within a specific price range.

  • The interface will automatically suggest a default price range, but you can customize it.

  • In the chart displayed on the right, you can see the price history and the current price distribution.

  • Use the slider or input box on the chart to set the lower and upper limits of the price range.

  • The choice of price range affects your capital efficiency:

    • A narrower range (e.g., ±10% of the current price) concentrates liquidity and may yield higher fee income, but if the price goes outside the range, your position becomes inactive and stops earning fees.

    • A wider range offers more flexibility but may dilute your fee income.

  • It is advisable to choose a range based on the historical price volatility of the token pair, for example, a narrower range for stablecoin pairs and a wider range for highly volatile tokens.

8. Enter the deposit amount

After setting the price range, enter the amount of one token you want to deposit.

  • The interface calculates the amount of the other token required based on the current price and the price range you selected.

  • For example, if you enter 100 BNB, the interface may indicate that you need 2000 USDT (assuming the current price is 1 BNB = 20 USDT).

  • Ensure you have enough of both tokens in your wallet. If you are missing a token, you can swap on PancakeSwap or obtain it through other platforms.

9. Review and confirm the transaction

Before submitting, review the transaction details, including:

  • Estimated fee income (based on historical trading volume and fee tier).

  • Required gas fee (in BNB).

  • Details of your liquidity position, such as price range and estimated APR.

  • Click the 'Supply' or 'Add Liquidity' button to continue.

10. Approve the transaction

Confirm the transaction in your wallet; the system will prompt you to pay gas fees.

  • Ensure you have enough BNB; otherwise, the transaction will fail.

  • Gas fees fluctuate based on network congestion, typically ranging from a few cents to a dollar.

11. Wait for confirmation

After submitting the transaction, wait for blockchain confirmation. This may take a few seconds to a few minutes, depending on network conditions.

12. View your position

After the transaction is confirmed, you will receive a liquidity provider NFT token representing your liquidity position.

  • You can view and manage your position in the 'Positions' tab.

  • In V3, trading fees do not automatically reinvest; you need to manually claim fees and rewards in the position details page.

  • If the price goes outside your range, the position becomes inactive until the price returns within the range to continue earning fees.

Risks and considerations

Providing liquidity involves the following risks:

  • Impermanent loss: When the price of the tokens in the pool changes, the value of your LP tokens may be lower than holding the tokens separately.

  • Price outside range: In V3, if the price goes outside the range you set, your position becomes inactive and stops earning fees.

  • Smart contract risk: Although PancakeSwap is audited, DeFi applications may still have vulnerabilities, so it is advisable to only invest funds you can afford to lose.

Recommendation:

  • When choosing a price range, consider the historical price volatility of the token pair. A narrower range may yield higher returns but comes with higher risks.

  • Regularly monitor market conditions and adjust your position if necessary (by removing liquidity and re-adding it).

  • Understand the impact of fee tiers and choose options that suit your risk preference.

Surprising details

A surprising feature of PancakeSwap V3 is that by setting a narrower price range, LPs can achieve the same effective liquidity with less capital. For example, in V2, you might need to deposit $1,000 to cover the entire price range, while in V3, you might only need $370 to provide the same liquidity within a specific range (assuming the range is ±50% of the current price). However, if the price goes outside the range, your position becomes inactive until the price returns within the range, which increases flexibility but also increases management complexity.

A comparison of V2 and V3

While this tutorial focuses on V3, it is worth mentioning that V2 still exists for some trading pairs. V2 distributes liquidity across the entire price range, while V3 allows for concentrated liquidity, offering higher capital efficiency. The fee tier for V2 is fixed at 0.25%, while V3 offers flexible options of 0.01%, 0.05%, 0.25%, and 1%. Users should choose the appropriate version based on the trading pair; typically, V3 is the more modern and efficient choice.

Technical details and calculations

In V3, liquidity is managed in the form of non-fungible tokens (NFTs), with each position having unique settings such as price range and fee tier. These NFTs are transferable and represent your ownership of the underlying assets and trading fees. Fees do not automatically reinvest; LPs need to claim them manually, which is different from V2's automatic reinvestment mechanism.

The choice of price range directly impacts your capital efficiency. For example, if you set a price range of ±10% of the current price, your liquidity will only be active within that range, and outside the range, your position will only contain one token, stopping fee earnings. This requires LPs to closely monitor market price fluctuations.

Real-world example

Assuming you want to add liquidity for the BNB/CAKE pair:

  • The current price is 1 BNB = 20 CAKE.

  • You choose a 0.25% fee tier, with a price range of 18-22 CAKE/BNB.

  • You enter 10 BNB, and the interface calculates that 200 CAKE is needed (based on the current price of 20 CAKE/BNB).

  • The total value is $210 (assuming BNB price is $300, CAKE price is $15).

  • After submitting the transaction, you will receive an NFT token representing your liquidity position.

If the price stays within the range of 18-22, you will continue to earn fees; if the price drops to 17, your position will become inactive until the price returns to the range.

Summary

By following the steps above, you can successfully add liquidity to PancakeSwap V3 and start earning trading fees. Remember to regularly monitor your position and adjust your strategy based on market conditions. Providing liquidity is a great way to earn passive income, but it also comes with risks, so it is recommended to do thorough research and act cautiously.

Key references

  • PancakeSwap official documentation: How to add/remove liquidity

  • BitDegree tutorial: PancakeSwap liquidity providing guide


This article is sponsored by SlerfTools, a comprehensive platform designed for blockchain developers to help you easily create and optimize memecoins.

Features of SlerfTools
SlerfTools offers a one-click token creation feature, allowing you to create standard memecoins or clone popular tokens without coding. It also includes batch trading tools to boost trading volume and liquidity, and optimizes data to help memecoins trend. The platform supports multiple decentralized exchanges like Pump.fun and Uniswap, covering networks such as Solana, BSC, Ethereum, Base, Tron, and TON, and has safely processed over a million transactions, with an intuitive interface suitable for blockchain novices.

Visit the link
Visit slerf.tools now, connect your wallet, and ignite your blockchain dreams!