Tag: dex

  • Day 20 — Why Would Anyone Put Their Tokens Into a Liquidity Pool?

    Watercolor illustration of liquidity providers adding a pair of tokens to a shared trading pool

    A liquidity pool is a shared pile of tokens that lets DeFi users trade without waiting for a buyer or seller. For context, compare it with automated market makers and the Ethereum DeFi overview.

    An automated market maker cannot serve traders with an empty pool. The assets are supplied by liquidity providers, often called LPs. They deposit a pair of tokens into a smart contract so other people can swap between them.

    Suppose a pool holds ether and a stablecoin. A provider contributes both assets at the pool’s current value ratio and receives a token or accounting record representing a percentage of the pool. If the provider owns one percent of the pool, that claim grows or shrinks with the pool’s reserves.

    How the pool helps traders

    Every swap usually pays a small fee. The fee remains in the pool or is distributed according to the protocol’s design, giving LPs a reason to provide capital. More liquidity also benefits traders by reducing slippage, so a healthy market tries to balance useful depth with a fair return for providers.

    The catch is that the pool constantly rebalances the two assets as prices move. If ether rises sharply, arbitrage traders remove ether from the pool and add stablecoins until the pool matches the outside price. The LP ends up holding less of the asset that rose and more of the asset that lagged.

    Compared with simply holding both tokens, this difference is called impermanent loss. The name can be misleading: if the provider withdraws while prices are far apart, the loss relative to holding becomes real. Trading fees may offset it, but they are not guaranteed to do so.

    What providers earn

    LPs also face smart-contract bugs, malicious tokens, oracle or bridge failures in some designs, and the possibility that an incentive token loses value. A high advertised annual return says little unless we know the trading volume, fee income, price risk, and source of extra rewards.

    Liquidity provision turns passive assets into market infrastructure, with rewards tied to real risks. Another kind of pool uses deposits not for swaps but for loans. Tomorrow we will see how lending can work without a bank checking your credit score.

    Why this matters

    In practice, a liquidity pool turns idle tokens into market infrastructure. Traders get instant swaps, while providers earn fees and accept market risk.

    What to remember

    Therefore, the pool is useful only when you understand both sides. Look at fees, token volatility, and impermanent loss before adding funds.

  • Day 19 — How Can You Trade Without an Order Book?

    Watercolor illustration of an automated market maker balancing two token reserves in a liquidity pool

    Trading without an order book

    An automated market maker, or AMM, lets people trade crypto without a traditional order book.

    Instead of matching buyers with sellers, an AMM uses a liquidity pool and a pricing formula.

    This is one reason decentralized exchanges can run directly on blockchains.

    What a liquidity pool is

    A liquidity pool holds two or more tokens inside a smart contract.

    Users called liquidity providers deposit tokens into the pool. In return, they may earn trading fees.

    When someone swaps tokens, they trade against the pool rather than another person.

    How the price changes

    Many basic AMMs use a simple idea often written as x*y=k.

    If a trader removes one token from the pool, the pool charges more of the other token.

    Therefore, large trades can move the price more. This effect is called slippage.

    Why arbitrage matters

    AMM prices can drift away from prices on other markets.

    Arbitrage traders notice the gap. Then they trade until the AMM price comes closer to the wider market.

    The takeaway

    An automated market maker turns a smart contract into a simple trading venue.

    It is open and useful, but traders still need to understand liquidity, slippage, and smart contract risk.