The swap slippage is given by:
Si→j=Si+(−Sj)=Si−Sj and
Si=ri′−rig(ri′)−g(ri) where is the original coverage and is the final coverage.
If the swap amount is small, the slippage can be give by
Si→j=g′(ri)−g′(ri′) Practical example of slippage calculation
We take the coverage ratio of USDT at 0.909 and ETH at 1.033. Working this out, we’d get:
USDT:
g′(0.909)=−0.90980.00002∗7=0.03% ETH:
g′(1.033)=−1.03380.00002∗7=0.01% Hence we have
SUSDT→ETH=0.03%−0.01%=0.02% This represents the marginal slippage when someone is performing a small amount of swap at this coverage ratio. And yes, the slippage is positive and user can benefit from the swap!