Sushiswap - Swap Pairs on Optimism

    db_img

    Description of Work

    In this bounty, we want to obtain Sushiswap Swap Pairs on Optimism and display pairs of tokens along with their addresses and decimals for each of the tokens in the pair. To do this, we examine the following:

    • Total Sushiswap Swap Pairs on Optimism
    • Sushiswap Swap Pairs on Optimism list
    • Daily Sushiswap Swap Pairs on Optimism swap transactions over time
    • Top Sushiswap Swap Pairs on Optimism by number of swap

    We use the optimism.core schema, fact_event_logs and dim_contracts tables

    Method

    • To solve this question and find swap pairs using the data in the flipsidecrypto database, we need to find the contract address related to sushiswap routing in Optimism, so after checking and searching in optimistic.etherscan, we found the corresponding contract address:
      • sushiswap routing in Optimism contract address is 0xbe811a0d44e2553d25d11cb8dc0d3f0d0e6430e6== → optimistic.etherscan (TridentRouter contract)
    • Now we have to use this contract address to find the list of transactions related to sushiswap token swaps pair in Optimism and through that get the list of swap pairs and analyze and review their transactions. We use the fact_event_logs table available in optimism.core schema. To obtain swap pairs, we must first find the list of their transactions, which we use the following method:
      • select concat(event_inputs:recipient, ',', event_inputs:toToken Get pair token address
      • where origin_to_address = '0xbe811a0d44e2553d25d11cb8dc0d3f0d0e6430e6'TridentRouter contract
      • event_name = 'Swap'Swap transaction
    • Now we have the list of address pairs of sushiswap swap pair on optimism tokens, it is enough to get the specifications of these token addresses in the dim_contracts table, which includes the names of the tokens and their decimals.

    Exception:

    • Two tokens US (0x1318811b1c6aed9c48623adb1ee22f81c6c6f876) and UC (0x1318811b1c6aed9c48623adb1ee22f81c6c6f876) their information is not available in dim_contracts table, we got their details from optimistic.etherscan → US and UC
    Loading...
    Loading...

    Observations

    Using the data in the fact_event_logs table in the optimism.core schema, we obtained a total of 25 swap pairs related to sushiswap. You can see the full specifications of the pairs in the table above.

    2 → Daily Sushiswap Swap Pairs on Optimism swap transactions over time

    Loading...

    1 → Sushiswap Swap Pairs on Optimism list

    3 → Top Sushiswap Swap Pairs on Optimism by number of swap

    Observations

    The highest number of swaps are on Jun 17, June 26, June 22, July 6 and July 14 respectively.

    Loading...
    Loading...

    Observations

    • The highest number of swaps is related:
      • WETH/USDC
      • USDC/WETH
      • DAI/USDC
      • DAI/WETH
      • WETH/DAI

    Final Conclusion

    According to the results obtained from the data related to Swap Pair for sushiswap in Optimism, we obtained a total of 25 swap pair and displayed its information, among these 25 pairs, the number of swaps for pairs WETH/USDC, USDC/ WETH, DAI/USDC, DAI/WETH and WETH/DAI are more than other pairs