“Thy who controls the liquidity, controls the DeFi universe.”
– Anonymous DeFi Degen, 2022
To those familiar with legacy finance, it comes as no surprise that it is a capital-intensive business. Banks rely on deposits to transfer value via withdrawals, remittances, and credit services. Stock brokerages use stocks held by one customer to enable short-selling by another. Insurance firms collect premiums from those insured to pay out claimants.
DeFi is not dissimilar in this regard, except instead of paying a centralized financial entity to provide these services, value (read: profit margins) accrues to token holders in the form of a shared project treasury, reduced supply of tokens via burning or buybacks, inherent demand for governance tokens to redistribute value, or a combination of the above. In this way, users (often token holders as well) become their own bank, creating a flywheel effect that has propelled DeFi markets to where they are today.
Automated Market Making and Deep Liquidity Pools
DeFi’s first big stride came from disrupting how markets are made on a decentralized exchange (DEX). In lieu of relying on traditional market makers via the order book model, Uniswap1 piloted the Constant-Product Automated Market Making (AMM) model that algorithmically determines the price for a given pair of assets in a ‘liquidity pool’2. Liquidity Providers (LPs) provide funds to these liquidity pools, compensated by trading fees (typically 0.3% per trade) charged to users trading on the DEX.
AMM follows a simple yet elegant formula shown below:
x * y = k, where
x = quantity of x
y = quantity of y
k = constant product
As k remains constant, when supply of x increases, the supply of y must decrease, and vice-versa. Having said that, the resulting price is inherently correlated to pool size – deeper pool sizes can accommodate larger swaps without significant slippage3.
One key advantage AMMs have over Order Books is instantaneous execution – users of the order book model often have to wait for their limit orders to be filled, especially for large orders. Should they choose to execute via market orders, prices often move disproportionately against them, with limited visibility on average execution price until the order is filled.
Conversely, DEX traders can reasonably predict their average execution prices by inspecting the depth of liquidity pools. They also have a leg up in terms of funds self-sovereignty. Assets on Centralized Exchanges (CEXs) are held on the exchange’s wallet whilst assets on DEXs are self-custodied in users’ wallets.
In addition to trading fees, many DeFi projects incentivize capital inflows via liquidity mining programs, paying out native protocol tokens to users who provide liquidity on their platforms. With the right design, these programs can bootstrap liquidity quickly, at the cost of dilution to existing owners. Put differently, liquidity mining programs are analogous to venture-backed startups offering free credits to attract early adopters to their platforms.
Despite the DeFi flywheel, liquidity in DeFi is often mercenary, rotating towards the best-yielding opportunities in the space. Low switching costs exacerbate this effect – users can simply move liquidity from one protocol to another in a few clicks instead of going to their bank teller and physically switching banks.
Newer projects often have a higher proportion of unissued tokens relative to their total supply, affording them the opportunity to offer eye-popping, triple-figure-and-beyond yields that serve as pseudo-marketing programs. As circulating token supply and maximum supply start to converge and inflation rates reduce, so do the high Annualized Percentage Rates (APR) of these yield farms4. Once yields start to get unattractive relative to other opportunities, yield farmers5 rotate out into the next opportunity.
Impermanent Loss – The Other Side of the Blade
(Partially) Blinded by APRs, yield farmers often forget that the pairs they’re LP-ing are inherently long positions as well. They are still exposed to price downturns for both assets in the LP, similar to long-only holders.
Additionally, Liquidity Providers are exposed to Impermanent Loss (IL) risk. Impermanent Loss happens when the price ratio between the two assets at time of deposit differs from when they are withdrawn. The larger the change in ratio, the steeper the impermanent loss. ‘Loss’ refers to the underperformance of both assets in the LP relative to if one had held both long positions only. ‘Impermanent’ refers to the transient nature of these losses that are only made permanent if farmers lock in the different ratio by withdrawing from yield farms. Weird name, I know.
For example, a liquidity provider adds 10 ETH and 25,000 USDC into an LP. The dollar amount of their LP deposit is $50,000 because ETH and USDC are deposited in equal amounts. At the time of deposit, there is 100 ETH and 250,000 USDC in the liquidity pool, which gives the liquidity provider 10% share of the aggregate pool. In exchange for their deposit, they receive LP tokens they can use to redeem their 10% share of the pool at any time.
If the price of ETH increases by 100% (now worth $5,000 per ETH), the liquidity pool changes to 70.71 ETH and 353,552 USDC. Since the liquidity provider has a 10% share of the pool, they can withdraw 7.07 ETH and 35,355 USDC, which equals $70,710. However, if the liquidity provider simply held their 10 ETH and 25,000 USDC, the position would be worth $75,000. The difference between the two, $4,290 (-5.72%), is the amount of impermanent loss experienced.
Understanding this, yield farmers then have to address the age-old question of “Will my yields make up for potential impermanent losses, given my view on price action for the the assets I have LP-ed for the duration of my LP position?”
For fundamentally-sound projects with double-digit yields, that answer is almost always a resounding yes. For fork projects6 with too-good-to-be-true APRs, however, yield farmers need to ponder on the question above deliberately.
Immature Tokenomics and Fragmented Liquidity
While innovations in DeFi are pushing the boundaries of how liquidity is provided, project tokenomics7 today are still immature. DeFi tokens are emitted at rates that far exceed the demand for them, amassing sell-side pressure over time. Some projects such as Curve have managed to temporarily abate this by introducing lockup mechanisms, but this merely delays the inevitable.
The argument for Curve’s is analogous to Bitcoin’s main criticism, where all of Bitcoin’s supply is projected to be mined by 2140. The optimistic expectation is that Bitcoin (Curve) will have cemented its position as a global reserve currency (DEX with the most trading activity) by then, and that miners (liquidity providers) will be incentivized enough by trading fees to maintain hash rates (continue providing liquidity).
Due to the dynamics above and fierce competition amongst DEXs for TVL, liquidity is often fragmented between different exchanges. This results in a poor user experience for traders, having to check liquidity on multiple exchanges before executing a large trade. Some DEX aggregators such as 1inch and Matcha partially solves for this by identifying the best price for a given trade, but the issue of fragmentation remains.
The advent of AMMs and yield farming represents the first leap forward for DeFi of the many in the coming years. Bearing the key risks in mind, they provide a permissionless way for users to provide liquidity for any asset pair on DEXs, negating the need for market makers and partnership teams on traditional centralized exchanges.
- Uniswap has since launched UNI v 3 which improves on the original x*y=k model via concentrated liquidity pools.
- A liquidity pool is a collection of funds locked in a smart contract.
- Slippage is the difference between the expected price of an order and the price at which the order executes.
- Yield farms is a slang term referring to high yielding opportunities that reward capital providers for providing liquidity to the protocol to transfer value.
- Yield farmers refer to users who allocate capital to different projects in search of yield.
- Fork projects refer to projects that are mere copies of other projects with original innovation.
- Tokenomics refers to the study of token design and the implications of that on price and consequently, liquidity.