In the previous article we looked at why DefiPlaza makes for an attractive value proposition to end-users. If you haven’t read that, check it out! In this instalment we’ll take a closer look at the liquidity provider side of things. The economics for liquidity providers consist of two parts: revenue and costs.
The economics of providing liquidity
The interaction that liquidity providers have with DefiPlaza is providing liquidity to the exchange, which is then used to allow customers to swap tokens against. At any point in the future, the liquidity provider may decide to withdraw their liquidity back into their own wallets. The question at hand is how much will they get back when they do. To understand what drives profit or loss in a multi-token AMM, let’s look at all components that factor into the value difference when depositing versus when withdrawing.
- Income from fees. The primary reason to provide liquidity to an AMM is that end-users can trade agains the liquidity in the pool for a fee. The fee on each trade (or liquidity add) on DefiPlaza is 0.1% of the input tokens. These fees accumulate in the DEX and result in a steady appreciation of the XDP2 index token over time.
- Price change of the underlying tokens. The DEX lists 16 tokens and for each of these tokens it holds a reserve. If the underlying tokens appreciate in value, so does the index token. If the underlying tokens depreciate in value, so does the index token.
- Impermanent loss. When the exchange is in balance, the dollar value of each token reserve in the DEX is equal. Suppose that one token suddenly doubles in value. In that the spot price on the DEX is no longer in balance with the external price, creating an arbitrage opportunity. After a while and a number of trades the exchange will once again be in balance and all 16 token reserves will be somewhat increased. However, the total value increase in XDP2 that this represents is not quite equal to the initial value increase of the single token which doubled in price. This difference is called impermanent loss and will be discussed in detail in the next section.
When the liquidity provider withdraws his liquidity, the amount they will get back is the original amount they put in, plus the fees accumulated over time, plus the price change of the underlying tokens, minus the impermanent loss. Thus, to make a profit on the trade as compared to simply keeping the same portfolio of 16 tokens it is required that the fee income outweighs the impermanent loss in the long run. Let’s look at these two components in more detail.
Fee income in a multi-token AMM
Trading fees are generated by trades taking place against the liquidity held by the AMM. The fee is currently set to 0.1% of the value for every trade on the exchange. If there are more trading volume, there is more fee income. Arguably the most important performance metric for any AMM is the amount of fees generated per amount of liquidity in the AMM. As we saw in the previous article, more liquidity generates less slippage per trade, but at the same time more liquidity means less income per trade for the liquidity providers.
How much liquidity does an AMM actually need to be optimally competitive? Let’s consider the largest UniSwap v2 pool with a USD component (USDC/ETH) as an example. As of July 2021 (when I did this analysis) that had around 320 M$ in liquidity. With the same total liquidity, DefiPlaza would have about 20 M$ per token spread evenly over the 16 tokens. UniSwap uses a 0.3% trading fee. DefiPlaza uses a 0.1% trading fee, so break even in trading fee cost to the consumer happens when DefiPlaza has 0.2% more slippage than UniSwap on any given trade.
With 20 M$ liquidity per token, DefiPlaza reaches a slippage of 0.2% for a trade value of 40 k$. This means that for all trades with with values below 40 k$, DefiPlaza could provide a more competitive offering to the consumer than UniSwap regardless of how much liquidity UniSwap has for that pair. The lower the trade value, the less significant the slippage and the more attractive DefiPlaza will be versus UniSwap. So how many of those lower value trades are being done? Consider the trades for 100,000 consecutive blocks in July 2021 on the USDC/ETH pair, a dataset of ±108k trades. The data for these trades is plotted below:
The plot shows that >90% of the trades are below 40k USDC. Thus, DefiPlaza with the same 320M liquidity could outcompete UniSwap for 90% of the trades for the USDC/ETH pair, while also outcompeting UniSwap on 119 additional pairs for all trades <40k$ in size! That is the capital efficiency gain from pooling many assets together at work.
The fraction of trades where DefiPlaza outcompetes UniSwap would be very large at 90%, but what does that mean for fee income? In the graph below we see the cumulative fraction of fee income plotted against the trade size in the same period as discussed above. What we can see in this graph is that roughly 30% of the fees of this pool are generated by the 90% of trades that are smaller than 40 k$ in size. At the lower fee percentage, those trades represent an equivalent income for DefiPlaza LPs of roughly 10% of the USDC/ETH UniSwap pool fee revenue.
This means that in a transparent market DefiPlaza should be able to take 10% of the UniSwap v2 USDC/ETH trading fees at the same liquidity. If we then take into account the other 119 trading pairs that DefiPlaza offers with the same liquidity, the combined fee income should easily reach more than 100% of the UniSwap USDC/ETH liquidity provider income. The above comparison is only against the UniSwap v2 liquidity & volume, DefiPlaza should be able to take market share from other DEXes as well further increasing fee revenue.
All this makes that we believe DefiPlaza can offer liquidity providers a competitive revenue even at a 0.1% fee level once it gains traction.
Calculating impermanent loss
At the cost side we have impermanent loss (IL) to consider. IL is something many people are aware exists but don’t quite fully understand. Put simply, as the market value of the liquidity reserves held by the DEX changes, arbitrage swaps occur along the x*y=k bonding curve to keep the spot prices on the exchange in balance with prices on the external market. As this happens the tokens held in reserve by the exchange slightly loose value as compared to the same portfolio held outside of the exchange.
The loss is called impermanent because if the relative price between the tokens listed at the AMM returns to the same ratio as it was initially, these losses vanish completely. After one supplies liquidity to an AMM, the impermanent loss for that liquidity position moves up and down over time as the relative token prices change. When the liquidity is withdrawn the impermanent loss is realised into an actual loss. What we need to understand is how IL is likely to develop over time for our liquidity providers.
Mathematically, it is possible to compute exactly how much the impermanent loss is as a function of the relative prices. If we take beta to be the price change for each token as compared to when the liquidity position was opened, one can work out the formula for generalised impermanent loss when N tokens are paired together (UniSwap N=2, DefiPlaza N=16) to the below:
Suppose we add $1000 in liquidity to DefiPlaza today. Then we will receive a certain amount of liquidity tokens XDP2 which represent our share in the reserves of all tokens held by the exchange. If we check back a month later, we might find that 2 tokens fell by 20% (beta=0.8), 4 tokens stayed the same price (beta=1), 8 tokens went +20% (beta=1.2) and 2 tokens went +50% (beta=1.5) in price. Then if we withdraw the liquidity tokens we initially received for our $1000 investment from DefiPlaza, we now would receive tokens worth ±$1120.70 on the external market.
However, someone who held the same $1000 split over the same 16 tokens without providing them as liquidity would now have $1137.50 worth of tokens. The Impermanent Loss is the relative difference between these two amounts. It can be calculated with the formula above for arbitrary pool sizes and token price changes. For the example numbers above the resulting impermanent loss is ±1.48%.
The impermanent loss is zero if all betas are the same. Thus, if all tokens move up and down at the same rate, no impermanent loss will occur at all. If part of the tokens increase significantly in price while others fall in price the impermanent loss will be large. The more correlation there is in price movement between the listed tokens, the smaller will be the impermanent loss.
Crypto markets have historically shown a high degree of correlation between token prices. With a larger basket of tokens, the risk of IL is effectively spread over the whole basket. If one token multiplies by 10x on price relative to the others, the IL will be less in a pool with 16 tokens than a pool with 2 tokens. If most of the tokens have similar price action, impermanent loss remains relatively small.
To be a compelling value proposition, the sum of fee revenue minus impermanent loss needs to be competitive as compared to other DEXes where people could provide liquidity. In the early stages after launch it is likely that trading volume will be relatively low. Thus, the revenue side of the equation is uncertain. To incentivise people to provide liquidity in this ramp-up period, DefiPlaza has a liquidity mining program.
Over the period of 1 year, 50M governance tokens are released on quadratic curve (with more tokens releasing in the early stages). In the first 3 weeks this program has been very successful, with liquidity growing steadily and rewards fluctuating from 300% to 1400% over this period. It is expected that the income of the liquidity providers will initially be largely made up of liquidity rewards, ramping down gradually over the year such that at the end of the year the income will consist purely of trading fees.
DefiPlaza offers a competitive value proposition to liquidity providers by making it a fundamentally cheaper place to trade which should attract high volumes over time. The impermanent loss side of the equation is a bit more difficult to understand than in a pair-based exchange, but since it lists many tokens which may reasonably be expected to have correlated price action, the expected value for IL is actually less in DefiPlaza than for many trading pairs in pair based exchanges. The liquidity rewards are the cherry on the cake.