  Constant-function market makers (CFMMs), such as Uniswap, are automated
exchanges offering trades among a set of assets. We study their technical
relationship to another class of automated market makers, cost-function
prediction markets. We first introduce axioms for market makers and show that
CFMMs with concave potential functions characterize "good" market makers
according to these axioms. We then show that every such CFMM on $n$ assets is
equivalent to a cost-function prediction market for events with $n$ outcomes.
Our construction directly converts a CFMM into a prediction market and vice
versa.
  Conceptually, our results show that desirable market-making axioms are
equivalent to desirable information-elicitation axioms, i.e., markets are good
at facilitating trade if and only if they are good at revealing beliefs. For
example, we show that every CFMM implicitly defines a proper scoring rule for
eliciting beliefs; the scoring rule for Uniswap is unusual, but known. From a
technical standpoint, our results show how tools for prediction markets and
CFMMs can interoperate. We illustrate this interoperability by showing how
liquidity strategies from both literatures transfer to the other, yielding new
market designs.
