How Does a Constant Product Market Maker (CPMM) Work?
A CPMM, like Uniswap v2, maintains a constant product for the reserves of two assets in a liquidity pool, defined by the formula x y = k. When a user trades, the ratio of x and y changes to maintain k, which determines the new price.
The larger the trade, the more the price shifts (slippage), which is the mechanism exploited by sandwich attacks.
Glossar
Constant Sum Market Maker
Framework ⎊ A Constant Sum Market Maker (CSMM) represents a novel approach to automated market making, particularly relevant within cryptocurrency derivatives and options trading, designed to maintain a predetermined balance between bid and ask liquidity provision.
CPMM Model
Model ⎊ The Constant Product Market Maker (CPMM) represents a foundational mechanism within decentralized exchanges (DEXs) and increasingly, centralized platforms offering crypto derivatives.
Constant Product Market Maker (CPMM)
Formula ⎊ The Constant Product Market Maker (CPMM) operates on the fundamental invariant formula x y = k, where x and y represent the quantities of two assets in a liquidity pool, and k is a constant value.
CPMM
Mechanism ⎊ Constant Product Market Makers (CPMMs) represent a specific automated market maker (AMM) design, fundamentally altering liquidity provision within decentralized exchanges.
Constant Product
Invariant ⎊ The core principle dictates that the product of the quantities of the two assets in a liquidity pool remains constant, represented mathematically as $x cdot y = k$, where $x$ and $y$ are the reserves of the two tokens.