02 Data Alchemist: Battle of the DEXs

0xDataWolf
13 min readNov 24, 2022

--

Analyzing where to deploy $100,000 of Link Tokens on Uniswap V2 or Sushiswap

Chainlink | Uniswap | Sushiswap

Introduction

The challenge for this week is to analyze a Decentralised Exchange (DEX). A decentralized exchange facilitates trades between two tokens using a smart contract. It does not require one to give up custody of the user tokens to trade unlike a Centralised Exchange (Binance, FTX, etc). Anyone is allowed to use the DEX or create new liquidity pools hence making it decentralized and permissionless.

We would compare two very popular DEXs: Uniswap V2 and Sushiswap. Uniswap V2 is explored because the data regarding Uniswap V3 (which has higher usage) is currently not available in Covalent’s Increment platform.

A word from our sponsor: N̶o̶r̶d̶V̶P̶N̶ I mean Covalent

One unified API, One billion possibilities, Max Bidding, Better Believe It

Covalent is a crypto data provider that has a unified API that allows easier retrieval of crypto related data. It’s data has been used to build wallet interfaces, NFT galleries, investor dashboards, taxation tools, and lately Increment. Increment is a business intelligence tool designed for OLAP related queries to build dashboards and analyse transactions better

This blog is part of a three part series from the Data Alchemist Bootcamp that aims to train a next generation of crypto native data analysts to jump start their careers. The main focus of the bootcamp are to teach how to create thoughtful and in-depth metrics revolving around Reach, Retention, and Revenue.

Research Question

If you are ChainLink and are tasked to choose a DEX to deploy $100,000 for rewards and liquidity provision, where should the money be allocated?

Generally the guidelines are:

  • High trade and volume to earn fees
  • User stickiness so that marketing costs do not need to be incurred to sustain growth. Also to have a steady cashflow
  • Power users to determine if the Pool is used for commercial purpose instead of trading to have a steadier cashflow as well.

The aim of this study is to determine which DEX is more performant by looking at the three major categories:

Reach

  1. Number of traders over time
  2. Number of new traders over time
  3. Number of trades over time

Retention

  1. Mint to burn ratio for LPs vs Market Volatility
  2. MoM trader retention (Cohort Analysis)
  3. Trader Stickiness Ratio

Revenue

  1. Pools Volume
  2. Median LP liquidity provided over time
  3. Percentage of volume coming from a specific user type

We would evaluate the DEX by looking at the LINK-WETH pair on Ethereum. To make the analysis contextualize and actionable, we would assess these pools from the perspective of Chainlink (creator of the Link token).

Some extra information

WETH token contract:0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2

LINK token contract:0x514910771AF9Ca656af840dff83E8264EcF986CA

Uniswap V2 Pool: 0xa2107fa5b38d9bbd2c461d6edf11b11a50f6b974

Sushiswap Pool: 0xc40d16476380e4037e6b1a2594caf6a6cc8da967

Motivations

Chainlink’s reach

I’ve decided to analyze Chainlink because it’s a crucial protocol in the crypto ecosystem as it provides external data like sports scores, stock prices, and even random numbers. In other words, it is an oracle. Many protocols use Chainlink ranging from TraderJoe, Liquidity, and Ampleforth.

As transactions are immutable and smart contracts are highly trusted, it is easy to see why input data that is used to facilitate trade cannot be wrong. One way to alleviate this is to prevent the use of centralized oracles. Simply put, if there is only one party providing data, and if that said party goes offline, and provides wrong (or even maliciously manipulated data), then smart contracts relying on this data would be severely affected. Therefore by having multiple data sources, the oracles are more decentralized and thus making the network more robust.

What’s interesting about the LINK token? The token is used to compensate node operators that retrieve data from external sources. Then the node operator would determine the final price for the piece of data. In other words, understanding the behavior of the LINK token tells us the utility of Chainlink.

More importantly, because LINK is used for payment, this means protocols would have to change other cryptocurrencies into LINK before using Chainlink services. Deep liquidity is needed to ensure efficiency in the trade and therefore it makes sense to understand the behavior and health surrounding the LINK token on various DEX.

How does a DEX work?

In general, how does a DEX work? Briefly, there are two kinds of users: One that provides liquidity so that swaps can occur and the other user is just an average user swapping token A for token B.

Let’s use an Explain Like I am 5 example, suppose I want to run an awesome cookie shop without any storekeepers, cashiers, and even people that order cookies! How would I do it?

My shop contains many cookie jars with various different flavours. I can:

  1. Create a chocolate chip flavored cookie jar
  2. Tell a friend, Bob, to provide equal number of cookies and their corresponding value (in dollars). It can be something like 10 cookies and $10 provided into the jar. This means 1 cookie = $1. Note that providing cookies and dollars means that the total value of the jar is now worth $20
  3. Then, to let Bob know what is rightfully their share of the cookie jar, I would mint, or create, a liquidity pool token that acts like a receipt for tracking
  4. If Bob decides to want the cookies and money back, we can burn the token (aka use the receipt to claim) the proportion of cookies and dollars left in the pool.

Now the fun part, suppose Alice comes along and would want to buy some cookies, she can place the equivalent of money in the cookie jar and remove the proportionate amount of cookies. This is known as a swap. When doing so, she also pays a little extra called a transaction fee to Bob whom helped her get her cookies.

If Alice decides to also bake some chocolate chip cookies, she can also sell them for cash by using the same cookie jar.

Note that selling cookies or buying cookies is NOT the same as providing cookies. The former exchanges two items while the latter provides two items to help swappers swap for their desired items

Source: https://www.bitdegree.org/crypto/learn/what-is-liquidity-pool-in-crypto

DEX operations are similar to the steps above! The DEX, or the cookie shop, would be represented as a contract creator. This is where different Liquidity Pools (think different cookie jars) are created. Then, a Router contract would route the trade to the relevant pools for trade execution. Imagine a robot bringing you around the shop to get to the correct cookie jar.

For instance, the picture above describes how Uniswap works. It is where a liquidity provider places an equal amount of the underlying target token (LINK) and the token that people use to buy the target token (WETH) to get an LP token (the receipt that represents a share of the pool). Swaps are performed between two tokens and a transaction fee is paid to those that had provided liquidity.

This eliminates the need to have a people managing an order book or hold customer’s funds as everything is automated (hence sometimes they are referred to Automated Market Makers). You first allow the contract to transfer your tokens around and when the transfer is completed, all funds would be returned to you thus retaining full custody.

What is the difference between Uniswap and Sushiswap?

While the mechanics of Uniswap V2 is outlined above, Sushiswap is also fairly similar because it is a Uniswap fork. This means that a good portion of the code and mechanics is a copy. Welcome to DeFi.

As many crypto projects mimic real-life corporate structures, both Uniswap and Sushiswap have their tokens called UNI and SUSHI. Recall that transaction fee are paid to liquidity providers as a reward. Fees paid to liquidity providers for Uniswap ranges from 0.05%, 0.3%, and 1%. The fee tiers represent the risk that liquidity providers are willing to take according to the expected volatility of their pools. SushiSwap charges a 0.3% fee for all trading pairs where liquidity providers get 0.25% and SUSHI token holders receive the remaining 0.05%.

Source: https://defillama.com/yields?announcement=true&token=LINK&project=sushiswap&project=uniswap-v2&chain=Ethereum

What is also interesting about LINK/WETH is that their TVLs in Uniswap V2 and Sushiswap are very similar. The key difference is that Uniswap V2 does not have additional rewards. Would this affect how liquidity is provisioned? Does this mean Sushiswap is the preferred choice for traders and liquidity providers? Does attracting more liquidity providers mean better liquidity and therefore cheaper and more efficient trading for LINK users? Let’s formally start the analysis!

☝️The analysis timeframe are generally for this year and aggregated monthly

Dashboard can be seen here

Reach

Looking at reach tells the general usage of both DEX. It also tells us if more users are coming on board.

Number of Trades (Transactions)

In general, more trades are happening on Uniswap V2 although Sushiswap is a close second. As Uniswap is a pioneer in DEXs, it enjoys the first-mover advantage that many people default to using. We see that in terms of market share, Uniswap consistently had a market share above 50%

Type of Trades

Both protocols are predominantly represented by swap trades by count

Number of Traders and New Traders

Both have a relatively low number of unique traders using the protocol though Uniswap just slightly wins. Interestingly, despite having a similar trader count, Uniswap had way more transactions. In general, the number of traders had slowly come down as well as crypto faces the bear market. The macroeconomic environment is probably resulting in a lower activity

There are also sudden spikes in new traders in May. This coincides with the May Terra — Luna crash. The contagion could have induced panic some LINK holders to swap for WETH for capital preservation.

New vs Existing Users

Despite having a spike in new users, in the grand scheme of things, most users are returning users and not new users.

Summary:

Based on raw trader and transactions count, it would make more sense to deploy liquidity into Uniswap V2 than Sushiswap.

Winner: Uniswap V2

Retention

Retention is an important metric because retained users who have a preferred choice provide a consistent revenue that makes capital management easy to predict. A pool that has sporadic use means that fees collected may not be constant and thus affecting profitability

Net Liquidity Provided for LINK/WETH Pair

This metric is calculated by netting the liquidity that is added and removed. A negative number suggests that liquidity is being removed from the pool and is generally not a good sign. We see that both pools are suffering the same problem and the magnitude of the problem appears to be larger on Uniswap.

The falling LINK token price is also not helping as the decrease in token price suggests that Liquidity Providers are suffering from impermanent loss.

Because of the current limitations in Covalent, only Uniswap V2 can be analyzed. However, looking at other sources like Defillama, we see that the Uniswap V3 Pool has a much higher TVL and it is also increasing. This may explain why both the Uniswap V2 and Sushiswap pools are decreasing in liquidity provided as capital flows to other dominant pools

Source: https://defillama.com/yields/pool/3025b6b3-e95f-490e-ba10-540c9b1b08f9

Cohort Charts

Uniswap
Sushiswap
  • Sadly, I am not able to flip the last few columns due to how the graphing engine works. Nevertheless, the first few columns are enough for us to make some conclusions

Looking at cohort retention is also useful for us to know how many new users of a particular month are staying behind. This is also another measure of retention.

In general, both protocols exhibit similar poor retention metrics where about 40% of users retain after the first month and by month 6 the retention dwindles to 10–20%. While the data is limited, Sushiswap has a slight edge as by month 10 as Sushiswap still had a slightly higher amount of returning users.

Stickiness Ratio (average DAU / MAU)

The DAU/MAU ratio checks the proportion of daily active users relative to monthly active users. The idea is that we want to know what is the proportion of users who are active in the month and are also active daily.

In all cases, Uniswap is the dominating DEX as it had beaten Sushiswap consistently throughout the months for the whole year. Interestingly, the DAU and MAU in terms of absolute count are very similar

Summary:

Based on the charts for retention, we can see that retention for both DEXs isn’t that great as most of the liquidity are probably going elsewhere such as Uniswap V3 (not analyzed). Both protocols have liquidity being pulled out, users dropping out at roughly the same rate, and a very close DAU/MAU ratio thus the metrics are inconclusive

Winner: Draw

Revenue

Lastly, understanding revenue helps us understand where revenue sources are coming from and the potential fees earned. As this is DeFi and financial performance is still one of the most important metric to justify protocol usage, this is the tie breaker to help us determine where LINK-WETH should be invested in

Fees To Liquidity Providers

Right off the bat, we can see that the Uniswap absolutely dominates in terms of the fees that is earned while Sushiswap is a distant second. This is helped by the fact where Uniswap handles more transactions than Sushiswap

Volume by Aggregator

Interestingly, when attributing where the trades are coming from, most of the trades are coming from 1inch, 0x, Paraswap, and Cow protocol. Uniswap has a slight edge as it has more aggregators coming in thus increasing the ‘addressable market’.

Median Liquidity Added Over Time

Both protocols have similar amount of Liquidity Added and their patterns are rather sporadic.

Swap Volume

This is the main revenue source of a Liquidity Pool. For every swap traded, fees are accrued to liquidity providers, and therefore it is a simple yet important metric. We see that most fees are generated in Uniswap

Interestingly, most transactions are relatively small based on the distribution chart. Most of the transactions are less than $30,000

Trader Characteristics

Lastly, breaking down the type of traders using the protocol helps us understand the demographic of the users as well as learning how to better improve the product to target them

Some glossary of terms:

  • DEX Traders are any one that had ever used a DEX before
  • Medium DEX users are users that are ranked in the top 10% in terms of volume traded in USD
  • Heavy DEX users are users that are ranked in the top 1% in terms of volume traded in USD

We can see that Uniswap had way more heavy DEX users. This means that these power users could be using Uniswap more for their day to day LINK token needs. This is an important because it suggests that Uniswap are mainly used for protocols to get LINK tokens rather than Sushiswap. The commercial use of Uniswap makes it more sensible to deploy $100,000 there as we may get a steady cashflow

Summary

Uniswap wins as fees, volume, and type of users are factors that shows that it is the first choice to deploy LINK-WETH for trading

Winner: Uniswap

Conclusion

If given that $100,000 to provide LINK into LINK-WETH pools, I would choose the Uniswap V2 pool because it has higher transactions, traders, and fees earned along with power users. Although retention figures are poor, it is similar to the Sushiswap pool and thus we can conclude that there could be a more macro-related reason why retention rates are dropping.

I hope you had enjoyed the write up!

Check out the dashboard here

--

--

0xDataWolf

Wolf down the data. Fresh grad looking for a job as a crypto data/research analyst! Mainly NFT/Wallet/Transactions analysis. Super active on Twitter