Harmony's Most Swapped Assets

    Present a dashboard with insights and thoughts Hints: There are various dex-es to look at (e.g ViperSwap, DFK Dex, DeFira, SushiSwap)

    What are the top 5 most swapped assets on Harmony by volume and number of transactions?

    Loading...
    Loading...

    This isn't easy because wen balances on Harmony tables? Also, the swap tables show amounts but only in that tokens particular denomination, so we are comparing apples and oranges. Two possible approaches:

    1. With the list of top tokens, filter all the swaps with the main USD pegged stable coins (1USDC, UST, 1USDT, BUSD). This will probably be a pretty good volume proxy
    2. Figure out a convenient way to compute daily price i.e in a way where I can join tables on address, symbol name or symbol.

    Volume

    I discover the amazing https://dexscreener.com/harmony. Finding this information organized by the harmony block chain had eluded me until now! Nor only ia there price data, more importantly there is volume data, making me no longer need the price data to derive the volume data! Hey I worked really hard doing some wicked (for me) CTEs (Common Table Expressions) and a bit more tweaking to handle dups etc.

    And Then a Third Option Materializes!

    Top 5 assets by volume on Harmony:

    1. JEWEL
    2. WONE
    3. TRANQ
    4. COMFY
    5. FIRA
    db_img

    In addition to the game saver from dexscreener.com, I used the Metrics Dao mdao_harmony schema, utilizing the tokens and swaps tables. As one can see from my somewhat haphazard (but hey it works I think) nested CTEs, I wanted the top tokens by number of swaps, so I first took the top 30 tokens from token0 (the arbitrarily chosen left side of the two-token pools name) and then did the same thing for token1. In other words I counted the number of times each token name appeared for each of the leading tokens. I then combined, using the "union all" operation which keeps duplicates to get one table consisting of those two tables concatenated together. I then reduced the total number of rows to 48 by combining the totals of the duplicate rows (i.e tokens that were token1 in one swap pool and token0 in another).

    I was then prepared to isolate the price, or to estimate volumes by using the pools with stable coins and considering the partner token of that stablecoin to get a possibly decent volume proxy. This turned out to be unnecessary thanks to dexscreener

    How I did this

    Conclusion:

    With a little bit of data aggregating, joining, and wrangling of Metrics DAO's newly curated mdao_harmony schema, and the fortuitous discovery of a token data agreggator that listed the prices and volumes of tokens screened by the Harmony blockchain, I was able to determine the top 5 tokens in volume and in number of transactions.