How DeFi market making works
By Exponential Team
Published Oct 25, 2023

What is DeFi market making?

In traditional finance, market making refers to the practice of providing buy and sell prices for financial instruments, such as stocks, bonds, or commodities, with the aim of profiting from the spread or the difference between the bid (buy) and ask (sell) prices. Traditional market makers are typically financial institutions or brokerage firms that maintain an inventory of assets they are willing to buy and sell. They earn profits by buying at the bid price and selling at the ask price, capturing the spread as their compensation for providing liquidity and assuming the associated risks. This helps to facilitate trading by ensuring there is enough liquidity in the market, reducing price volatility, and allowing traders to execute transactions seamlessly.
In the world of decentralized finance (DeFi), the core principles of market making remain fundamentally the same. DeFi market making is a way of providing liquidity for crypto assets that can be traded on decentralized exchanges (DEXs) instead of centralized ones. Anyone can become a market maker or a liquidity provider in DeFi by simply depositing two or more assets into a smart contract (a digital agreement that lives on the blockchain) that acts as a pool of funds. Similar to their counterparts in traditional finance, DeFi market makers help maintain liquidity, reduce slippage, and enhance the overall trading experience for users while managing the inherent risks associated with market making.
đź’ˇ
Slippage refers to the difference between the expected price of a trade and the actual price at which it is executed. In simpler terms, it is the unexpected price change that can occur when buying or selling an asset. In DeFi, slippage occurs due to the automated nature of trading on DEXs and how it affects the pool’s asset balance.
The smart contract enables the decentralized exchange of assets through an innovative mechanism known as Automated Market Makers (AMMs). AMMs are DEXs that allow crypto assets to be traded automatically without relying on a traditional order book of buyers and sellers. With AMMs, users trade against a pool of tokens, or a liquidity pool. The liquidity pool is a shared pot of digital assets that users supply. The price of the assets in the pool is determined by a mathematical formula that depends on the ratio of the assets in the pool. By changing the formula, liquidity pools can be optimized for different purposes. For instance, some pools are tailored towards “stable” assets, which are assets that trade at a similar price or are correlated with each other (i.e. stablecoins).
notion image

Where does the yield come from in DeFi market making?

Market making allows DEXs to provide instant liquidity for traders to swap digital assets, and liquidity providers earn commissions on trades. Liquidity is essential for AMMs to function properly. If an AMM doesn’t have enough liquidity, it can create a large price impact when users buy and sell assets on the platform, leading to inefficiency and assets trading at a lower price than expected. To incentivize liquidity providers to deposit their crypto assets into the protocol, AMMs reward them with a portion of the fees generated from each trade (or “swap”) between assets.
DeFi market makers can earn income from two sources:
  • Trading/Swap fees: These are the fees that liquidity providers receive for facilitating trading for a specific asset pair. For example, if a market maker provides liquidity to Uniswap’s ETH-USDC pair, they will receive 0.3% of every trade between ETH and USDC as fees.
  • Token rewards: These are the rewards that liquidity providers receive from the AMM platform for participating in their ecosystem or providing liquidity. For example, if a market maker provides liquidity to Curve, they will receive CRV tokens as rewards. These are commonly referred to as governance tokens. Governance tokens can have value for various reasons, such as giving holders the right to vote on platform decisions, earning potential revenues, or influencing the direction of a project's development.

Is DeFi market making safe?

Providing liquidity in an AMM is most profitable when the market is stable, and the asset prices fluctuate within a specific range. This is because of the risk of impermanent loss, which occurs when the market prices for assets within a pool diverge.
đź“–
Impermanent loss is the difference in value over time between holding tokens in an AMM versus holding them in a wallet. This loss of value occurs when the price of the assets in the pool changes relative to the time when they were initially deposited. It is considered “impermanent” or temporary because the loss is only realized when liquidity providers decide to withdraw their funds from the pool. Otherwise, the loss can be reversed if the asset prices return to their initial ratios.
Since AMMs don’t automatically adjust their exchange rates, they require an arbitrageur to buy the cheap assets or sell the expensive ones until the prices offered by the AMM match the market-wide prices. The profits made by arbitrageurs are taken from the liquidity providers, which creates a loss. It is also important to highlight that providing liquidity to an AMM is only as safe as the underlying pair of assets. If the price of one asset in the pool falls significantly compared to the other asset, liquidity providers will end up with more of the depreciating asset.

What are the advantages of DeFi market making?

Market making in DeFi can offer several benefits including:
  • 24/7 trading: AMMs consist of a set of smart contracts on the blockchain. As long as a pool has sufficient liquidity, users can always make trades regardless of the time or date. This means you can earn yield anytime and anywhere.
  • Permissionless markets: AMMs are permissionless by nature, meaning anyone can create a new market for any pair of assets as long as there is demand for them.
  • Automated dollar-cost averaging: AMMs always buy low and sell high, which means they automatically adjust your portfolio balance according to the market movements. This mechanism can be used to dollar-cost average into or out of certain positions. For example, if you provide liquidity to ETH-USDC, you will hold more ETH when its price goes down and more USDC when its price goes up.

Where can I start market making in DeFi?

If you want to start market making in DeFi, you can check out some of the top platforms in this space: