Gas Efficiency

    Q88. Which one of the sushi services consumes the most gas per transaction? The services to include in your comparison are : -Adding liquidity -Removing liquidity -Adding an asset for lending -Borrowing -Removing an asset from lending -Repaying a loan -Swapping Hint: each of these activities have a special event that only appears for that activity. For instance repaying a loan generates the “LogRepay” event.

    Loading...

    Introduction

    On the Ethereum blockchain, gas refers to the cost necessary to perform a transaction on the network. Miners set the price of gas based on supply and demand for the computational power of the network needed to process smart contracts and other transactions Reference.

    The Sushiswap has various applications among users. The major application of Sushiswap are DEX, Bentobox and Kashi. The first one related to swapping actions or providing liquidity to LP pools on Sushiswap. The rest two stands for the lending and borrowing actions by Sushi users.

    In this bounty the performance of various events from gas per transaction point of view is evaluated.

    Methodology

    1. To identify the paid gas per transaction, the ethereum.core.fact_transactions is used.
    2. The events could be set on ethereum.core.fact_event_logs table.
    3. Each event identified by special event_name:
      • EVENT_NAME='AddLiquidity' for 'Adding liquidity'
      • EVENT_NAME='RemoveLiquidity' for 'Removing liquidity'
      • EVENT_NAME='LogAddCollateral' for 'Adding an asset for lending'
      • EVENT_NAME='Borrow' for 'Borrowing '
      • EVENT_NAME='LogRemoveCollateral' for 'Removing an asset from lending'
      • EVENT_NAME='LogRepay' for 'Repaying a loan'
      • EVENT_NAME='Swap' for 'Swapping'

    Outcomes

    The total number of transactions related to each event shown in the donut. The swapping event dominated the events executed by Sushi users.

    The gas per transaction for each event presented in the bar chart. Based on this chart, the Swapping, Adding liquidity and removing liquidity have the highest gas per transaction by Sushi users.

    Note: All of the three events related to the DEX sector of Sushiswap.

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

    The daily analysis of gas per transaction and number of transactions are provided in this figures. Based on these figures:

    1. On January 22th, the number of transactions related to repaying a loan is the highest one.
    2. the swapping event takes most of the daily transactions as expected.
    3. The daily gas per transaction shown in the area chart. Due to the results of this chart, removing an asset from lending has the highest daily gas per transaction on May 1st among events.
    4. According to the definition of paid gas and due o the nature of some events, the gas per transaction varied