# A details about Ranged pool LP

Hi, just a technical point regarding ranged pools. When we want to provide liquidity via the swap interface, the numbers for both assets are not correct (see photo, amount are proportionnal to price).
To calculate the amounts, the liquidity provided should be proportional to the asset amounts in the pool, not proportional to the price.

What I mean is that if x and y represent the liquidity provided, and if Lq and Lb are the base and quote liquidity of the pool, we should have x/y = Lq / Lb and not x/y = price. In the case of a 50/50 pool, both formulas are identical since price = Lq / Lb, but in the case of ranged pools, the price is not equal to the Lq / Lb ratio.

True regarding this part:

In the case of a 50/50 pool, both formulas are identical since price = Lq / Lb, but in the case of ranged pools, the price is not equal to the Lq / Lb ratio.

But when entering a non-50/50 pool then you enter at a certain price at a certain moment, right? So showing the current price is correct, since Lq/Lb is less important for ranged pools due to their dynamic.

hi,
c.f the first photo

i want to provided liquidity with all my statom.
cf. the second photo for the The result.

I canâ€™t provided all my statom â€¦ showing the good ratio Lq / Lb ratio in cswap make provide liquidity more easy. Itâ€™s just what i mean. and showing the price to !

Can you check how much is added to the pool? Is from either stATOM or ATOM a correct amount added?

I found earlier today that when using â€śMaxâ€ť not all assets are used. That is a different bug imo, but one that is all the more important to solve if your findings are the same.

The amount is correct itâ€™s not a bug in the pools but just the cswap interface (itâ€™s not that important but a bit boring for the users).

Citation I found earlier today that when using â€śMaxâ€ť not all assets are used. That is a different bug imo, but one that is all the more important to solve if your findings are the same.

For liquidity provider or for swaping ?

I had the issue on swapping.

If you choose â€śMaxâ€ť and execute the transaction the result is that not everything is swapped.

Itâ€™s normal that the swapping algorithm is delicate (I think itâ€™s due to the possibility of limit orders).

1. There are two directions in the pools: BUY and SELL. For example, in the CMDX/CMST pool, if you sell CMDX for CMST, you are in the SELL direction, and thereâ€™s no problem; you can sell almost all your CMDX (except for keeping some for fees). However, in the other direction CMST â€”> CMDX, you can only buy CMDX with 90% of the quantity you put in (if youâ€™re in the market). This is how the algorithm message works.

2. The displayed amounts are never correct; you need to subtract the price impact.

3. The prices displayed on the homepage are, I think, a mix of the oracle and cswap pools, but itâ€™s complicated to know the price of a pool without looking into the details.

As much as I admire the work done by the team concerning Harbor, cswap leaves me puzzled another example : the fees on concentrated pools of 0.3 for stable-to-stable exchanges, I find it excessive. â€¦ Looking forward to V2

1 Like