Gas Efficiency
Q88. Which one of the sushi services consumes the most gas per transaction?
Introduction
The services to include in our comparison in this research are : -Adding liquidity -Removing liquidity -Adding an asset for lending -Borrowing -Removing an asset from lending -Repaying a loan -Swapping
Each of these activities have a special event that only appears for that activity. For instance repaying a loan generates the “LogRepay” event.
-
Adding liquidity -Removing liquidity:
'AddLiquidity','RemoveLiquidity'
-
Adding an asset for lending -Borrowing :
'LogRemoveAsset', 'LogAddAsset'
-
Removing an asset from lending -Repaying a loan:
LogRepay, 'LogBorrow'
-
and
'LogAddCollateral', 'LogRemoveCollateral',
-
Swapping:
Swap
Method
- In this dashboard I use
ethereum.core.fact_event_logs
table to find theSushiSwap: BentoBoxV1
, tx_hash by event_inputs:cloneAddress::string as pair_address as a contract address and by filter ofevent_name in ('LogRepay', 'LogBorrow', 'LogAddAsset', 'LogRemoveAsset', 'LogAddCollateral', 'LogRemoveCollateral', 'addLiquidity', 'removeLiquidity')
and then by joint it withflipside_prod_db.ethereum.transactions
table to calculate GAS ans FEE consumed in total and per each transaction.
So let's look at the findings.
- In the above bar chart the amount of GAS consumed per transaction for each service are depict, on over time since 2022.
Next graph
- In the following graph the cumulative growth of sushi services consumed gas per transactions are showed, that indicate the growth of
LogRemoveCollateral
AndLogAddCollateral
services are sharpen than others.
Conclusion
-
Swapping is the service with the most GAS consumed on all the time that consume in more than 97.7 % of the GAS USED.
-
LogRemoveCollateral
AndLogAddCollateral
consumed the most GAS per transaction, at 86.7M and 67.7K on all transactions, respectively. -
LogRemoveCollateral
service, which is followed byLogRepay
services are top two services that 19.1 and 13.7m of spent FEEs per transactions since 2022..