This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.
DeFi and the rise of DEXs and DAOs (2/2):
Quantitative Analysis
By Chadi EL ADNANI, November 2022

This article was part of a broader report on the following theme: “Challenges and opportunities: The future of DeFi in TradFi”. Crypto Valley Association selected it among the top 5 pieces for its 2022 Call For Papers challenge.
Following the previous article, where we provided a more qualitative analysis of DeFi and DEXs, we dive directly into price discovery mechanisms using the mythical constant function x ∗ y = k formula. We also take inspiration from the paper ”Automated Market-Making for Fiat Currencies” by Mr Alex Lipton and Mr Artur Sepp [LS21] to quantify on-chain/off-chain arbitrage opportunities. Finally, we provide some market adoption charts for selected DEXs native tokens.
1. Price discovery in Uniswap v3
Here is a brief reminder about how the constant function x∗y = k formula works to define prices and liquidity levels in AMMs: let tok1 and tok2 be two fungible tokens, x the liquidity pool reserves of tok1 and y the reserves of tok2, k a constant such as
x ∗ y = k = L2 (1)
where L represents the pool’s liquidity.
Let us consider the case where a user desires to sell ∆x units of tok1 in exchange for ∆y units of tok2.
With a 0% fee assumption, we have:
(x + ∆x) ∗ (y – ∆y) = L2 = x ∗ y (2)
The name constant product market maker comes from the fact that any trade x for y changes reserves such that x ∗ y after the trade remains equal to the constant L2. More precisely, we could face two cases:
- A user would like to sell x units of tok1, and the smart contract needs to compute y.
- A user would like to buy y units of tok2, and the smart contract needs to compute x.
Solving for x and y in each case, we have:

Uniswap v3 takes this approach to avoid having to compute square roots when executing swaps; all formulas in v3 are done on the square root of the price, with the front-end application converting from √p to p and vice versa. As we will see later, using L and √p is convenient because only one change at a time: Price changes when swapping within a tick, whereas liquidity changes when crossing a tick or when minting or burning liquidity.
As mentioned before, one of the main novelties of Uniswap v3 is concentrated liquidity. In earlier versions, liquidity was provided uniformly across the x ∗ y = k reserves curve, meaning that liquidity was provided across the entire price range [0; +∞[. This is simple to implement but meant that as much as 95% of the assets held in a pool were never used in some cases, especially in stablecoin to stablecoin pools. In the wake of these observations, Uniswap v3 introduced the concept of a position, where LPs allocate liquidity to a finite range.

Source: Uniswap v3 whitepaper [tea21]
[…]
Read full analysis here!
Questions and comments about the rise of DEXs and DAOs can be addressed to research@sunzulab.com
References
- [LS21] Alex Lipton and Artur Sepp. “Automated Market-Making for Fiat Currencies”. In: (2021).
- [tea21] Uniswap team. “Uniswap v3 Core”. In: (2021).
Disclaimer
No Investment Advice
The contents of this document about the rise of DEXs and DAOs are for informational purposes only and do not constitute an offer or solicitation to invest in units of a fund. They do not constitute investment advice or a proposal for financial advisory services and are subject to correction and modification. They do not constitute trading advice or any advice about cryptocurrencies or digital assets. SUN ZU Lab does not recommend that any cryptocurrency should be bought, sold, or held by you. You are strongly advised to conduct due diligence and consult your financial advisor before making investment decisions.
Accuracy of Information
SUN ZU Lab will strive to ensure the accuracy of the information in this report, although it will not hold any responsibility for any missing or wrong information. SUN ZU Lab provides all information in this report and on its website. You understand that you are using any information available here at your own risk.
Non Endorsement
The appearance of third-party advertisements and hyperlinks in this report or on SUN ZU Lab’s website does not constitute an endorsement, guarantee, warranty, or recommendation by SUN ZU Lab. You are advised to conduct your due diligence before using any third-party services.
About SUN ZU Lab
SUN ZU Lab is a leading data solutions provider based in Paris, on a mission to bring transparency to the global crypto ecosystem through independent quantitative analyses. We collect the most granular market data from major liquidity venues, analyze it, and deliver our solutions through real-time dashboard & API stream or customized reporting. SUN ZU Lab provides crypto professionals with actionable data to monitor the market and optimize investment decisions.
Limit Order Book Distribution Analysis
SUN ZU Lab WEBB3 Analytics #4
By Arthur Serge, November 2022

SUN ZU Lab is delighted to present the fourth article of its latest series of publications, inspired by NASA’s James Webb space telescope, which has recently produced the deepest and sharpest infrared images of the distant universe to date. In the same spirit, we embarked at SUN ZU Lab on a mission to decrypt and analyze the deepest and darkest corners of the Web3 ecosystem, providing an overview of Limit Order Book Distribution.
Introduction
Limit order books are used by the majority of electronic marketplaces throughout the world, and cryptocurrency exchanges are no exception. A limit order is an order to purchase or sell a stock at a certain price or better. A buy limit order can only be executed at the limit price or lower, and a sell limit order can only be executed at the limit price or higher.
Hence, limit orders are not guaranteed to be executed and can only be filled if the stock’s market price hits the limit price. While limit orders do not guarantee execution, they help ensure that an investor does not spend more than a predetermined price for a stock. This article attempts to study the impact of aggregation on some limit order book (LOB) stylized facts in the cryptocurrency market based on public order book market data. For this analysis, we will use the order book (1 snapshot every 30 seconds) and trade data from December 2021, on two different venues: FTX and Bitstamp, which have significantly different tick sizes ($0.1 for Bitstamp and $1 for FTX) and on two cryptocurrencies: Bitcoin (BTC) and Ethereum (ETH).
Historically, exchanges have reduced tick sizes and imposed fixed values depending on stock prices to minimize transaction costs and improve liquidity. For exchanges in North America, Europe, and Asia, the influence of smaller tick sizes on market quality has been thoroughly examined. Market quality is generally described as two things: price efficiency and market liquidity. The first represents a market in which prices more accurately reflect economic reality. In contrast, the second defines a market where a decent quantity may be traded with minimum price movement.
Furthermore, the ideal tick size and the effects of changing the tick size for market quality have been studied theoretically. Still, because empirical work has primarily focused on stock markets, we lack a comprehensive understanding of the tick size for other markets.
It is necessary to have a large tick market with an average market spread lesser than 1.4 ticks (as defined in [DR13]) to use some order book models (e.g. Uncertainty Zone model, Queue-reactive model). However, most digital asset markets do not meet this condition. For example, the BTC-USD spread is, on average greater than $0.3 while all the considered markets have a tick size smaller than or equal to $0.1.

Moreover, the visualization of Limit Order Books can be a problem when the tick size is too small, as shown below. Aggregating the order books is a natural solution to this problem.

Questions and comments about “Limit Order Book Distribution” can be addressed to research@sunzulab.com
About SUN ZU Lab
SUN ZU Lab is a leading data solutions provider based in Paris, on a mission to bring transparency to the global crypto ecosystem through independent quantitative analyses. We collect the most granular market data from major liquidity venues, analyze it, and deliver our solutions through real-time dashboard & API stream or customized reporting. SUN ZU Lab provides crypto professionals with actionable data to monitor the market and optimize investment decisions.