  We consider the market microstructure of automated market makers (AMMs) from
the perspective of liquidity providers (LPs). Our central contribution is a
``Black-Scholes formula for AMMs''. We identify the main adverse selection cost
incurred by LPs, which we call ``loss-versus-rebalancing'' (LVR, pronounced
``lever''). LVR captures costs incurred by AMM LPs due to stale prices that are
picked off by better informed arbitrageurs. We derive closed-form expressions
for LVR applicable to all automated market makers. Our model is quantitatively
realistic, matching actual LP returns empirically, and shows how CFMM protocols
can be redesigned to reduce or eliminate LVR.
