One of the first and so far most successful applications of Decentralized Finance (DeFi), financial applications run on permissionless blockchains, are so-called Automated Market Makers (AMMs). They are used to trade cryptocurrencies algorithmically without relying on a custodian or trusted third party. The state of a typical AMM used in DeFi consists of the current inventories of the traded tokens. Trades are made such that some invariant of these inventories is kept constant. Traders who want to exchange tokens of type A for tokens of another type B, add A tokens to the inventory and in return obtain an amount of B tokens from the inventory so that the invariant is maintained. While these Constant Function Market Makers (CFMMs) proved to be very popular and reliable, the construction of invariants to define them seems in many ways ad-hoc and not founded in much theory. In this paper, we fill this gap and propose an axiomatic approach to constructing CFMMs. The approach is, as in any axiomatic theory, to formalize simple principles that are implicitly or explicitly used when constructing trading functions in practice and to check which classes of functions satisfy these principles, beyond those functions already used in practice.