Skip to main content

English فارسی (Persian) Türkçe (Turkish)

بازارساز خودکار

Automated Market Maker (AMM) is a type of decentralized exchange (DEX) that uses mathematical formulas to trade tokens on the blockchain platform and prices. As you know, buying and selling digital currencies, like other assets, requires a space for traders to trade and exchange.

Automated Market Makers (AMM) are responsible for buying and selling processes in a decentralized exchange. AMMs are robots that make exchanges possible with the help of liquidity pools. Market maker robots do not need any permission to make trades and can do it automatically.

AMMs actually make it possible to buy and sell tokens without the need for human market makers and order books. In addition, they also provide liquidity to users in different pools and pay them incentive tokens and fees in return.

Automatic market makers are one of the important parts of decentralized finance that have grown a lot in recent years and have made it possible to make transactions without the need for intermediaries and authentication. In the rest of this article, I will discuss more about what Amm is and how it works.

What is an Automated Market Maker or Amm?

Decentralized exchanges provide a platform for cryptocurrency transactions in the crypto world. These exchanges do not have access to their users’ assets, and therefore they have to use other methods to conduct transactions. The working method in a decentralized exchange is different compared to a centralized exchange, and instead of users registering orders in a section called the order book, they use automatic market makers. AMM

It stands for Automated Market Maker and is a useful and specific tool for DeFi and Ethereum. In addition to being decentralized, AMM is always available and does not use old methods to communicate between buyers and sellers. The automatic market maker is not under the control and supervision of any organization and institution, and everyone has the possibility to operate in the cryptocurrency market under the title of AMM. In fact, removing the middleman with blockchain by AMM is one of its important features.

Automated Market Maker or AMM is a smart robot that shows you the value of two assets based on mathematical formulas. By removing the traditional order book and replacing it with blockchain smart contracts, this method provides the necessary liquidity for any transaction and therefore determines the currency price according to supply and demand. In fact, the amount of supply and demand determines the price of digital currencies in transactions.

مثالی از AMM

Example of AMM

To better understand what is Amm? I am going to give you an example. Imagine Bitcoin and Altcoins. When you decide to sell some of your bitcoins and buy altcoins. For this purpose, you have to deposit bitcoins into the pool and withdraw altcoins. As a result of this, the amount of bitcoin in the pool increases and the amount of altcoin decreases. This will cause the price of Bitcoin to drop for a very short time.

In return, the price of altcoin increases due to the decrease in its volume in the pool. It should be noted that these changes only last for a short period of time; Because usually when the price of a currency decreases, the demand for its purchase increases.

بازارساز خودکار به جای دفتر سفارشات

Automatic market maker instead of order book

Automatic market makers are a good alternative to order books in decentralized exchanges. Before the launch of AMM equipped exchanges, exchanges had databases where orders were located and similar orders were connected together by matching engine technology.

The performance of the matching engine is such that, for example, a person decides to buy 1 unit of Bitcoin at the price of 10 thousand dollars, and for this purpose, he must register his order in the digital currency exchange. Bitcoin sellers also place their assets in the order book at their desired prices. By comparing the orders, the matching engine performs the transaction when dealing with the same buying and selling price and gives bitcoins to the buyer and dollars to the seller.

This is while there is no news of order books and matching engines in decentralized exchanges, and these exchanges use automatic market makers. Automated market makers will carry out the process of making trades by providing liquidity with trading pairs. In fact, AMMs are a set of smart contracts that operate on the blockchain platform and determine the price of cryptocurrencies based on supply and demand.

روش کار بازارساز خودکار یا AMM

Automated Market Maker or AMM

In the automatic market maker, the criteria for price detection in decentralized exchanges is determined based on the weight ratio of assets and shares in the liquidity pool. In exchanges, the method of calculating the weight ratio of assets is different; For example, in exchanges with more complex protocols, calculating the weight ratio is also more complicated. To better understand AMMs, imagine that you are going to trade the UNI/ETH currency pair and you intend to get UniSwap tokens by selling Ethereum tokens.

For this purpose, in the decentralized exchange, you must first pour Ethereum tokens into the liquidity pool and then receive UniSwap tokens from the exchange.

The volume of ethereums in the pool will increase following the injection of ethereum into it, and in exchange for receiving UniSwap tokens, the volume of these tokens in the pool will decrease. As a result of this, the price of Ethereum decreases and the price of UniSwap increases, and this continues until other traders buy Ethereum tokens and deposit UniSwap into the pool.

You can imagine that it will take a long time for other traders to buy Ethereum tokens and transfer UniSwap to the pool. But your assumption is wrong.

Because most traders tend to buy and hold a token whose volume in the pool is reduced. In this way, the prices have reached their equilibrium again and the market will continue its trend. Exchanges that use simple protocols for automated market makers obtain the weighted ratio by the following formula:

x * y = k

Imagine you have entered into an ETH/USDT trade, where x stands for Ether and y stands for USDT based on the formula above. The position k is also related to the amount of liquidity of the pool, which is always equal to a fixed value. Now, the automatic market maker mechanism always determines the price of USDT and ETH or any other currency pair in such a way that the value of k or the volume of liquidity remains constant and does not change.

ارتباط بازارساز خودکار با استخر نقدینگی

Connecting the automated market maker to the liquidity pool

In digital currency exchanges, in each trading pair, AMMs create a liquidity pool. Liquidity pools have smart contracts and DEX users must connect their digital currency wallets to these smart contracts to make transactions.

By depositing their desired tokens to the pools, these people will be able to receive other tokens from the pools. The ratio of tokens in the pool determines the supply and demand rate in liquidity pools. To carry out transactions in liquidity pools and provide liquidity for pool currency pairs, people called liquidity providers are needed. These people are rewarded for putting their assets in the pool, and this reward is given to them by a part of the fees paid by the traders.

The function of liquidity pools in DEXs is such that liquidity providers can withdraw their assets from the exchange at any time. Smart contracts in decentralized exchanges must be able to provide the requested volume of users, for which they will get help from liquidity providers. Everyone has the possibility to operate in the cryptocurrency market and deposit the amount of assets they want as a liquidity provider. Decentralized exchanges also consider rewards for inviting users to do this; These rewards include LP tokens, part or all fees.

Among the most reputable exchanges in the world, UniSwap gives liquidity providers 0.3% of the value of each transaction. The Sushi Swap exchange has also considered the same amount of reward for these people, and deposits some of it in its yield farming platform.

کاربرد بازارساز خودکار

Automatic market maker application

An automated market maker in the blockchain world is actually a type of mathematical algorithm that tries to make transactions without intermediaries. These AMMs work mechanism is based on supply and demand and provide the possibility to identify the price of cryptocurrencies and buy and sell without the need to register an order. In fact, the task of the automatic market maker in DEXs is to price users’ assets and provide a platform for providing liquidity in order to carry out transactions in the exchange and adjust it.

Transactions in the first generation of decentralized exchanges were done peer-to-peer. This is while transactions in decentralized exchanges that work based on an automatic market maker are done in a peer-to-contract form. In these exchanges, users can connect their wallets to the exchange and carry out their transactions through smart contracts while keeping their assets.

Automatic market maker allows you to decide whether or not to trade by distinguishing the price of users’ digital currencies against other cryptocurrencies and providing the equivalent of each currency in the market of decentralized exchanges. DEXs have different plans for their automated market maker. For example, some of them use mathematical formulas to make transactions, and others, such as Curve exchange, have complex formulas for AMM coding.

Advantages and Disadvantages of Automated Market Maker

Automated market makers or AMMs have advantages and disadvantages that I will mention below:

رابطه بازارساز خودکار و ضرر ناپایدار

The relationship between automatic market maker and volatile loss

Non-permanent or unstable loss is one of the disadvantages and risks of liquidity pools. These losses occur when the price of the cryptocurrencies you have deposited into the pools change over a period of time.

It should be noted that in the automatic market maker, any distance between the initial price and the current price of your cryptocurrency at the time of entering the liquidity pool is greater, you will suffer more losses and you will suffer more non-permanent losses. Therefore, market participants and people skilled in trade and trading suggest that you enter stable coins or backed tokens such as gold-backed digital currency, dollars, etc. into liquidity pools; Because these currencies have a fixed value and do not allow many losses to be included in your situation.

Of course, keep in mind that when your assets are in the pool and the initial price is lower compared to the current price, if the asset is withdrawn, the phenomenon of non-permanent loss does not occur and in fact permanent loss occurs. Therefore, if you do not want to suffer losses in investing in digital currency, avoid withdrawing your deposit from the pool when the initial and current prices differ.

Paying attention to profits in liquidity pools is also important; Because pools will reward you in exchange for cash. These bonuses have the possibility of compensating for non-permanent losses, and perhaps they can also seek profitability for you by compensating for losses. It is obvious that digital currency exchanges will consider more profits for cryptocurrencies that do not have a fixed price in order to encourage investors to provide liquidity for these currencies.

Basically, if this was not the case, everyone would look for cryptocurrencies with a fixed price to avoid losses, and with this, the performance of DEXs would also suffer.

لغزش قیمت یا اسلیپیچ با Amm

Price slippage with Amm

In decentralized exchanges, prices are always changing with buying and selling due to the automatic market maker, and this is known as price slippage. Slipitch is always dependent on two factors, transaction volume and pool liquidity. If the transaction volume in exchange pools is more, price slippage in the market happens more.

Of course, it should be noted that the phenomenon of price slippage also occurs in centralized exchanges. For example, in the cryptocurrency market, a person decides to buy a large amount of a digital currency. For this purpose, this person must enter into various transactions in the sales order book, which have different prices. In this situation, he should continue buying and selling orders until he can finally get the amount of cryptocurrency he needs.

How to become an automated market maker

Now you may be wondering how to become an automated market maker and earn money in the cryptocurrency market. For this purpose, you must enter the protocol site and establish a connection between it and your Defi wallet. Then you have to choose the currency you want to trade and click on the swap option. Now you need to login to your wallet and confirm the transaction.

By confirming the transaction, you will receive a token that represents your ownership in the liquidity pool. Of course, before doing this, you must go to the liquidity provider section and specify the desired amount that you want to enter the pool from your currency. By receiving the token, you will be able to convert it to other tokens or trade it in the crypto market.

Examples of automated market makers

Below are some automated market makers:

Uniswap

You can create a 50/50 liquidity pool on the UniSwap exchange through pairs of ERC-20 tokens. According to market experts, UniSwap is a sustainable AMM in Ethereum.

Curve بازارساز خودکار یا AMM

Curve

In Curve, you can see the lowest rates and the most used deals. If you decide to create a liquidity pool with similar assets, Curve is the best option for you. There is no news of limited liquidity in this exchange.

To encourage supply, automated market makers reward these individuals by deducting fees paid on transactions. AMM will also send liquidity depositors pool governance tokens, which will give users voting rights to develop the automated market maker protocol.

In DEXs, pre-specified mathematical formulas and transactions are used to ensure the ratio of assets in the pool and balance them in AMM, and in this way, the difference in the pricing of cryptocurrency transactions will disappear.

AMM protocols are secure due to their decentralized nature. Therefore, it is difficult to carry out cyber attacks due to the security of the blockchain and the distributed system of the operation of each of its nodes.

English فارسی (Persian) Türkçe (Turkish)

Farhad Moghadamsalimi

Hey, I’m Farhad. I’m an entrepreneur, Blockchain and AI enthusiast, and web developer living in Turkey. I am a fan of entrepreneurship, writing, and reading about Technology and philosophy.

Leave a Reply