Let's suppose that the two digital assets in the liquidity pool are ETH and DAI, and you deposit 1 ETH and 100 DAI. This type of AMM requires that the two deposited assets maintain a 1:1 ratio, which means that 1 ETH = 100 DAI. Since 1 DAI = 1USD, your deposited assets are now valued at $200. Now imagine that the total pool contains 10 ETH and 1,000 DAI, which is worth $2,000. This means you have a 10% share of the pool. The constant is k = 10 (ETH) * 1000 (DAI) = 10,000, which must always be equal before and after a transaction in the pool. Suppose that the ETH price rises to 400 DAI. According to the AMM formula, the price of ETH in the pool is still 100 DAI. At this time, arbitrageurs can buy ETH at a lower price from the liquidity pool until the token price is back in line with the external price. If we ignore the transaction fees, there will be 5 ETH and 2,000 DAI in the liquidity pool. At the same time, the constant k is still 10,000. If you decide to withdraw funds during this time, you can now withdraw 0.5 ETH and 200 DAI (10% of the pool), which equals $400 (excluding fees). That doesn't seem so bad, but If you would have hodled rather than deposited these tokens, you would now have $500 worth of assets. So that's how you can lose $100 compared to just holding your tokens, and this is what we call impermanent loss.