Lesson #1: DEX/AMM

DEXs & AMMs

The first step to decentralize our financial system is, of course, to be able to exchange coins on the blockchain, eliminating the need for a CEX (centralized exchange). To fulfill this need many DEXs spawned, functioning with order books the same way a CEX would, like Cryptobridge for example, which permitted the listing and trading of many coins. However, they were slow and lacked real liquidity, and weren’t really decentralized for the most part, which eventually led the majority to close down or implement KYC measures because of american legislation.

Birth of the Automated Market Maker

From the ashes of the DEXs, AMMs (Automated Market Makers) were born. They provide the same service, but function in a slightly different and totally decentralized manner.

AMMs function without any order books, depending on “Liquidity Pools”. A liquidity pool is a basket of assets where anyone (thus called LP or “Liquidity Provider”) may deposit two or more cryptos in quantities of equal value. These pools, a little like exchanges, often work in pairs (ETH/USDT for example). This allows the AMM to have what it needs to fulfill any swap (within the limits of the tokens in the pool) at a price determined by the ratio of each crypto in the pool.

For example: if the pool contains 2100 USDT and 3 ETH, then 1 ETH = 700 USDT

The actual algorithms are a little more complicated, but you get the idea.

These amounts will increase or decrease according to demand and the price will regulate itself, as if it too low people will buy to sell elsewhere, and vice-versa, creating a natural equilibrium through what we call arbitrage.

If necessary, they may even automatically swap non-paired assets by routing a swap through different corresponding pairs, such as ETH-USDT followed by USDT-LINK to swap ETH to LINK.

However, as you can imagine, LPs don’t provide liquidity out of pure generosity. So, like on a CEX, each swap includes fees, in one or both of the cryptos involved, which are added to the pool. An LP’s share being determined by their owned percentage of the pool split evenly between the cryptos involved, the amount of each crypto in their share will increase as the pool accumulates fees.

Furthermore, some AMMs issue their own token that they offer to LPs as an additional reward (UNI for Uniswap, SUSHI for SushiSwap, etc…). Anyone can therefore provide liquidity and become an LP, or even list a new pair, as long as they have the crypto to pay blockchain fees and add liquidity to the pool. When creating a new pair, the liquidity added on either side will determine the price of the assets relative to each other.

Generating revenue from providing liquidity is part of the practice called “Yield Farming”, the “yield” being the return over investment.

Examples:

  • Uniswap: AMM on Ethereum, created by Hayden Adams, one of the founder of Ethereum. Uni for “Unicorn”.

  • Curve: Multi-chain AMM with algorithms conceived to reduce exchange fees and optimised for stablecoins

  • PancakeSwap: Main AMM on Binance Smart Chain

  • Thorchain: Cross-chain AMM for swapping native assets

  • TraderJoe: Main AMM on Avalanche C-Chain

Version française disponible sur Muchcoin

Subscribe to Ankhrypto
Receive the latest updates directly to your inbox.
Mint this entry as an NFT to add it to your collection.
Verification
This entry has been permanently stored onchain and signed by its creator.