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.
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).
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.
The displayed amounts are never correct; you need to subtract the price impact.
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