Which pools has larger swap slippage for 50/50 pools and 80/20 pools?

x3finance
3 min readMay 28, 2022

--

In the previous post, we compared the difference of impermanent loss between 50/50 pools such as uniswap and 80/20 pools such as balancer. Impermanent loss is a concern of liquidity providers, but traders are more concerned about swap slippage. The swap slippage refers to the difference between the swap price and the spot price of pools. In a centralized exchange, the worse the order book depth, the larger the slippage. So for automatic market makers, what does the slippage depend on? Let’s compare the difference between 50/50 pools and 80/20 pool slippage now. Assuming that the number of ETH is x, the amount of USDT is y, and the proportion of value for ETH is r, then it satisfies:

y=k(x)^(r/(r-1)) — — — — — — — — (1)

According to the proportional relationship between ETH and USDT:

yr=(1-r)px — — — — — — — — — — — (2)

The trader swap △y USDT to the liquidity pool for △x ETH, then after the swap, the liquidity pool satisfies:

y+△y=k(x-△x)^(r/(r-1)) — — — — — — (3)

Simultaneous (1) (2) (3) get:

△x=x(1-(1+△y/y)^ ((r-1)/r) —— — — -(4)

So swap price:

△y/△x=△y/ x(1-(1+△y/y)^ ( (r-1)/r)=p((1-r)/r)(△y/y )/ (1-(1+△y/y)^ ( (r-1)/r) — ------------------------(5)

That is,

It can be seen from the above formula that the swap price Pswap is positively related to △y/y,

When r=0.5, the swap price:

When r=0.2, the swap price:

Here,Pswap0.5<Pswap0.2

In fact, Pswap is a monotonically decreasing function of r, as shown in the figure below, that is, the larger r, the smaller the Pswap. For example, when you go to 80/20 pools to swap the 80% tokens for the 20% tokens in the liquidity pools, you will suffer larger slippage than that of 50/50 pools with the same △y/y. But when you go to 80/20 pools to swap the 20% tokens for the 80% tokens in the liquidity pools, you will suffer lower slippage than that of 50/50 pools with the same △y/y.

--

--

x3finance
x3finance

Written by x3finance

Free High Profit Excel AI Crypto Trading Bot including Okx and Binance

No responses yet