Carefully! Lots of text.
An automatic market maker works as a mechanism that forms the price between two assets. Some of them use a simple formula like Uniswap, while Curve, Balancer and others use more complex algorithms.
AMM not only enables trading in a trustless system, but also provides liquidity to a liquidity pool. This allows virtually any user to become a market maker and earn commissions for providing liquidity.
AMMs have carved out a niche in the DeFi space due to their simplicity and convenience, and the concept of decentralized market making fits perfectly into the cryptocurrency industry.
Introduction
Decentralized finance (DeFi) has brought attention to Ethereum and other smart contract platforms such as Binance Smart Chain. Yield farming has become a popular way to distribute tokens, the number of tokenized BTC on Ethereum is growing, and the volume of flash loans is becoming larger.
Meanwhile, automated market maker protocols such as Uniswap regularly demonstrate competitive volumes, high liquidity and a growing number of users.
How do these exchanges work? What makes it possible to quickly and easily create a market for new coins? Can AMMs compete with traditional exchanges that have order books? Let's find out.
What are automated market makers (AMMs)
Automatic Market Maker (AMM) is a decentralized exchange (DEX) protocol that uses a mathematical formula to calculate the price of assets. It does not use order books like a traditional exchange, but rather prices assets according to a pricing algorithm.
This formula may vary depending on the protocol. For example, Uniswap uses the formula x * y = k, where x is the quantity of one token in the liquidity pool, y is the quantity of another, and k is a fixed constant meaning that the total liquidity of the pool should always remain the same. AMM may use other formulas depending on the specific application, but they are always based on pricing using special algorithms. Let's look at their operating principle in more detail.
Traditional market making is usually carried out by companies with extensive resources and sophisticated strategies. On exchanges with order books, such as Binance, market makers ensure a good price and a minimum bid-ask spread. Automated market makers decentralize this process and allow virtually anyone to create a market on the blockchain. How it works? Let's figure it out now.
How Automated Market Makers (AMMs) Work
Automated market makers, like exchanges with order books, use trading pairs such as ETH/DAI. However, they do not require the participation of another trader to complete the transaction. Instead, users interact with a smart contract that creates the market automatically.
On a decentralized exchange like Binance DEX, transactions happen directly between users' wallets. If you sell BNB for BUSD on Binance DEX, there is also a party involved in the process who buys your BNB for BUSD. This is called peer-to-peer (P2P) transaction between users.
AMM can be thought of as a transaction between a user and a contract (P2C). It does not require the participation of a second party. Additionally, AMM does not have order books, so there are no order types, and asset prices are determined by a formula. It's worth noting that future AMM developments will likely be able to remove this limitation.
But if there is no need for counterparties, who creates the market? Good question. Liquidity in a smart contract is provided by users called liquidity providers.
What is a liquidity pool?

Liquidity providers add funds to liquidity pools, which are huge accumulations of assets used by traders to trade. In exchange for providing liquidity to the protocol, liquidity providers receive commissions on trades that occur in their pool. In the case of Uniswap, they contribute the equivalent value of two tokens, for example 50% ETH and 50% DAI to the ETH/DAI pool.
So anyone can become a market maker? Exactly! Adding funds to the liquidity pool is quite simple, and the rewards for doing so are determined by the protocol. For example, Uniswap v2 charges traders 0.3% and sends it to liquidity providers. Other platforms or forks may charge more to attract more liquidity providers into their pool.
Why is it important to attract liquidity? The more liquidity in the pool, the lower the slippage for large orders. This attracts more users to the platform.
Slippage issues vary by AMM, but are definitely worth considering. Remember that pricing in such systems is determined by an algorithm and depends on how much the ratio between tokens in the liquidity pool changes. If the ratio changes greatly, there will be a lot of slippage.
Let's say someone wants to buy all the ETH in the ETH/DAI pool on Uniswap. But this is impossible to do. To do this, the buyer would have to pay an ever-increasing premium for each additional ether, and it would still not be possible to buy back all the coins from the pool. Why? Because it works according to the formula x * y = k. If x or y is zero, meaning there is no ETH or DAI in the pool, the equation no longer makes sense.
There is another factor to consider when providing liquidity to AMMs and that is impermanent losses.
What are impermanent losses?
Impermanent losses occur when the price ratio of contributed assets changes after being contributed to the pool. Moreover, the greater this change, the greater the loss. This is why AMMs work best with pairs of tokens that have similar values, such as stablecoins or wrapped tokens. If the price ratio between the pair remains within a relatively small range, the impermanent losses will also be small.
At the same time, if the ratio changes significantly, it will be more profitable for liquidity providers to hold their tokens rather than add them to the pool. This problem is partly addressed through trading fees, which keep loss-prone Uniswap pools like ETH/DAI profitable.
It's worth noting that "impermanent loss" is not the most accurate name for this phenomenon. "Volatility" implies a reduction in losses when assets return to the price at which they were contributed. However, if you withdraw funds at a different price ratio, the losses will become permanent. And although trading commissions can help reduce losses, it is still important to consider the risks.
Be careful when depositing into AMMs and make sure you understand the consequences of impermanent losses. If you'd like to explore this further, check out Pintail's article.
➟ Thinking about where to start working with cryptocurrencies? Buy Bitcoin on Binance!
Summary
Automated market makers are the backbone of the DeFi space. With them, almost any user can easily become a market maker. And although the way they work involves some limitations that are not present with order books, they play an important role in the development of the crypto space.
Automated market makers are still in their early stages of development. Many popular AMMs, such as Uniswap, Curve and PancakeSwap, are attractive in their design, but are quite limited in capabilities. There are likely to be new innovative developments in the future that will lower fees, remove core restrictions, and improve liquidity for all DeFi users.



