Automatic Market Maker

Automatic market maker(AMM) is one of the key components of the decentralized exchange(DEX) platform. Traditional exchanges and centralized digital exchanges rely on the order book to facilitate trading between buyers and sellers. In contrast, DEX employs an AMM algorithm that allows automated trading using a mathematical formula that determines the price of the tokens in a liquidity pool. In fact, AMM is a smart contract that is embedded in the liquidity pool of a decentralized exchange ecosystem.

Different DeFi protocols use different formulas in their AMM algorithms. Uniswap uses the formula x*y=k, where x is the amount of token X and y is the amount of token Y in the liquidity pool, and k is a constant. The equation implies that x and y will move inversely proportional to each other on a hyperbolic curve.

Let us examine the following example:

Assuming Uniswap has a pool comprising the ETH/USDT pair. Let say at a particular time the pool has 10000 ETH and the price of ETH was 1500 USDT, hence the total value of ETH was 15,000,000 USDT. As the ratio is 50:50, the total amount of USDT should be 15,000,000.

Based on the formula x*y=k, k=10000*15,000,000=150,000,000,000

Next, assuming now the amount of ETH has reduced to 8000, using the above equation;

the amount of USDT should increase to 150,000,000,000/000=18,750,000

Uniswap is the first truly decentralized AMM as it allows anyone to create a liquidity pool. Besides that, it allows anyone to provide liquidity to an existing pool

Another popular DEX that employs AMM is Kyber Swap. However, it is not truly decentralized as it does not allow anyone to create a liquidity pool or provide liquidity to a pool. Kyber swap liquidity pools are deployed by professional market makers.

Other popular DEX that employed AMM are Balancer, Curve, Sushiswap and more.
{"ft_lang_label":"__label__en","ft_lang_prob":0.9166356,"math_prob":0.9721395,"size":1831,"snap":"2022-05-2022-21","text_gpt3_token_len":430,"char_repetition_ratio":0.1302682,"word_repetition_ratio":0.013422819,"special_character_ratio":0.240852,"punctuation_ratio":0.12032086,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.97135884,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-01-19T16:27:54Z\",\"WARC-Record-ID\":\"<urn:uuid:d35c3dae-f6be-4907-9897-f340e39f5edd>\",\"Content-Length\":\"37646\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:d71a2ade-d706-4cfe-87f2-2fe619627fe0>\",\"WARC-Concurrent-To\":\"<urn:uuid:a3567733-851e-4ee7-b1b1-194c4205ff68>\",\"WARC-IP-Address\":\"103.6.245.60\",\"WARC-Target-URI\":\"https://www.blockchainguide.biz/2021/03/\",\"WARC-Payload-Digest\":\"sha1:OU242EGYNNQ5UJDVTTNY454AGRU7ULMN\",\"WARC-Block-Digest\":\"sha1:FMBP4XVQVFX3ENZFSNFUP7W7GSGENOK4\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-05/CC-MAIN-2022-05_segments_1642320301475.82_warc_CC-MAIN-20220119155216-20220119185216-00435.warc.gz\"}"}