Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Understanding Automated Market Makers (AMMs)

DeFi (decentralized finance) started before automated market makers (AMMs) appeared, but it didn't take off until Web3 projects began using this technology. Within a few years, AMMs helped bring countless investors into the DeFi ecosystem. Thanks to the incentives AMMs provide, it's getting easier for crypto traders to make trustless peer-to-peer token swaps on decentralized exchanges (DEXs).

So what are AMMs, and why have they been such a significant growth driver in DeFi? More significantly, can AMMs change how investors think about trading cryptocurrencies? Dive in to find out.  

Jump to section

What is a market maker?

Market makers "make" trading possible. In more technical terms, these entities boost liquidity in financial markets by completing buy and sell orders for clients. In traditional finance, market makers are usually big institutions, wealthy investors, or brokerage houses that facilitate trades of their holdings. 

Centralized exchanges always want to maintain high liquidity to ensure traders can quickly buy and sell assets at transparent prices. The more crypto market makers a trading platform has, the easier it is to pair them with traders who want to buy and sell their assets. 

Market makers always buy (or bid) their chosen assets at a slightly lower price than they're willing to sell them (or the ask price). The bid-ask spread ensures market makers are always rewarded for their services. 

What are automated market makers?

Automated market makers or AMMs use blockchain technology to do away with the third-party risk present in traditional markets. Instead of relying on big firms to facilitate trades, AMMs use automated smart contracts to pair crypto buyers with sellers. AMM technology helps bring decentralization into crypto trading, and it's the key reason decentralized exchanges (DEXs) are possible. 

Since smart contracts run on code, there's no human intermediary in an AMM DEX. When traders swap a token on a DEX like Uniswap, the smart contracts "automatically" match buyers with sellers to provide a peer-to-peer transaction. 

The liquidity on AMM DEXs comes from "pools" of crypto that anyone can deposit into. AMM DEXs don't rely on external market makers or central order books to keep tabs on their liquidity needs. The code running a DEX's automated smart contracts creates all functionality.    

AMMs rely on an algorithm to balance pools between two assets. There are many algorithms developers can use to create a successful DEX, but the most well-known is the "x*y = k" formula. In this equation, the "x" and "y" refer to each token in a liquidity pool. The "k" signifies a constant value. Using this formula, an AMM DEX can guarantee the ratio of tokens in a given trading pair is always equal.

Therefore, even if the price of Ethereum (ETH) changes drastically in an ETH/USDC pair, the "x*y = k" algorithm will ensure a 50/50 split between Ether and USDC. This algorithm also helps account for fluctuations depending on how many people buy or sell each token. 

As an example, in the ETH/USDC pool on Uniswap, the amount of ETH can be represented as “x,” while the total USDC can be “y.” If we assume the “k” value is $1 million, it means the combined value of ETH and USDC must always equal $1 million. Assuming ETH is trading for $1,500 per token, it means there needs to be 333.333 ETH (333.333 ETH x $1,500 = $500,000) and 500,000 USDC.

What are liquidity pools and liquidity providers?

Without institutional market makers, how can crypto AMMs provide liquidity for traders? The answer is liquidity pools

You can envision a liquidity pool as a large vault of cryptocurrency. Anyone with a crypto wallet and the corresponding tokens can deposit their funds into these pools to allow users to trade them. When someone locks their crypto in a liquidity pool's smart contract, they become a "liquidity provider" (LP).

But why would anyone want to lock their crypto on an AMM DEX? Besides supporting the idea of decentralized trading, LPs enjoy passive income. AMM DEXs offer a percentage of trading fees to everyone who adds tokens to liquidity pools. 

Many DEXs also offer bonus rewards in their proprietary governance tokens. For instance, Uniswap has the UNI token, and Curve Finance has the CRV token. Not only are these tokens extra incentive mechanisms, but they also help promote decentralized governance initiatives on DEXs.

What is crypto arbitrage trading on AMMs?

In the financial world, arbitrage refers to a trading technique where people exploit slight price discrepancies on the same asset on different exchanges. For example, if Bitcoin (BTC) is trading for $19,500 on exchange A and $19,250 on exchange B, an arbitrage trader would quickly buy the cheaper BTC and sell it on the first exchange. 

While arbitrage trading has been around before Bitcoin, it's more prevalent in crypto markets due to the volatility in digital tokens. Also, arbitrage is an essential incentive mechanism that helps AMMs quote accurate price data. 

If arbitrage traders notice a slight price difference in a token’s price on a DEX, they’ll keep buying this token to make a profit. As more arbitrage traders buy and sell tokens from a liquidity pool, the price should eventually reach parity with the market average. 

What is impermanent loss?

One of the positive features of AMMs is that they allow anyone to become an LP. All you need for earning passive income on an AMM DEX is a private crypto wallet and tokens in a liquidity pool. While this innovation creates a unique passive income stream for crypto investors, it's not without risks. Impermanent loss is the top issue AMM crypto providers face.

Since crypto prices are constantly fluctuating, there's a chance the tokens you put into your liquidity pool will be worth less in the future. Even if you gain in USD when you withdraw your tokens from an AMM, you might have earned more if you had held your tokens in a private crypto wallet. 

To illustrate impermanent loss, let’s take a look at an example. 

Assume you deposit 1 ETH and 2,000 USDC into Uniswap's ETH/USDC liquidity pool. Remember, you need to deposit a 50/50 split of tokens into Uniswap's pools. So, at the time you deposit your 1 ETH and 2,000 USDC, the price of Ether is $2,000.

Now, let's say the price of Ethereum skyrockets to $3,000 next month. As prices fluctuate, arbitrage traders will bring the liquidity pool into equilibrium. Now, there’ll be more USDC in the liquidity pool versus ETH, which means you'll withdraw less ETH, should you choose to do so at this time. 

The amount of ETH and USDC you'll receive depends on the current market conditions and your liquidity pool crypto size. However, if ETH now equals $3,000, it only takes about 0.667 ETH to equal your initial $2,000 deposit. In this case, you’ll have made more in USD from your 1 ETH had you held it in a private wallet. 

It's significant to note that impermanent loss only becomes "permanent" when you decide to pull out your funds. Due to volatility in crypto prices, there's a chance your purchasing power can recover. 

Remember, you’ll earn trading fees for providing tokens to liquidity pools. In some cases, the token rewards you receive as an LP offset the impermanent loss. 

Lastly, LPs can reduce their risk of impermanent loss by depositing crypto into low-volatility token pairs. For instance, investors can focus on liquidity pools with stablecoins or wrapped tokens. 

Four platforms that use AMMs

There are many successful AMM DEXs in DeFi, but here are a few of the most prominent names (at the time of writing):

  • Uniswap: Created in 2018, Uniswap was the first AMM DEX and remains the most successful protocol in the DeFi ecosystem. Although Uniswap is built on Ethereum, it now works with many layer-two Ethereum scaling solutions like Polygon, Optimism, and Arbitrum. 
  • SushiSwap: SushiSwap is a direct competitor to Uniswap that launched on Ethereum in 2020. Famously, SushiSwap's founder Chef Nomi copied Uniswap's code and incentivized Uniswap LPs to SushiSwap with the promise of SUSHI tokens. Many believe this vampire attack strategy encouraged Uniswap to launch its UNI token. 
  • Curve Finance: is another high-profile Ethereum AMM DEX but has a unique focus. Unlike Uniswap, Curve prioritizes low-volatility crypto swaps, especially stablecoins and wrapped tokens.    
  • PancakeSwap: PancakeSwap is the "Uniswap of the BNB Smart Chain." While the BSC isn't as large or decentralized as Ethereum, many retail investors enjoy using PancakeSwap because gas fees tend to be lower. Besides offering BEP-20 tokens, PancakeSwap has a similar layout to Uniswap. 

Wrapping up

AMMs are a significant advancement in the DeFi space. While there are risks with this new technology, sites like Uniswap prove that AMMs can help people trade crypto without the need for centralized order books. As AMM technology improves, it may be possible for everyone to provide liquidity and trade tokenized assets directly from their crypto wallets.

Like the pioneering developers on AMM DEXs, Worldcoin is committed to democratizing cryptocurrency. We aim to put a share of our crypto in the hands of everyone on the planet for free. We’re also airdropping free DAI to anyone who downloads our app. Subscribe to our blog to know more.

Related articles

Have questions?