Provide an Example of the Impermanent Loss Calculation for a 50% Price Change in One Asset.
Assume an initial deposit of 1 ETH and 1000 DAI, with ETH price at 1000 DAI. Total initial value is 2000 DAI.
If ETH price rises 50% to 1500 DAI, the new pool ratio must satisfy $x y = 1000$ and $x/y = 1500$. Solving for $x$ and $y$ gives $x approx 0.8165$ ETH and $y approx 1224.75$ DAI.
The new total value is $2449.5$ DAI. Simply holding the assets would yield $2500$ DAI.
The IL is approximately 2.02%.