Right, but my understanding is there is an automatic balancer. At a certain divergence in value between the two assets, it will automatically buy or sell one or both of those assets to rebalance the pool so they are equal again. Impermanent loss is the difference between what you get when liquidating your pool stake vs what you would have had if you'd just kept the two assets outside the pool. If one asset goes up in value, the balancer (arbitrageur) will sell some of it into the asset on the other side. This transaction has a fee associated with it as they are buying/selling that asset from somewhere else to put back in the pool and keep it balanced. Whether that fee is from the exchange they're buying it from or whether there's a fee charged by the balancer itself, or both, I don't know but...that's where the impermanent loss comes from.
I would argue that if a pool started with a 50/50 balance and then the price of one asset doubled and then went back to where it started, and no money was taken out or put into that pool along the way other than by the balancer, and then the entire pool cashed out exactly where they entered, in that scenario, the pool facilitator (Uniswap, Cubdefi, etc.) would actually suffer a loss. That loss would be the transaction fees it incurred to rebalance the pool along the way in both directions.
Posted Using LeoFinance Beta