Automated Market Maker

What is an Automated Market Maker (AMM)?

An AMM works similarly to an order book exchange in that there are trading pairs – for example, BSV/USD. However, you don’t need to have a counterparty (another trader) on the other side to make a trade. Instead, you interact with a liquidity pool using a smart contract that “makes” the market for you.

In contrast, you could think of AMMs as peer-to-contract (P2C). There’s no need for counterparties in the traditional sense, as trades happen between users and contracts. Since there’s no order book, there are also no order types on an AMM. What price you get for an asset you want to buy or sell is determined by a formula instead. Although it’s worth noting that some future AMM designs may counteract this limitation.

TokenSwap uses x * y = k formula where x is the amount of one token in the liquidity pool, and y is the amount of the other. In this formula, k is a fixed constant, meaning the pool’s total liquidity always has to remain the same.

So there’s no need for counterparties, but someone still has to create the market, right? Correct. The liquidity in the smart contract still has to be provided by users called liquidity providers (LPs).

Last updated