Swap Liquidity
Liquidity Addition Process: Creating a Liquidity Pool Based on the AMM Model
Below is the detailed process for adding liquidity, along with guidance and explanations:
1. Go to the Swap Page and Select the Liquidity Button
On the Swap page, click the Liquidity button to enter the liquidity addition interface. Here, you can choose to add liquidity for two tokens (usually the token you issued and a mainstream asset such as BNB or ETH). Creating a liquidity pool requires you to provide an equal value of both tokens as initial funding.
2. Input the Two Tokens for Adding Liquidity
For example, you can choose 400 USD and 400 Apples (Token) as the initial liquidity. This means you need to provide an equal value of both assets to create a liquidity pool. Using 400 USD and 400 Apples as an example, the initial exchange ratio in the liquidity pool would be 1 USD = 1 Apple.
Explain the AMM Logic: M * N = K
The logic of Automated Market Makers (AMMs) is based on the following formula:
Where:
M represents the amount of Token A in the liquidity pool (e.g., USD).
N represents the amount of Token B in the liquidity pool (e.g., Apples).
K is a constant value, representing the invariant product of the liquidity pool.
Initial State Calculation Example:
You provide 400 USD and 400 Apples, so the initial M×N is:
This K value remains constant unless additional liquidity is added or removed.
Changes in Exchange Ratio:
When a user wants to exchange USD for Apples, the amount of USD in the pool increases while Apples decrease, and the ratio adjusts dynamically according to the formula.
For example, if a user exchanges 100 USD for Apples, the pool's USD amount becomes 500, and the Apples amount becomes 320. The new exchange ratio adjusts automatically, meaning the user has purchased 80 Apples with 100 USD.
Earnings as an LP: Collecting Transaction Fees
When you provide funds to the liquidity pool, you become a liquidity provider (LP).
Every time a user makes a trade through this liquidity pool, you earn a proportional share of the transaction fees.
For example, if the transaction fee is 0.3%, you will receive a corresponding share of the fees for every trade.
For More Advanced Liquidity Management (e.g., Uniswap V3)
For advanced users, if you wish to manage more complex liquidity strategies, such as Concentrated Liquidity in Uniswap V3, you can refer to the [relevant documentation].
Uniswap V3 offers a more efficient use of liquidity but requires users to select specific price ranges for providing liquidity.
For beginners, we recommend starting with the standard AMM model (e.g., Uniswap V2 or similar models).
Last updated