entekhab.netentekhab.nettrilingual encyclopedia

Automated Market Maker

ENGLISHAutomated Market Makerreference
فارسیبازارساز خودکارRecommended equivalent
کوردیبازاڕسازی ئۆتۆماتیکProposed equivalent — not standard
Category
Decentralised Finance
Level
Professional

Simple definition

A pool of two assets that quotes its own prices by a fixed rule instead of matching buyers with sellers. You trade against the pool, and every trade changes the price it offers next.

Professional definition

A pricing contract that always stands ready to trade, setting its quote from the ratio of its reserves. In the constant-product design the product of the two reserves is held fixed by every swap, so price moves along a curve; liquidity providers deposit both assets and earn a fee on each trade.

Technical definition

An invariant-based market maker. The invariant fixes the feasible set of reserve pairs, and the marginal price is the slope of that curve at the current point, which makes price impact a deterministic function of trade size relative to depth. Because the pool quotes without reference to external markets, keeping it aligned is the job of arbitrageurs, and the value they extract is paid by liquidity providers as divergence loss. Other designs vary the invariant: constant sum, hybrid stable curves and concentrated-liquidity ranges all change the impact profile.

Academic definition

A market-making mechanism in which quotes are determined algorithmically by a conservation condition over pooled reserves, replacing discretionary quoting and order matching with a deterministic pricing function.

Mechanism

The invariant guarantees that someone is always willing to trade, and it pays for that guarantee with price impact: buying scarce side pushes the quote up the curve, which both charges the taker and protects the pool from being drained. Arbitrage drags the pool back to the wider market. Liquidity providers are therefore short volatility and long trading activity, and the balance of fees against divergence decides the result.

In practice

Who uses it
On-chain traders sizing swaps, liquidity providers, protocol designers, and arbitrage desks.
Why it matters
It makes a market possible for assets no professional market maker would quote, with depth and impact both readable from public state.
Limitations
Price impact grows with size relative to depth, the pool follows external prices only as fast as arbitrage can act, and fee income is not a return until it exceeds divergence loss and gas.

Common mistakes

  • Reading the pool's quote as the price for any order size.
  • Providing liquidity to a volatile pair expecting fee income alone.
  • Applying constant-product intuition to stable or concentrated-liquidity pools.

Examples

numeric

A pool holds 20,000 of a stable asset and 10 ETH, so the quote is 2,000 per ETH. A 1,000 buy at a 0.30% fee returns about 0.4748 ETH — an effective 2,106 per ETH, roughly 5.3% above the quote, because the trade moved along the curve.

Given
  • Reserves: x = 20,000 stable units, y = 10 ETH
  • Fee f = 0.30%
  • Trade size = 1,000 stable units
  • Constant-product pool
Steps
  1. Spot quote = 20,000 / 10 = 2,000 per ETH
  2. Input after fee = 1,000 x 0.997 = 997
  3. ETH out = 10 x 997 / (20,000 + 997) = 9,970 / 20,997 = 0.4748
  4. Effective price = 1,000 / 0.4748 = 2,106
0.4748 ETH received at an effective 2,106 per ETH, about 5.3% worse than the quote

Impact scales with trade size relative to reserves. The same 1,000 order in a pool ten times deeper would cost a fraction of this.

market

A new token lists with a shallow pool. The quoted price looks firm, but a single order a tenth the size of the reserves moves it by double digits — the quote described the pool, not a market.

Mathematical foundation

x \cdot y = k, \qquad P = \frac{y}{x}, \qquad \Delta y = \frac{y \, \Delta x (1-f)}{x + \Delta x (1-f)}

Variables

xReserve of the asset being paid inasset units
yReserve of the asset being boughtasset units
kThe invariant: the product of the two reserves, unchanged by a swapproduct of units
PMarginal (quoted) price of x in terms of yratio
fSwap fee rate retained by the poolfraction
\Delta xAmount paid inasset units
\Delta yAmount receivedasset units

Procedure

Read the two reserves from the pool. Divide them to get the quoted price. For a trade, subtract the fee from the input, then compute the output that keeps the product of reserves unchanged; the output formula above is that condition rearranged. Divide input by output to get the effective price, and compare it with the quote to read the impact.

Worked example

Given
  • x = 20,000 stable units
  • y = 10 ETH
  • f = 0.003
  • Delta x = 1,000
Steps
  1. P = 20,000 / 10 = 2,000
  2. Delta x (1-f) = 1,000 x 0.997 = 997
  3. Delta y = 10 x 997 / (20,000 + 997) = 9,970 / 20,997
  4. Delta y = 0.47483 ETH
  5. Effective price = 1,000 / 0.47483 = 2,106
0.47483 ETH out; effective price 2,106 versus a 2,000 quote, about 5.3% impact including the fee

Interpretation

The quote is only the price of an infinitesimal trade. Any real order pays more, and the excess is set by its size relative to the reserves, which is why depth matters more than the displayed price.

Assumptions

  • The formulas given are those of the constant-product design. Constant-sum, hybrid stable and concentrated-liquidity pools use different invariants and produce different impact, so these equations must not be applied to them.
  • The fee is taken from the input before the invariant is applied, which is the common implementation; some designs charge differently and the output changes accordingly.
  • A single pool and no routing across pools. Reserves are assumed not to change between quote and execution, which fails under congestion or front-running.
Limits of the formula
  • The invariant describes execution, not value: it says what a trade costs, never whether the price is right.
  • Gas, routing and multi-hop paths are excluded, so the effective price computed here is a floor on the real cost.

Related terminology

related
Impermanent Loss Centralised Exchange versus Decentralised Exchange Decentralised Finance Liquidity Slippage Market Making Arbitrage Yield Farming Order Book
Commonly confused with

Order Book

An order book holds prices other participants chose. An AMM computes its price from reserves, with no quotes behind it.

Sources

DeFi risks and the decentralisation illusion
BIS Quarterly Review · 2021-12 · discussion of decentralised exchanges and liquidity pools
https://www.bis.org/publ/qtrpdf/r_qt2112b.pdf URL verified
The crypto ecosystem: key elements and risks
BIS · sections on DeFi market structure and liquidity provision
https://www.bis.org/publ/othp72.pdf URL verified
Final Report with Policy Recommendations for Decentralized Finance (DeFi)
IOSCO · description of DeFi trading arrangements and their operators
https://www.iosco.org/library/pubdocs/pdf/ioscopd754.pdf URL verified

Editorial status

Needs expert reviewindustry-conventionv1.02026-11-03

Flagged by the editor as uncertain on a linguistic, mathematical or regulatory point.

Kurdish headword بازاڕسازی ئۆتۆماتیک is this project's proposal and needs native-expert review; Persian بازارساز خودکار is widely used but not fixed by a standards body. The mathematics is the published constant-product design and is explicitly scoped to it in math.assumptions: other invariants in common use give different results, and the entry does not present one family as the general case.