In traditional financial markets, every security needs a market of buyers and sellers in order to be efficiently traded. Nowadays, the speed and simplicity with which stock trading happens is taken for granted, especially in the newly introduced paradigm of Robinhood investing. In this new era, market makers play a pivotal role, creating a seamless trading experience between market participants. Over the past year, this market player has been ported to the crypto ecosystem in the form of an algorithmic agent called Automated Market Makers (AMMs).
AMMs perform the same function as their traditional counterparts; they facilitate trading between two digital assets. However, instead of a big bank or a trading firm making markets, a smart contract makes markets algorithmically. Unlike traditional market makers that rely on vast resources to provide a tight bid-ask-spread, AMMs redefine the way liquidity is provisioned and apply mathematical formulas to determine the price at which assets are exchanged.
Constant Function Market Makers (CFMMs) are the most popular family of AMMs. Under the hood, this kind of AMM uses a constant function as its pricing mechanism whenever a trader is looking to exchange token A for token B. In this context, the term “constant function” refers to the fact that the product of the asset reserves must remain constant with all incoming trades.
Since 2017 this constant function has been modified by several decentralized exchanges to optimize for different use cases. Below I will cover some of the most popular decentralized exchanges using CFMMs and elaborate on their specific constant function implementation.
Uniswap was the first decentralized exchange to popularize the use of a constant function to exchange two assets. The protocol uses an AMM variant called the “constant product AMM” which enforces that the product of the two asset reserves must always remain constant.
Roberto is the Head of Data Science at Messari. Prior to his current role Roberto worked as a researcher focusing on DeFi and DAO treasury management. Before joining Messari Roberto spent 4 years at BlackRock working as a quantitative developer focusing on building high performance Python tooling for research.