AMMs, are the most common type of exchange you’ll encounter in DeFi. Automated market makers.
You might be accustomed to AMMs already. Especially if you’re in crypto. You’ve probably heard of PancakeSwap, Sushi, or Uniswap. All large AMMs; DEXs, decentralized exchanges.
How do AMMs work?
- Liquidity pools
- Liquidity providers
AMMs are simple. Multiple pools of liquidity. Tokens in a bucket–or pool. And each pool has two types of Token–or Coin. For example, a BTC-ETH pool. A pool with both Bitcoin and Ethereum in.
The ratio of the total BTC and ETH determines the price. Say there’s a bucket with 5 BTC and 10 ETH, the price of one BTC is 2 ETH. And the price of ETH is 0.5 BTC.
If the ratio falls too much one way, then arbitrageurs will take advantage and rebalance the pool for profit.
Arbitrageurs are short-term traders that take advantage of price discrepancies. Buying from another pool, or exchange, to lock in profits from the difference in pricing.
The pools are filled with tokens. We know that much. But where do they come from?
The tokens come from liquidity providers. People. People who want to provide liquidity to a pool. Usually to earn trading fees and/or farming rewards.
See, when people trade using an AMM they are charged fees. These fees commonly go to the liquidity providers. Usually, a percentage between 0.025 and 0.3% is taken.
Additionally, many AMMs offer farming rewards, to further incentivise liquidity. Really, they’re all in competition trying to be the best, most liquid AMM. To do this, they need to attract liquidity somehow. Usually through farming.