What Is A Constant Product Market Maker?

Updated July 13, 2026 7 min read

Traditional exchanges match buyers and sellers through an order book, a running list of bids and asks. A lot of crypto trading uses no order book at all — instead, a simple mathematical formula sets the price automatically.

The short answer

A constant product market maker is a pricing mechanism, used by many automated liquidity pools in decentralized finance, that sets trade prices using a formula requiring the product of two token quantities in a pool to remain constant before and after each trade. As one token is bought from the pool, its quantity decreases and the other token’s quantity increases, and the formula automatically raises the price of the token being removed as the pool’s balance shifts. This replaces the need for a human market maker or a matched buyer and seller, since the formula itself generates a price for any trade size at any moment.

The formula in plain terms

The core idea is usually written as x multiplied by y equals k, where x and y represent the quantities of two different tokens held in a pool, and k is a constant the formula is designed to preserve. If someone trades one token for the other, the pool’s software calculates exactly how much of the second token to release so that, after accounting for the trade, the product of the new quantities still equals that same constant. Practically, this means small trades move the price only slightly, while large trades relative to the pool’s size move the price considerably more, a pattern often referred to as slippage.

Where the liquidity actually comes from

These pools aren’t funded by a single institution acting as a dedicated market maker. Instead, they’re typically funded by outside participants who deposit pairs of tokens into the pool in exchange for a share of the trading fees generated by others using it. This crowdsourced structure is a big part of what makes automated liquidity pools function without a centralized order book, though it also means the pool’s depth — and therefore how much a large trade moves the price — depends entirely on how much has been deposited by these participants at any given time.

Risks specific to this design

Why this differs from traditional trading

Because prices in a constant product system are generated purely by the formula and the pool’s current balances, they can temporarily diverge from prices on other markets until trading activity brings them back in line, a gap that outside participants are often incentivized to correct. This is a structurally different process than an order book matching a human or algorithmic buyer with a seller at an agreed price, and it’s worth understanding as a distinct mechanism rather than assuming it behaves like a traditional exchange.

The takeaway

A constant product market maker replaces order books and dedicated market makers with a formula that automatically prices trades based on pool balances, funded by outside depositors rather than a single institution. The tradeoff for that automation is a specific set of risks — slippage, impermanent loss, and dependence on correctly functioning code — that are different in kind from the risks of trading on a traditional, order-book-based exchange.