What are AMMs (Automated Market Maker) and CFMMs (Constant Function Market Maker)

file icon

What are AMMs (Automated Market Maker) and CFMMs (Constant Function Market Maker)

Automated market makers are a staple of the DeFi space. They are a kind of decentralized token exchange that enables anyone to create markets seamlessly and efficiently. 

An AMM is a protocol that relies on a mathematical formula to price assets. Instead of using a traditional order book, assets on AMMs are priced according to an algorithm.

Like an order book, however, AMMs use trading pairs – for example, ETH/XRD. The revolutionary part is that instead of having someone on the other side to make a trade, you directly interact with a smart contract. The AMM “makes” the market for you.

One of the most common types of AMM is a Constant Function Market Maker, pioneered by Uniswap. CFMMs work when one type of user, a “liquidity provider,” places two assets into a smart contract - creating a “pool” of liquidity. Other users can then trade between those two assets by either depositing and withdrawing from the pool. The price of each of those two assets changes on a fixed “bonding” curve, depending on the ratio of the two assets in the pool. In this way, CFMMs can always make a market, as there will always be some ratio of those two assets with a price determined by the bonding curve. 

Some prominent examples of AMMs in the market as of Q2 2021 are Uniswap, Sushiswap, Curve, and Balancer.

Uniswap was the first CFMM and has the highest volume of any AMM or DEX today. Uniswap v3 now allows users to provide “concentrated liquidity,” which is more capital-efficient than the bonding curves used in Uniswap v2. 

Sushiswap is a fork of Uniswap but with unique governance and reward mechanisms. 

Curve specializes in creating liquidity pools of similar assets such as stablecoins. As a result, it offers some of the lowest slippage and most efficient use of capital in the industry.

Balancer is an AMM that creates liquidity pools with up to eight different tokens in any ratio. Pools can be thought of as automatically rebalancing portfolios, allowing you to create or join a decentralized index fund.

Further reading: