EVM - 7. Derivative Daze


    Derivatives DEX Gains Network recently crossed a major milestone, with more than $1.5 million in trading volume on Arbitrum, fueling further interest in derivatives trading on the platform.

    Building on this Dune dashboard, create a dashboard that shows the following data for Gains Network and any other derivatives trading markets you can find:

    • Total volume
    • Total traders
    • Total trade fees
    • Trade volume over the past day/month/three months
    • Traders over the past day/month/three months

    Note: We link to a Dune dashboard as a source of inspiration. You are free to choose your own preferred publishing platform.

    Introduction

    Gains Network is creating gTrade, a liquidity-efficient, powerful, and user-friendly decentralized leveraged trading platform. the unique synthetic architecture that makes gTrade more capital efficient than any other platform, allowing cheap trading fees, and a large selection of leverages and pairs (up to 150x on cryptos, up to 1000x on forex, and up to 100x on stocks). Read more…

    The ecosystem's GNS and ERC721 utility tokens drive the protocol (NFTs). GNS and NFTs are intended for active use in the platform (utility) and protocol ownership through revenue capture and control. GNS investors receive platform fees through Single Sided Staking, burn GNS using platform revenue, NFT holders get decreased spread and boosted rewards, and NFT bots execute limit orders and liquidations. See GNS Token.

    GMX is a decentralized spot and perpetual exchange that supports low swap fees and zero price impact trades.

    Trading is supported by a unique multi-asset pool that earns liquidity providers fees from market making, swap fees and leverage trading.

    Dynamic pricing is supported by Chainlink Oracles and an aggregate of prices from leading volume exchanges.

    🛠️ Method

    In this dashboard, I will examine a comparison between the the Gains Network (GNS) and GMX Protocol on Arbitrum network in terms of trade metrics.

    The arbitrum.core.fact_event_logs table will be the primary source of data for the platforms.

    • The SQL query is build on top of this SQL query.

    Numerous tradable assets exist for the GMX protocol (USDT, USDC, WETH, WBTC, LINK, FRAX, DAI, UNI). Thus, we need to utilize ethereum.core.fact_hourly_token_prices to connect data on these tables and compute the USD Value of trades in order to determine the USD Volume of trades.

    Since the DAI token used on the Gains Network is USD-Pegged by design, there is no need to join any additional tables in order to determine the USD equivalent of any transactions.

    To calculation the amount of generated Fee volume by platforms I used the DATA column on arbitrum.core.fact_event_logs tables and decoded it.

    The calculations have performed over past day (2023-02-06) by hour, over past 30 & 90 days by day and in total state.

    Here is a summary of the methodology used in the SQL query:

    1. The query starts by creating several common table expressions (CTEs) to represent the relevant data for both the Gains Network (GNS) and GMX Protocol on the Arbitrum network.
    2. The first two CTEs, gains_txns and gmx_txns, retrieve the data for the past day (2023-02-06) by hour. This includes the sum of the trade volume, the number of unique traders, and the sum of fees generated.
    3. The next two CTEs, gmx_txns and gmx_txns, retrieve the data for the past 30 days by day. This includes the same information as in step 2.
    4. The final two CTEs, gmx_txnss and gmx_txns, retrieve the data for the past 90 days by day. This includes the same information as in step 2.
    5. Finally, the each two queries combines all of the CTEs into a single result set that provides the total volume, number of traders, and fees generated for both the Gains Network and GMX Protocol, as well as a breakdown by time period (past day, past 30 days, and past 90 days).
    6. This queries have been used as the basis for creating a dashboard to visualize the trade metrics comparison between the Gains Network and GMX Protocol.

    \n

    🌡️ Analysis

    ✍🏻 Conclusion

    In conclusion, based on the evaluation of transactions, unique traders, trade volume, and generated fees over different time periods, it can be seen that the Gains network has had a significant impact on the DeFi market since its launch in 2023. Despite having a lower number of transactions and unique traders than the GMX network, the trade volume in the Gains network has been consistently higher. Additionally, the generated fee on the Gains network was over 20x higher than that of the GMX network over the past day, with a total generated fee of $0.94M since its launch, compared to $70.5M in the GMX network. These findings suggest that the Gains network has the potential to disrupt the DeFi market and become a major player in the near future.

    Hey there 👋!

    Firstly, I appreciate you sticking with it until the conclusion.

    I'm Hamed, a civil engineering Ph.D.

    student interested in data analysis.

    I've made many similar dashboards and visualizations since I started at Flipside in January.

    Please take a look at my various contact details and let me know what you think.

    About:

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

    ⏳ Trades Metrics Over Past 30 days

    ⏳ Trades Metrics Over Past 90 days

    🔥 All Time Overview

    🔥 Generated Fee Volume

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

    ⏳ Trades Metrics Over Past day

    The charts right show the trades and traders count over past specified day by hour.

    As can be clearly seen, GMX was dramatically higher than Gains network in terms of these two metrics, that highly spiked in 16pm sharp.

    Overall, in the past 24 hour the transactions and unique user counts were over 4x times than Gains network.

    🔎 Findings:

    Although the number of trades and unique traders in the GMX network were significantly higher than in the Gains network, the charts left, surprised us by representing trade volume in hourly increments over the previous day. These charts show that the trade volume in the Gains network is far greater than that of the GMX, with some hours, such as 16 p.m., exceeding 3x that of the GMX. Furthermore, the average volume in the Gains network was higher than GMX in most hours over the past day, as shown in the following charts. In the aggregate, the trade volume in the Gains network was more than 2x that of GMX, in contrast to the cumulative transaction count. It appears that the Gains network had a higher volume of transactions, whereas the GMX network had the opposite.

    🔎 Findings:

    These trends over the past 30 days suggest that the Gains network is attracting more traders and larger trades, potentially due to increased interest or a shift in the types of assets being traded on the platform. The decrease in transactions and traders in the GMX network after peaking on January 19th may indicate a shift in market activity or a decrease in overall interest in the platform.

    Additionally, the higher trade volume in the Gains network compared to the GMX network highlights the potential for the Gains network to attract more valuable trades and to generate more revenue from trading fees.

    It is also important to note that these metrics should be considered in the context of broader market trends and events. External factors, such as changes in market conditions or regulatory developments, could impact the activity on both platforms and should be taken into account when evaluating their performance.

    In conclusion, the comparison between the Gains network and GMX network over the past 30 days highlights the importance of considering multiple metrics and broader market trends when evaluating a trading platform. The shift in metrics in the Gains network, particularly in terms of trade volume and trader count, suggests that the platform is becoming increasingly attractive to traders, and may represent a potential opportunity for growth and expansion.

    🔎 Findings:

    The evaluation over the last three months does not make sense to me because of the newly launched Gains network on Arbitrum and the lack of data before the current year (2023). 

    But I done it because it is a part of the question.

    So over past 3 months the transactions and traders count on GMX decreased, that was normally because of bear market.

    The cumulative volume on Gains network increased in a sharpen momentum.


    The following section the overall view of both platforms has been depicted.

    The 7 day moving average for each metric are calculated.

    As can be seen the trade, unique trader and trades volume increased over time on Gains network till Jan 25-27th, then went on downward trend.

    In the other hand in GMX these metrics experienced some fluctuations over time, so that the trade volume spiked in Nov 8th and reached the peak at above $92M.

    🔎 Findings:

    In this section I tried to calculate the generated Fee volume by platforms.

    The generated fees on Gains network is calculated by the explanations in this page.

    According to that, the fees has paid at closing the position by 0.08 of initial

    position size DAI.

    So I calculated the position size DAI where the

    TOPICS[0] = '0x165b0f8d6347f7ebe92729625b03ace41aeea8fd7ebf640f89f2593ab0db63d1'

    and then multiplied it in 0.08.

    To calculate the generated fee on GMX I used

    TOPICS[0] = '0x5d0c0019d3d45fadeb74eff9d2c9924d146d000ac6bcf3c28bf0ac3c9baa011a' and sum that by decimal = 30.

    The visuals left show the calculations.

    The generated fee has calculated over three aforementioned time period.

    As can be seen over past day the generated fee according aforementioned formula in Gains network was over 20x more than GMX with $280K, against to $18K, respectively.

    Overall, the total generated fee on GMX is about $70.5M since launch date in late of August, while in Gains network the total generated fee raised to $0.94M only over current year.