Meteora is a DeFi project on the Solana chain, focusing on building an efficient, sustainable and flexible liquidity layer for the Solana ecosystem. Its goal is to solve the problem of insufficient liquidity on Solana, making transactions smoother and cheaper, while bringing better returns to users who provide liquidity.
Meteoras pools are mainly DLMM pools and Dynamic Pools. In the DLMM pool, you can add bilateral pools and unilateral pools. Among them, dev can use unilateral pools for shipment and accumulation. For example, for the trump/sol trading pair, when the price rises, dev can add only $trump unilateral pools in a higher price range. When the price rises to this price range, it will automatically replace $trump with $sol for shipment, and can also obtain handling fees; when the price falls, dev can add only $sol unilateral pools in a lower price range. When the price falls to the corresponding price range, it will automatically buy $trump to achieve the purpose of accumulation.
If we want to know at what price dev uses the one-sided pool to sell and absorb funds, then it is necessary to know the corresponding price range.
1. Basic Concepts
Website: https://app.meteora.ag/
1. Trading pairs
Any two coins form a trading pair, for example, $trump and $sol form the trump-sol trading pair, and $trump and $usdc form the trump-usdc trading pair.
2. Pool (LP pool)
Each trading pair can have multiple Pools, and each Pool is distinguished by Bin Step and Fee. For example, there are 57 Pools under the trump-usdc trading pair, and each Pool corresponds to a unique address, as shown in the figure
3. bin
Each bin in DLMM represents a price, and each bin is a buy order or a sell order at a certain price.
4. Bin step
Bin step refers to the price interval between two adjacent bins, calculated in basis points (1 basis point = 0.01%). It determines the density of the bins and the fineness of the liquidity distribution, and is set by the creator of the pool.
For example:
Assume that the current SOL/USDC price is $20 and the bin step is set to 25 basis points (0.25%).
The price of the next bin is 20 × 1.0025 = 20.05 USD, the next one is 20.05 × 1.0025 ≈ 20.10 USD, and so on.
5. Position
A position is used to describe how a liquidity provider allocates funds to a specific price range. Each position corresponds to a unique address. A position is created in a pool, and a pool can create multiple different positions.
A position usually contains the following key elements:
(1) Price range
Each position has a clear price range, which represents the price range that the liquidity provider hopes to support. This price range consists of a set of consecutive bins.
(2) Amount of funds
The amount of two tokens (such as SOL and USDC) to put in. Meteora will calculate the specific ratio of each token based on the current price and range to ensure that the pools needs are met.
(3) Distribution strategy
Meteora provides several liquidity distribution methods, allowing users to decide how funds are allocated to each bin:
Spot (Uniform Distribution): Funds are evenly distributed to each bin, which is suitable for scenarios where small price fluctuations are expected.
Curve (Bell-Shaped Distribution): Funds are concentrated near the current price. The farther away from the current price, the less funds there are. It is like a bell-shaped curve, which is suitable for LPs who want to focus on the current price.
Bid-Ask (bidirectional distribution): funds are concentrated on both sides of the current price, forming two peaks, which is suitable for high volatility markets.
(4) Bin Step
The user cannot change the bin step when creating a position, which is set when the pool is created.
2. Connect to wallet to view
Meteora supports viewing the positions held after connecting to the wallet address, and supports viewing by observing the wallet. We can use this feature to view the price range of the pool.
Take $trump (6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN) as an example.
First, we open debot and enter $trumps CA to find out the address of dev 5 e 2 qRc 1 DNEXmyxP 8 qwPwJhRWjef 7 usLyi 7 v 5 xjqLr 5 G 7, as shown in the figure
Then, open the Phantom wallet, [Add/Connect Wallet]--[Watch Address], enter the Name and Address, here fill in the dev address 5e2qRc1DNEXmyxP8qwPwJhRWjef7usLyi7v5xjqLr5G7
Finally, open Meteora and connect to the Phantom wallet. Click [Portfolio] at the top to see all added pools. Click any DLMM pool to display the pool details and all positions, as shown in the figure.
The Bin Step and Base Fee on the left side of the picture are the information of the current pool, and the middle part is the positions in different price ranges. Click on any position to see the current balance, unclaimed handling fees, distribution strategy and other information.
The advantage of viewing the price range in this way is that it is convenient and intuitive, and all currently existing position data can be listed; the disadvantage is that it cannot be viewed when liquidity is withdrawn.
3. On-chain data calculation
We can use on-chain data to calculate the price range for each position, regardless of whether the position still exists.
The calculation formula is given in the Meteora documentation
Minimum value of the price range: min_price = ( 1 + bin_step / 10000) ^ lower_bin_id
Maximum value of the price range: max_price = ( 1 + bin_step / 10000) ^ upper_bin_id
If the trading pair is represented by A/B, where the precision of token A is decimals_A and the precision of token B is decimals_B, then the final calculation formula is
Minimum price range: min_price = ( 1 + bin_step/10000) ^ lower_bin_id/10 ^(decimals_B-decimals_A)
Maximum value of the price range: max_price = ( 1 + bin_step/10000) ^ upper_bin_id/10 ^(decimals_B-decimals_A)
It should be noted that the price calculated here is the price of token A relative to token B. If you want to view the price of token A relative to USD, you also need to query the USD price of token B and then convert it.
From the above formula, we can see that to calculate the data, we need to know the bin_step of a pool, the lower_bin_id and upper_bin_id of the position, and the precision of the two coins in the trading pair.
Continuing with $trump (6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN) as an example, calculate the price range of a unilateral pool of this dev.
We open solscan, enter the dev address of $trump (https://solscan.io/account/5e2qRc1DNEXmyxP8qwPwJhRWjef7usLyi7v5xjqLr5G7?activity_type=ACTIVITY_TOKEN_ADD_LIQpage=5#defiactivities), open the [Defi Activities] tab, select ADD LIQUIDITY in the [Action] filter, and you can see in the Amount column that all the listed liquidity transactions are one-sided pools, either only $trump is added or only $usdc is added. This article takes the last transaction in the figure as an example, as shown in the figure
Open the last transaction in the above picture (https://solscan.io/tx/284UXTrgWNFFXTovbCAQsJA8U5mW4rntwa8KyRvSmhNYf7cus1rtskiVqwNkErdosDMUsJfxXm8KgkCf1DzTPmPr), check the transaction details, and you can see that this addition pool only adds $trump, as shown in the figure
We open the links of $trump and $usdc respectively, and we can find that the precision of $trump is 6, and the precision of $usdc is also 6, as shown in the figure
Check down the transaction details page, in [#4.1 - Meteora DLMM Program: initializePosition], you can see that lowerBinId is 1062, the bin width (i.e. the number of bins) is 46, and the pool address is 9d9mb8kooFfaD3SctgZtkxQypkshx6ezhbKio89ixyy2, as shown in the figure. From the above information, we can calculate that upperBinId = lowerBinId + widh - 1 = 1062 + 46 - 1 = 1107
Open the pool address 9d9mb8kooFfaD3SctgZtkxQypkshx6ezhbKio89ixyy2 on solscan (https://solscan.io/account/9d9mb8kooFfaD3SctgZtkxQypkshx6ezhbKio89ixyy2), click the [data] tab, switch from LbPair to Table, and you can find that the value of binStep is 50, as shown in the figure
From the above information, we can get all the data needed in the calculation formula:
bin_step = 50
lower_bin_id = 1062
upper_bin_id = 1107
decimals_A = 6
decimals_B = 6
Then we can calculate
Minimum price range: min_price = (1 + bin_step/10000) ^ lower_bin_id/10 ^(decimals_B-decimals_A)=(1+ 50/10000)^ 1062/10 ^(6-6)= 199.6905832
Maximum value of the price range: max_price = (1 + bin_step/10000) ^ upper_bin_id/10 ^(decimals_B-decimals_A)=(1+ 50/10000)^ 1107/10 ^(6-6)= 249.9368917
The calculated price range is exactly the same as the price range in the second part of the picture.
IV. Conclusion
Combined with monitoring tools, when we find that dev or other big investors are adding unilateral pools, we can use the above method to calculate the price range in which they are preparing to sell or buy, and then make decisions based on K-line and other data. The $libra issued by Argentine President Milley also uses unilateral pool addition to ship. The above method can be used to review the price range in which he added the pool at that time.
The tools I often use are debot , gmgn and okx, but these three tools are not very convenient for checking liquidity. Here are some useful functions I would like to have:
1. List all operations of dev, including transfer in, transfer out, adding pool, and withdrawing pool, and identify and mark the transactions involving lock-up and adding and withdrawing pools in transfer in and transfer out.
Debot can recognize all transfers in and out, but it does not add or remove pools;
gmgn can identify pool addition and pool withdrawal, but cannot identify devs transfer in and out. In the trump coin, devs pool addition and pool withdrawal transactions are not recognized either.
OKX has a fund pool change function, which lists the addition and withdrawal of pools separately, but in the Trump coin, Dev’s pool addition and withdrawal transactions are not recognized.
2. For each pool addition and withdrawal, a specific price range can be given, so there is no need for manual calculation.
3. When calculating dev’s profit data, include the received handling fees and the change in funds when withdrawing the pool, so that you don’t have to manually calculate the profit situation.
This function is mainly possible for debot and gmgn , after all, they have made profit data for each address.
I hope these tools can become more and more useful!