SushiSwap's contribution to the growth of the Ethereum L2s user base

    Abstract

    In this dashboard, we want to analyze the contribution of SushiSwap to the growth of the Optimism and Arbitrum user base.

    In this dashboard, first, a series of basic concepts are explained (such as the types of Sushiswap services, etc.) then, the methodology used is fully explained in the next part.

    Finally, the number of new users and their interactions with Sushiswap in any of their first two transactions on Optimism and Arbitrum have been analyzed.

    In this work, the term "Sushiswap Users" is equivalent to the term "New users having interacted with SushiSwap in any of their first two transactions" and they are used interchangeably.


    Menu

    a - Definitions

    b - Methodology

    1. Optimism

      • 1 - 1 Analyzing new Optimism users
      • 2 - 1 Analyzing the behavior of Sushiswap users in Optimism
      • 3 - 1 Analyzing the contribution of SushiSwap to the growth of the Optimism user base
    2. Arbitrum

      • 1 - 2 Analyzing new Arbitrum users
      • 2 - 2 Analyzing the behavior of Sushiswap users in Arbitrum
      • 3 - 2 Analyzing the contribution of SushiSwap to the growth of the Arbitrum user base

      \

    3. Conclusion

    a - Definitions


    Introducing Optimism and Arbitrum

    Optimism and Arbitrum are Layer 2s scaling solutions for Ethereum that can support all of Ethereum’s Dapps.

    Layer 2 refers to a network or technology that operates on top of an underlying blockchain protocol to improve its scalability and efficiency.

    Instead of running all computation and data on the Ethereum network, Optimism and Arbitrum put all transaction data on-chain and run computation off-chain, increasing Ethereum’s transactions per second and decreasing transaction fees.

    Source: gemini.com, zerocap.com

    Optimism Blockchain Explorer

    Arbitrum Blockchain Explorer


    What is Sushiswap?

    Created by the pseudonymous Chef Nomi, SushiSwap is a source-code fork of Uniswap that took the open-source ethos of decentralized finance (DeFi) in a new direction with its decentralized exchange (DEX). The SushiSwap DEX is a type of automated market maker (AMM) that provides liquidity for traders while offering financial incentives to liquidity providers (LPs). SushiSwap lets users deposit assets into liquidity pools to receive LP rewards — in this case its native SUSHI token. SUSHI is the governance token used to vote on platform development, and it can also be staked for xSUSHI via SushiSwap’s SushiBar to receive further LP rewards.

    Source: gemini.com

    If you enter Sushiswap App, you will see that it has various services. These services include:

    1. Swap
    2. Xswap
      • With XSwap, Sushi now lets you bridge and trade tokens across the following chains (more to come #soon!):
    3. Provide liquidity & earn.
      • Liquidity Pools are a place to pool tokens (otherwise known as liquidity) so that users can use them to make trades in a decentralized and permissionless way. These pools are created by users and decentralized apps (or Dapps, for short) who want to profit from their usage. To pool liquidity, the amounts a user supplies must be equally divided between two coins: the primary token (sometimes called the quote token) and the base token (usually ETH or a stable coin).

        SushiSwap's liquidity pools allow anyone to provide liquidity to them; when they do so, they will receive SLP tokens (SushiSwap Liquidity Provider tokens). If a user deposited $SUSHI and $ETH into a pool, they would receive SUSHI-ETH SLP tokens. These tokens represent a proportional share of the pooled assets, allowing a user to reclaim their funds at any point. Every time another user uses the pool to trade between $SUSHI and $ETH, a 0.3% fee is taken on the trade. 0.25% of that trade goes back to the LP pool.

        You can read more about adding & removing liquidity on Sushi pools at: docs.sushi.com/docs/Tutorials/How to Get Started on Sushi/How to Add & Remove Liquidity

    4. Lending & Borrowing (Kashi Markets)
      • Kashi is a lending and margin trading platform, built on the BentoBox, that allows for anyone to create customized and gas-efficient markets for lending, borrowing, and collateralizing a variety of DeFi tokens, stable coins, and synthetic assets. Kashi's broad diversity of tokens is supported through the use of a unique isolated market framework. Unlike traditional DeFi money markets where high-risk assets can introduce risk to the entire protocol, in Kashi each market is entirely separate (similar to the SushiSwap DEX), meaning the risk of assets within one lending market has no effect over the risk of another lending market.

    b - Methodology


    In this dashboard, we use onchain data provided by Flipsidecrypto.

    • I - First, to find new users and the first two transactions of new users in each chain:

      • We use the [fact_event_logs] table related to that chain. For example, we use the [optimism.core.fact_event_logs]table to find new users and the first two transactions of new users on Optimism.

        The following SQL code shows the procedure of finding new users and their first two transactions in Optimism.


        WITH New_Users_First_Transaction_TimeStamp AS (

        SELECT MIN(BLOCK_TIMESTAMP) AS "First Transaction", ORIGIN_FROM_ADDRESS "User Address"

        FROM optimism.core.fact_event_logs

        GROUP BY "User Address"

        HAVING "First Transaction"::DATE BETWEEN '2022-05-12' AND CURRENT_DATE - 1 ORDER BY "First Transaction"

        ),

        New_Users_Transactions AS (

        SELECT Block_Timestamp, TX_HASH, "User Address"

        FROM New_Users_First_Transaction_TimeStamp JOIN optimism.core.fact_event_logs ON ("User Address" = ORIGIN_FROM_ADDRESS)

        GROUP BY Block_Timestamp, TX_HASH, "User Address"

        ORDER BY Block_Timestamp

        ),

        Rank_Transactions AS (

        SELECT BLOCK_TIMESTAMP, TX_HASH, "User Address", RANK() OVER (Partition By "User Address" ORDER by BLOCK_TIMESTAMP ASC ROWS BETWEEN unbounded preceding AND CURRENT ROW) "Transactions Order"

        FROM New_Users_First_Transaction_Details

        ORDER BY BLOCK_TIMESTAMP ASC

        ),

        New_Users_First_Two_Transactions AS (

        SELECT BLOCK_TIMESTAMP, TX_HASH, "User Address", "Transactions Order"

        FROM Rank_Transactions

        WHERE "Transactions Order" < 3 )

    • Sushiswap started supporting Optimism on 2022-05-13, so all calculations related to Optimsim started on 2022-05-13.

    • Sushiswap's transactions on Arbitrum are available from 2022-04-18, so all calculations related to Arbitrum started on 2022-04-18.

    • All queries in this dashboard were set to run every 24 hours, therefore some observations may be changed over time.

    II - After finding new users and their first two transactions, we must find all transactions related to Sushiswap services (which was introduced in part a) on each chain, which include:

    • Swap
      • To find swap transactions in each chain:
        • We use the [sushi.ez_swaps] table related to that chain. For example, we use the [optimism.sushi.ez_swaps] table to find Sushiswap swap transactions on Optimism.
    • Xswap
      • First, from docs.sushi, we find the SushiXswap deployer address related to each chain

        Then, from [fact_event_logs] table related to that chain, we find transactions interacted with the SushiXswap deployer address.

    • Provide liquidity:
      • To find Add Liquidity transactions in each chain:

        • We use the [fact_event_logs] and [sushi.dim_dex_pools]tables related to that chain.

        When a new user adds liquidity to a pool, SLP tokens (which was introduced in part a) are minted and sent to the user,

        By finding transactions related to minting SLP tokens, we can identify transactions related to adding liquidity to pools.

    • Lending & Borrowing (Kashi Markets)
      • To find Lending & Borrowing transactions in Arbitrum:
        • We use the [arbitrum.sushi.ez_borrowing] and [arbitrum.sushi.ez_lending]tables related to that chain.

          \

    Note: Lending and Borrowing is not yet supported on the Optimism network

    III - Finally, we join the first two transactions of new users (obtained in I ) with all transactions related to Sushiswap services (obtained in II) on tx_hash to find Sushiswap users (New users having interacted with SushiSwap in any of their first two transactions)

    1 - Optimism


    1- 1 Analyzing new Optimism users

    Loading...
    Loading...
    Loading...
    Loading...

    ✔️Observations

    • The total number of new users that joined Optimism from 2022-05-13 equals 557k users.

    • On 2022-06-01(49973 users), 2022-06-27(31815 users), and 2022-07-27 (29306), the most significant number of new users joined Optimism.

    • The most significant number of new users joined Optimism in June, the following month, the number of new users decreased by 56%, and the number of new users has been in a downward trend every month.

    1 - 2 Analyzing the behavior of Sushiswap users in Optimism

    Loading...
    Loading...
    Loading...
    Loading...

    ✔️Observations

    • The total number of Sushiswap users (New users having interacted with SushiSwap in any of their first two transactions) equals 557k users.

    • The most popular activities among Sushiswap users belong to Swap (508 users), xSwap (73 users), and Provide Liquidity (9 users), respectively.

    • The highest activity of Sushiswap users was recorded on 2022-09-28 (90 users), 2022-06-07 (35 users), and 2022-05-22 (22 users).

    • About 80% of activities related to xSwap were recorded on September 27th and 28th.

    3 - 1 Analyzing the contribution of SushiSwap to the growth of the Optimism user base

    Loading...
    Loading...
    Loading...
    Loading...
    Loading...

    ✔️Observations

    • These results show that Sushiswap hasn’t contributed to the growth of the Optimism user base because only 0.1% of new users interacted with SushiSwap in any of their first two transactions.

    • The highest share of Sushiswap users from new Optimism users was recorded on 2022-05-22 (1.7%), 2022-09-28(1.39%), and 2022-09-27 (0.88%)

    2 - Arbitrum


    1 - 2 Analyzing Arbitrum new users

    Loading...
    Loading...
    Loading...
    Loading...

    ✔️Observations

    • The total number of new users that joined Arbitrum from 2022-05-13 equals 0.909M users.

      \

    • On 2022-06-27(18662 users), 2022-06-28(16990 users), and 2022-06-29 (16416), the most significant number of new users joined Arbitrum.

      \

    • From 2022-04 to 2022-06, the number of new Arbitrum users has been on an upward trend, and the most significant number of new users joined Arbitrum in June(183.577K users), the following month, the number of new users decreased by 36.5%, and in the following months, the number of new users has not changed much.

    2 - 2 Analyzing the behavior of Sushiswap users in Arbitrum

    Loading...
    Loading...
    Loading...
    Loading...
    Loading...

    ✔️Observations

    • The total number of Sushiswap users (New users having interacted with SushiSwap in any of their first two transactions) equals 81.4K users.

    • The most popular activities among Sushiswap users belong to Swap (78695 users), Provide Liquidity (2646 users), xSwap (36 users), and Lending and Borrowing (12 users), respectively.

    • The highest activity of Sushiswap users was recorded on 2022-08-28 (90 users), 2022-06-05 (1781 users), and 2022-10-22 (1516 users).

    From 2022-04 to 2022-06, the number of Sushiswap users has been on an upward trend; the following month, the number of Sushiswap users decreased by about 75%, and in the following months, the activity of Sushiswap users has on upward trend again.

    3 - 2 Analyzing the contribution of SushiSwap to the growth of the Arbitrum user base

    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...

    ✔️Observations

    • These results show that Sushiswap has contributed to the growth of the Optimism user base because about 9% of new users interacted with SushiSwap in any of their first two transactions.

    • The highest share of Sushiswap users from new Optimism users was recorded on 2022-08-28 (60.57%), 2022-06-05(39.57%), and 2022-09-12 (28.49%)

    3 - Conclusion

    In this dashboard, we analyzed SushiSwap's contribution to the growth of the Optimism and Arbitrum user base, and the following results were obtained:

    • Results show that ==Sushiswap hasn’t contributed to the growth of the Optimism== user base because only ==0.1%== of new Optimism users interacted with SushiSwap in any of their first two transactions.

      • The total number of new Optimism users who interacted with SushiSwap in any of their first two transactions equals ==590== users.

        The most popular activities== among these users belong to Swap (508 users), xSwap (73 users), an==d Provide Liquidity (9 users), respectively.

        \

    • Results show that ==Sushiswap has contributed to the growth of the Arbitrum== user base because ==about 9%== of new users interacted with SushiSwap in any of their first two transactions.

      • The total number of new Arbitrum users who interacted with SushiSwap in any of their first two transactions equals ==81392== users.

        The most popular activities== among these users belong to Swap (78695 users)==, Provide Liquidity (2646 users), xSwap (36 users), and Lending and Borrowing (12 users), respectively.

    Loading...