# Why is the ratio of liquidity pools adjusting itself? Is it possible to create a pool with a stable ratio?

I want to ask if there is any mathematical or technical reason for the mechanism of adjusting liquidity pools by changing the amount of assets. Can we not only adjust the ratio for the swappers (users of the pool) and hold the ratio fix for the LP providers? So LP providers get back what they provided, but people who use the pools for exchanging tokens get the "current" market rate? So there would be no impermanent loss, right?

Could such a pool be implemented technically? What are the disadvantages?

It's simply mathematically impossible. Let me show you why.

1. Someone creates an empty pool

2. LP1 adds 100 tokenA and 200 tokenB

3. LP2 adds 400 tokenA and 800 tokenB

4. Some trades occur and the pool now has 1000 tokenA and 500 tokenB

5. If LP2 now wanted to remove his whole share, there simply aren't enough of tokenB for him to withdraw.

• Thanks for your answer! You make the assumption that everybody gets the exact same amount of token back which they provided into the pool. But why not just returning its "share" as percentage of the current pool. So why not giving him 400/500 * 1000 tokenA and 800/1000 * 500 tokenB? Commented Aug 2, 2021 at 15:42
• Isn't that what happens currently? LPs get back the reserves in the same percentage they input liquidity originally Commented Aug 2, 2021 at 16:52

It is because of `Constant Function Market Makers` formula. Based on this formula, multiplication of amounts will always be constant. Let's say initially you had 4000 A and 4000 B tokens. Multiplication of amounts

``````  // 16.000.000 will always be constant
4000 X 4000 = 16.000.000
``````

Let's say one user brought 1000 A tokens. Now, the total amount of token A will be 5000. We have to decide how many token B we have to transfer to the user.

The multiplication of tokens has to be 16.000.000 all the time. we had 5000 token A, how many tokens B should remain in the pool

`````` 16.000.000 / 5000 = 3.200
``````

3.200 token B should remain in the pool. so we have to transfer 4000-3200=800 token B to the user.

this system will create an arbitrage opportunity. Currently, asset ratio is

``````3200 / 5000 = 64%
``````

`````` // token A is more expensive because it has less
``````1 token B=1 token A