  Uniswap -- and other constant product markets -- appear to work well in
practice despite their simplicity. In this paper, we give a simple formal
analysis of constant product markets and their generalizations, showing that,
under some common conditions, these markets must closely track the reference
market price. We also show that Uniswap satisfies many other desirable
properties and numerically demonstrate, via a large-scale agent-based
simulation, that Uniswap is stable under a wide range of market conditions.
