Sushi-104.Celsius and Sushi

    -- Q104. Find out what Celsius platform has done on sushi (swaps, lending, LP'ing, farming). -- Make sure to use cross-chain tables as much as possible to capture data on all chains. -- currently, we have swaps, lending, and borrowing data cross-chain. -- Hint: you can find all addresses belonging to Celsius network by querying this table: flipside_prod_db.crosschain.address_labels -- NOTE: This bounty will be paid on the ETH network. Please give your Sushiswap address on ETH when submitting

    Celsius and Sushi - Swaps

    • Here are the swaps that Celsius wallets did on Sushiswap
    • The most popular swap was LDO → WETH, a total of 359 transactions and 18M $USD in swap volume
    • The second most popular swap was CVX → WETH, a total of 55 transactions and 7.6M $USD in swap volume
    • There are other swaps on the list like WETH → WBTC for a total for 99 swap and 5.1M $USD in swap volume.
    • Given below is the daily breakdown of the Top 10 pair in terms of swap volume and frequency.
      • April 2021 saw the highest transaction frequency in terms of swaps
      • Nov 2021 saw the highest transaction swap volume.

    Celsius Borrowing and Lending on Sushi

    • There doesn’t seems to be any lending or borrow data in the Flipside Data for Celsius wallets as seen in the query used below.
    with wallets as (
    select address
      from crosschain.address_labels
      where address_name = 'celsius wallet'
    )
    
    (select
      date_trunc('month',block_timestamp) as date,
      s.borrower as wallet,
      sum(amount_usd) as lent_amount_usd,
      count(distinct tx_hash) as n_lending_txns
    from flipside_prod_db.crosschain.ez_borrowing s
      join wallets w on s.borrower = w.address and s.platform = 'sushi'
    group by 1,2
    limit 100
    ) union (
      select
      date_trunc('month',block_timestamp) as date,
      s.depositor as wallet,
      sum(amount_usd) as lent_amount_usd,
      count(distinct tx_hash) as n_lending_txns
    from flipside_prod_db.crosschain.ez_lending s
      join wallets w on s.depositor = w.address and s.platform = 'sushi'
    group by 1,2
    limit 100
    )
    

    Celsius LPing on Sushi

    • There doesn’t seems to be any LPing data in the Flipside Data for Celsius wallets as seen in the query used below.
    with wallets as (
    select address
      from crosschain.address_labels
      where address_name = 'celsius wallet'
    ),
    pools as (
      select 
        pool_name,
        pool_address
        from ethereum.core.dim_dex_liquidity_pools
      where platform = 'sushiswap'
      group by pool_name, pool_address
    )
    
     select 
        date_trunc('day',block_timestamp) as date,
      	pool_name,
        count(distinct(tx_hash)) as txn_volume,
        Rank() over (Partition BY date ORDER BY txn_volume DESC ) AS txn_volume_rank
      from ethereum.core.fact_event_logs e
      	join pools t on t.pool_address = origin_to_address
      	join wallets w on w.address = origin_from_address
      where origin_function_signature = '0xf305d719' -- Add Liquidity
      group by date, pool_name
      qualify txn_volume_rank <= 10
    
    
    Loading...
    Loading...
    Loading...
    Loading...