How Would This Formula Change for a Liquidity Pool Governed by a Constant Mean or Constant Sum Formula?
A constant sum formula (x+y=k) creates a zero-slippage trading curve, but it cannot provide infinite liquidity and is only suitable for tokens that should have a 1:1 price ratio, like stablecoins. A constant mean formula, used in weighted pools, allows for different asset ratios (e.g.
80/20) and is a generalization of the constant product formula. It alters how the pool rebalances, which in turn changes the characteristics and magnitude of impermanent loss, often reducing it for the less-weighted asset.