  This work focuses on the mathematical study of constant function market
makers. We rigorously establish the conditions for optimal trading under the
assumption of a quasilinear, but not necessarily convex (or concave), trade
function. This generalizes previous results that used convexity, and also
guarantees the robustness against arbitrage of so-designed automatic market
makers. The theoretical results are illustrated by families of examples given
by generalized means, and also by numerical simulations in certain concrete
cases. These simulations along with the mathematical analysis suggest that the
quasilinear-trade-function based automatic market makers might replicate the
functioning of those based on convex functions, in particular regarding their
resilience to arbitrage.
