Download PDF

You might have heard of Decentralized Finance, or DeFi for short, in the news lately. It is a part of the broad blockchain ecosystem that has taken the world by storm in the last couple of years. But what is DeFi, and what opportunities does it present? This article will offer an in-depth overview of the ecosystem, make parallels to traditional finance to help make sense of the disruptive innovation taking place, and finally, discuss some trade ideas.

But firstly, let us go over the fundamentals:

A blockchain is a distributed system of computers that uses cryptography to safely distribute a ledger that records transactions between users of the network. A blockchain can be set up with little programmability as to only allow for a narrow set of actions within the system, for example sending the native cryptocurrency between users, like in Bitcoin. More programmability, though, inevitably introduces a concept called smart contracts to the blockchain, which, like traditional legal contracts, contain an agreement between parties, with the key difference being that the obligations get executed automatically.

Smart contracts are the building blocks of networks such as Ethereum, Polkadot, Solana, Avalanche, Cardano, and more, and have dozens of current applications, with more inevitably to come. One of the most popular applications of the concept to date can be seen in the sprawling world of decentralized finance.

Decentralized Finance – the Basics

Decentralized Finance refers to the shift from centralized parties in the financial world, such as those of banks, exchanges, insurance companies, and other financial institutions, to peer-to-peer finance. In other words, Defi removes the need for the middleman and disallows any party from being able to make unchallenged decisions. The possibilities are endless, though until now, only a few concepts have been able to yield functioning and widely used applications, with the two most prevalent being decentralized exchanges (DEXs) and lending protocols. Also, DeFi aggregators and decentralized insurance platforms have been popping up lately, with many other types of services in rapid development.

How do they work? What makes them decentralized?

Although technology may vary widely, decentralized applications, or dApps, contain similar elements and notions to each other. This applies especially when they are related, for instance DEXs and lending protocols. To understand the key elements of DeFi dApps, let us take a close look at their most prevalent forms.

Decentralized Exchanges

DEXs, like traditional exchanges, are hubs for trading assets. The eponymous platforms are where Crypto assets are swapped, but unlike the traditional type, do not rely on traditional market makers to facilitate the trading. Instead, in blockchain fashion, the deed is shared by many participants such that the control is distributed and thus avoids being fully centralized. The smart contracts powering the so-called Automated Market Maker (AMM) create a system where participants can be on two sides: trading or providing liquidity.

Liquidity providers (LPs) are those that provide the assets that allow the system to make the market for traders. This system revolves around what is known as a liquidity pool. In this pool, the (conventionally) two assets given by depositors are going to be used to facilitate the trades by offering traders one token for another at a certain rate. It is significant to mention that different AMM types are constantly being pushed out. We will attempt to explain one of the first and most popular one: XYK. This particular model is used by one of the most popular trading venues, UniSwap, which uses the Ethereum blockchain to power its traffic. Everything is based on the constant product formula:

(1) Q_x \times Q_y = k

Where Q_x is the quantity of token x in the pool, Q_y is the quantity of token y in the pool, and k is a constant.  This means that the pools, by design, maintain a fixed ratio of 50/50 in the value of tokens in the pool. When someone wants to buy asset x using asset y, the price paid for asset x in terms of y, or the exchange rate, is given by the following:

(2) p_x = \frac{Q_x}{Q_y}

Now, a way to think of this situation where the trader wants to sell x in exchange for y, is that firstly, some Q_x is deposited into the pool. Now, because there is a greater quantity of x in the pool, Q_x \times Q_y \ne k . This implies that the price ratio has changed due to the mechanism. To rebalance the token distribution, the model relies on arbitrageurs to take advantage of this price difference by inverting the process; buy x in exchange for y at a discount.

Hence, the pool stays in constant balance, where the total value of x in the pool will always equal the total value of y in the pool. Only when new liquidity providers join in will the pool expand in size.

This only offers a theoretical explanation of the pricing mechanism. In practice, LPs need an incentive to loan out their assets, in compensation for the numerous risks involved in this process, which will be discussed later. In UniSwap, this comes in the form of a 0.30% fee on each trade which gets distributed to LPs commensurate to their token contributions. The process by which trading fees are earned by LPs in liquidity pools is known as yield farming – one of the trading opportunities that shall be discussed in this article.

So, what happens when the price of the assets in the pool changes?

In simple terms, the liquidity provider incurs an unrealised loss (in dollar terms) compared to not providing liquidity and just holding both assets. This is called impermanent loss and can only be realised when withdrawing the two assets from the pool.

To visualize the amount by which the asset prices change affects impermanent loss, requires a deeper delving into some simple mathematics:

Let’s take a simple example of a liquidity pool: ETH/USDT and assume for the sake of the example that you have deposited 10ETH and 100USDT and that you now own 1% of the total liquidity in the pool. Clearly, your LP position has a total value equal to 2,000 and k = 10,000,000 .

Using formula (2), the price of the Ether is given as the following:

(3) \text{Price(ETH)} = \frac{Q(USDT)}{Q(ETH)}

Where Q(USDT) and Q(ETH) represent the quantity of each respective token in the pool.

Now, with (1) and (3) we can rearrange and find alternative expressions for Q(USDT) and Q(ETH) :

(4) Q(USDT) = \sqrt{\frac{k}{\text{Price(ETH}}}

(5) Q(USDT) = \sqrt{k \times \text{Price(ETH)}}

To assess the impermanent loss effect, assume a 20% change in the price of Ethereum, effectively moving from 1 ETH = 10 USDT to 1 ETH = 12 USDT .

By plugging the numbers into 3) and 4) one can clearly see that the quantity of the pooled tokens changes to maintain the predetermined 50/50 ratio in value:

Q(ETH) = 912.87

Q(USDT) = 10,954.45

Since you own 1% of the LP, by assumption, then your withdrawable/claimable tokens are now 9.1287 ETH and 1095.45 USDT, equal to a total of 2190.9, which amount to 9.1$ of impermanent loss since the amount you would have had if you had just held your 10ETH and 1000USDT would be 2200. Again, this loss can only be realized if you withdraw liquidity. In the case that ETH drops back to 10$ the impermanent loss becomes 0 again.

The formula that illustrates the size of the impermanent loss in terms of the , the current price ratio with respect to the price ratio at the time of deposit, now can be derived from (1), (3), and (4):

2 \frac{\sqrt{p}}{p+1}-1

Hence, it becomes clear that the more volatile and uncorrelated the assets deposited in the pool are, the higher the opportunity risk of impermanent loss. The figure below illustrates the impermanent loss effect at different asset price changes compared to the time of deposit.


Description automatically generated

It is clear that impermanent loss is an opportunity cost that needs to be taken into account because if impermanent loss > fees collected, then one would be better off just holding both tokens without providing liquidity.

Hence, in a perfect scenario, prices between the two pooled tokens remain comparatively stable and the number of transactions is high. In this ideal case liquidity providers gain the most amount of fees without incurring impermanent loss.

This phenomenon is comparable to existing concepts in traditional finance. Although the words “yield farming” make us think of some sort of fixed income instrument, the rewards of liquidity provision compensate a set of risks which is far more comparable to exposure to a short straddle.

How is this comparable to a short straddle? Or more precisely a position that is delta positive and short volatility? As for short straddles, the contract holder loses money if the price moves too much in either direction. Just as implied vols compensate traders for taking this risk, reward rates for yield farming heavily incorporate the risk of impairment losses, meaning that assets that are more volatile between each other commend higher premiums. Unlike short straddles however, there is no expiry date, the premium is collected overtime and we still are exposed to the dollar value of the underlying assets.

Chart, diagram

Description automatically generated

Other Risks Related to Liquidity Provision

For every way you can make money in DeFi, it seems there are at least two ways you can lose it. As lucrative as these DeFi opportunities look, there are some risks. Aside from impermanent loss, the greatest risks involved in yield farming are protocol hacks and exploits.

An example of this is a “Rug Pull”, which is a specific technique of suddenly removing the majority of the liquidity from the liquidity pool. This is usually the final move from a malicious team and is a common form of an exit scam. It is extremely common in DEXs where anyone can list a new token and create a pool with an unaudited contract. An example of such rug pull was Meerkat Finance that managed to run off with around $30 million taken from the Meerkat/BNB pool.

Other risks include technical risks, for example smart contract bugs. Leverage: Yes, leveraged yield farming exists and liquidation can be a very real threat in such a volatile market.

Example: ETHUSDT Pool on UniSwap

The actual ROI you would have had in the past 90 days if you were to provide liquidity in the aforementioned example of ETHUSDT would be 5.42% (accounting for IL) as seen below. To put this into greater context, these returns might seem enticing from a traditional finance/fixed income perspective, but in the DeFi space they are on the low end of ROI. This is a relatively low risk pool, and at the time of writing, liquidity is sitting at $237m.

Chart, line chart

Description automatically generated

What Other Options do Liquidity Providers Have?

DEXs are not the only platforms that rely on liquidity pools. The concept is used in DeFi lending protocols, where liquidity pools only consist of one asset. Generally, providing assets to DEX liquidity pools is riskier, because the fact that the pools consist of two assets introduces impermanent loss risk. Therefore, the rewards are also generally lower for DeFi money markets, yet there still is a plentiful supply of them offering astronomical yields to LPs.

Another option LPs have is in the DEX market. UniSwap, the example given, is the most established of the many DEXs out there. Thus, to boost the usage of its platform, it does not need to pursue an aggressive marketing strategy nor change its fee structure to attract traders or LPs. Competitors, on the other hand, are faced with the following dilemma: if they increase transaction fees to reward LPs for increasing liquidity on their platforms, then traders will be disincentivised to trade there, as they can trade the exact same assets for lower fees elsewhere. The same principle applies when fees are decreased, where trading activity increases but LPs are not attracted to the returns they receive on their assets. This may also harm trading activity, as a lack of liquidity will inevitably result in traders receiving poor prices. Thus, another solution needed to be found.

Smaller projects came up with the idea of liquidity mining, which is the exact same process as yield farming, but with the added reward of the given platform’s governance token. This should act as an additional incentive for LPs to choose to provide liquidity on the smaller platforms, as these governance tokens are very likely to be small and unknown, thus providing the voracious LP with high potential gains. Because these platforms are likely small, the obvious risk is that the fees earned by the LP might not be high due to low trading activity. On the other hand, smaller DEXs usually offer a different array of assets to choose from than in more established DEXs, giving the LP a chance to tap into different, and potentially more rewarding, markets.

Finally, some LPs have the alternative of staking. Staking is the process which secures a blockchain network relying on the Proof-of-Stake (PoS) mechanism. This is contrasted with Proof-of-Work (PoW), the energy-intensive mechanism that is used by Bitcoin. Because of many factors, including the energy-intensive nature of the mining process, almost all new blockchains are powered by PoS. Therefore, there is a wide range of assets the LP can use to earn rewards. To understand staking, one needs to take a closer look at the PoS mechanism.

The way PoS works is the following: instead of miners confirming blocks by proving (hence “proof”) their computing power (work) by solving complex mathematical problems, block validators are chosen based on their stake (share of the Cryptocurrency), where the probability of being chosen as a validator is proportional to the share of one’s tokens against all the existing tokens which are staked. In return, the validator (the staker), receives the gas (transaction) fees paid by users of the blockchain during that block, as well as some freshly minted cryptocurrency.

Analogically, staking can be compared to traditional bonds, where the bond (the stake) provides the firm with capital (validates the block’s integrity, thus securing the blockchain) and in return the bondholder (staker) gets the coupon paid in the domestic currency (nodes are paid in the blockchain’s native cryptocurrency). The credit risk of a company can be compared to the technical risk – the risk the blockchain experiences bugs or gets hacked – of the blockchain. This is very rare. Bitcoin, since inception, never got hacked, as well as most other major networks. Because the staker must hold the Crypto asset at all times to stake, directional risk becomes substantial due to high market volatility.

Another risk for stakers is that while transaction numbers remain flat, more tokens become staked, thus decreasing the existing staker’s expected yield.

It is important to note that the staker is not an LP: no liquidity is provided per se, the assets simply correspond to the staker’s probability of validating the next block. Also, LPs cannot stake on dApps because they are not blockchain networks, they simply use the blockchain to power their smart contracts. Thus, by definition, staking does not exist on DeFi platforms, regardless of what some platforms claim (some use the term to make risky liquidity provision seem safe to unsophisticated investors). Ironically, some DeFi platforms make it easier for LPs to stake their assets on the native blockchain by setting up their own nodes, which may increase earnings and drastically reduce costs for LPs.

All in all, DeFi yield opportunities significantly contradict the ones in the current low yield environment in TradFi. Liquidity pools are one of the first DeFi innovations and most developed sources of high yield today. These returns are nowhere to be seen anywhere outside of crypto and that is why institutional interest is growing exponentially. The risks associated with such fixed-income like activities are eye-catching, while at the same time indicative of the lack of maturity in the sector. Time and continuous innovation towards other DeFi solutions, ranging from borrowing and lending to insurance have a chance to revolutionize whole industries. Whether this decentralization focus and effort is successful, remains to be seen.


Leave a Reply

Your email address will not be published.