Terra - 4. Terradash Part 3: Development

    In this dashboard we'll see the contracts with most deployement aka transactions in Terra, we'll use the labels to easily know the names and types of these contracts, and at the second part we'll look at the Stablecoin Activity on Terra, looking for the Inflows and Outflows of both $axlUSDC and $axlUSDT.

    Welcome to Terradash! Part three


    After the Luna Crash in May, Governance in Terra voted in favor to the proposal 1623, making that terra blockchain be renamed as “Terra Clasic” and their native Token Luna ($LUNA) be renamed into Luna Classic ($LUNC), giving birth (fork their project) to a new Terra blockchain with a new Luna token ($LUNA). Although there are people who call the new Terra blockchain and their Native Token as “2.0”.

    Structure of the Terradashboard


    Today we’ll focus on Contracts Deployed, a contract can be anything such a token ($LUNA), a Liquidity Pool such as $LUNA↔$axlUSDC , or the entire ==Astroport DEX==.

    The contract give us the information of what exactly is the transaction is about, for example:

    • Transactions coming from Astroport Contract will be related as the creation of New Contracts related to this Project, such as new liquidity Pools.
    • Transactions coming from Astroport Liquidity Pool $LUNA↔$axlUSDC Contract, will be related to Swaps or Liquidity there.
    • Transactions coming from $LUNA Contract, will be related to Transfers using this Token.

    These are examples of how contracts works.

    So for the first part of the dashboard we’ll look at Contract Deployement== over the weeks, and then we’ll see how many times (transactions) this contract were deployed, and highlight the top Contracts by differents kind of label.

    The Second Part of the dashboard will focus on the stablecoins for Terra 2.0, now that the UST is gone the favorite Stablecoin in Terra are the USDC and the USDT, but because these stablecoins were bridged by Axelar, they have new names, axlUSDC and axlUSDT.

    db_img
    db_img

    🌍Smart Contracts on Terra🌍


    Using terra.core.ez_messages we’ll look for transactions which have a message_type like '%Contract%' is easily to search that way than with message_type = ‘/cosmwasm.wasm.v1.MsgInstantiateContract’ after using that filter on our query, i selected message_value:contract to get the contract address and with that we can count(distinct contracts) or we can count the number these ==contracts== were deployed by using count(tx_id) and group by Contract Address, but because the number of address is high, we don’t want to have a lot of different ==contract address== without knowing what are they, so we’ll join terra.core.dim_address_labels on Address=message_value:contract and then we’ll get our contracts labeled.

    The Problem of joining these ==Contracts== with the Label Tables is the following.

    Loading...
    Loading...

    From all the ==contracts deployed on terra only a 10% of them are labeled, so before using the Label Tables to know the names of the contract we’ll do general metrics including all contracts.

    Loading...
    Loading...

    On the Week of August 8 ==terra== already deployed more than half of their total contracts, it took 12 weeks to reach 641 ==Unique Contracts, meanwhile to reach 1269 from 649 took 19 weeks

    But, every new week on ==terra the number of unique contracts being deployed weekly increased, with the last weeks having more unique contracts deployed than the first weeks of Terra Blockchain.


    This is the only moment when it makes sense to use the TerraLunas Palette Color, so i’ll use as much as i can.

    Loading...
    Loading...
    Loading...
    db_img
    db_img

    ↑Here is the number of times a contract was deployed, in Terra Blockchain, i used the Label_Subtype, because it provides the most useful info.↑

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

    ⭐Key Takeaways⭐


    • Looking at the weekly transaction activity by contract sub_type, Pools and Tokens Contract are the most used, the Staking Contract have days with more than 10% of activity but usually this amount is lower.
    • Weekly New contracts have a greater chance to be unlabeled if they weren’t launched on weeks closely to the Terra Launch in May-June 2022.
      • Most of the ==New Contracts== Labeled by Sub Type are tokens
    • Astroport is the Project with most Activity, with their contracts being deployed on 33% of the total unique transactions on ==Terra==, a Total amount of 231,672 Unique Transactions.
      • Followed by Terra Poker Token with 3%, Stader LunaX Token with 2.04%, terraswap with 1.69%, Valkyrie Token with 1.47% and Knowhere NFT Marketplace with 1.05% the same as stader.
        • The Rest of Projects contracts are being deployed with less than 1% of the total transactions.
    • If we look closely we can see that by Label Type only a 26.8% of the total activity is by DEX (189,911 Unique Transactions) and 17.3% for Tokens (122,090 Unique Transactions).
      • DeFi have 1.79% of Activity and NFT an 1.04%, the NFT Activity correlates with Knowhere which is the unique NFT Market on Terra at the moment.
        • There are only 4 Label Type.
    • Looking at Label Subtype a 17.3% of the total Activity (122,693 Unique tx) comes from Pool, and 17.2% (122,090 Txs) for Token_contract, Staking contract presents 47,101 Unique txs, a 6.65%
      • Followed by airdrop_contract with 2.46%, swap_router with 1.6%, general contract with 1.05%, dao with 0.359% and finally governance with 0.212%
        • There are more Label Subtype in Other but this amount is lower than 0.1%.
    • Finally looking at a Single Contract by Label the Contract with most deployement is Astroport $LUNA↔$axlUSDC Pair with 10.2% of the total transactions, followed by ASTRO contract with 8.53%.
      • And the rest of Single Contracts are from Astroport, except for TPT and LunaX contracts.
    • In a single Week most of the contracts are deployed in 1 to 10 transactions with a 50% of the total contracts, 20% of the total contracts are deployed in 11 to 20 transactions.
      • There are more ==contracts deployed== in 101 to 500 transactions than in 51 to 100 transactions.
      • In October 3 and October 17 weeks a contract was deployed in more than 10,000 transactions.
        • By the Proof we have is highly possible that this contract is the $LUNA↔$axlUSDC Pair, or some unlabeled Contract.
    • In a single Week most of the contracts are deployed by 1 to 10 senders, having more than 60% of the total contracts, 11 to 50 senders contracts are in second place with 10%-20% of the total contracts.
      • in June 6 week, two contracts were deployed by 5,001 to 10,000 senders.
      • Only 2 contracts were deployed by more than 10,000 senders in total
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...

    Summary


    We seen the Contracts with most activity and the Flow of Stablecoins in Terra, with both pieces of info i get the following Conclusion:

    • Astroport is the DEX in Terra with Most Activity, and the contract most active in all the time of Terra is the $LUNA↔$axlUSDC, and the reason behind is that a lot of users are trying to withdraw their funds of Terra using the IBC Transfer Off, because of that we can see that most Outflow Volume comes from transfer between the $1,000 to $100,000 which are regular users/small investors of the environment.
    • Because $axlUSDC is the asset with most Outflow the aggregators are transfering biggest amounts of ==$axlUSDC to Terra and that explained the Inflows between $100,000 to $1,000,000 or more than 1M.
    • But this isn’t something Bad, in general Most DEX always present a bigger swap volume between their native coin and the $USDC, and we can see that the Astroport LP between Luna and axlUSDC is pretty popular with the most activity by contract address.

    So in a nutshell, Terra Most Favorite Contract is Astroport $LUNA↔$axlUSDC LP and their Favorite Stablecoin is the ==$axlUSDC.

    Because most Traders are doing Outflows with big amounts of $axlUSDC Terra blockchain received the same Inflows of $axlUSDC but this time with transfers bigger with more than $100,000 $axlUSDC per Transfer.

    ⭐Key Takeaways⭐


    • Because the Outflows and Inflows of $axlUSDT are smaller the Normalize Charts doesn’t follow a normal trend, For the Inflows of $axlUSDT the transfers between $100,000 to $1,000,000 and $10,000 to $100,000 are the ones providing most Inflows Volume each Week.

    • The Outflows of $axlUSDT that provide most Volume are transfers between $10,000 and $100,000, $1,000 to $10,000 and $100,000 to $1,000,000 $axlUSDT


    $axlUSDT Inflows and Outflows by Amount Transfered

    🌍StableCoins on Terra🌍

    Using terra.core.ez_transfers to get the transfers of stablecoins and filter by currency = 'ibc/B3504E092456BA618CC28AC671A71FB08C6CA0FD0BE7C8A5B5A3E2DD933CC9E4' for the $axlUSDC and currency=’ibc/CBF67A2BCF6CAE343FDF251E510C8E18C361FC02B23430C121116E0811835DEF' for the $axlUSDT then we need to apply the Decimal to amount by 6, and with that we get the stablecoins volume.

    • 1st Chart.- To get the Net Volume simply sum(all) in the transfer table, and with a case to differentiate the USDC with the USDT.

    • 2nd Chart.- To get the Burn Volume i used terra.core.ez_messages, filter by message_type = '/ibc.applications.transfer.v1.MsgTransfer' and then to get the currency we used this attributes:burn:currency=Stablecoin Contract Address finally the amount is obtained by using this attributes:burn:amount/pow(10,6) with the Decimal applied.

    • 3rd Chart.- To get the Inflows and Outflows we need to do one query for each Stablecoin, and the query should have an union all with a select for Inflows using transfer_type='IBC_Transfer_In' and Outflows using transfer_type='IBC_Transfer_Off'. Also is important to multiply by -1 the Outflow amount and unstack the amounts in the Chart.

    • 4th Chart.- Using the Same Chart for I==nflows and Outflows== now we need to do 4 Querys One for each case, Stablecoin (x2) Flow (x2), in each of one we use a Case for amount/pow(10,6) to get the amount of stablecoin spent, and finally we count the Unique Senders and sum(amount/pow(10,6) to get the final Queries.

    • 5th Chart.- Using the same chart as the 3rd, to get the Inflows and Outflows but this time we'll use the terra.core.ez_swaps, first we filter by

      pool_id = 'terra1fd68ah02gr2y8ze7tm9te7m70zlmc7vjyyhs6xlhsdmqqcjud4dql4wpxr' to get the Astroport Luna-axlUSDC LP and pool_id = 'terra1zrs8p04zctj0a0f9azakwwennrqfrkh3l6zkttz9x89e7vehjzmqzg8v7n' to get the Terraswap Luna-axlUSDC LP. then to calculate the $axlUSDC Inflow we use from_amount/pow(10,from_Decimal) as the Inflow Volume and filter with to_currency = ‘uluna’ to get only the Swaps from axlUSDC to Luna, for the Outflow we do the same but this time we change the from_ by to_ in the amount/decimal and we filter by from_currency = ‘uluna’ to get the Outflows of $axlUSDC from the LP.

    Loading...
    Loading...
    db_img
    db_img
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    db_img
    Loading...
    Loading...
    Loading...
    db_img
    db_img

    Total Net Volume (In + Out) Transfered and Burned Stablecoins


    Inflows and Outflows of Stablecoins and Weekly Sender of Inflows and Outflows by Amount Transfered


    $axlUSDC Inflows and Outflows by Amount Transfered

    db_img
    Loading...
    Loading...
    Loading...
    Loading...

    ⭐Key Takeaways⭐


    • The Net amount of $axlUSDC is always bigger than $axlUSDT, with more than 60% each week in Net Volume.
    • The Amount of $axlUSDC is also bigger in burns with and exception in the week of August 1 where the $axlUSDT Volume being burned reached the 77%

    $axlUSDC is the favorite Stablecoin for users in Terra.

    ⭐Key Takeaways⭐


    • The Inflows and Outflows of $axlUSDT are pretty balanced most of the weeks, October 3 Week have the biggest difference between Inflow and Outflow with a net flow of +1.5M of ==$axlUSDT.
    • For $axlUSDC it’s seems that the Outflows are always bigger each week than Inflows, with the most bigger netflow of -23M of ==$axlUSDC== in September 5 Week.
    • In Both Stablecoins the amount of Inflows Senders spike in the Week of September 5, having the biggest amount of Senders.
    • In Both Stablecoins the amount of Outflows Senders is always bigger than Inflows Senders, so most of the people are trying to withdraw their stablecoins from Terra.

    ⭐Key Takeaways⭐


    • The Inflows of $axlUSDC with more than 1M takes almost 44%-69% of the total volume on that Week, aside from that Inflows from transfers between $10,000 to $100,000 $axlUSDC are the ones providing most Inflow Volume alongside transfers of $100,000 to $1,000,000 $axlUSDC, in third place are the Inflows from transfers with $1,000 to $10,000.
    • The Outflows of $axlUSDC between $1,000 to $10,000 are the ones providing most Outflow Volume Alongside Transfers between $100 to $1,000 and $10,000 to $100,000 $axlUSDC

    Personal Comments


    Luna Activity is really concentrated in the month of September when the $LUNA reached their spike in Price, the Net value of $axlUSDC reached their max spike again.

    I think that doing too much charts of inflows and outflows can stagnant very fast the progress of this dashboard, but they’re pretty informative to know about transfers volume and Users behind, i still can’t reach a nice way to easily organize these tables to present the data in a nice and clean way.

    But still i’m pretty happy with the result!. Thanks For reading.

    Made by Popex404 Twitter Link Here

    Loading...
    Loading...

    ⭐Key Takeaways⭐


    • As expected the $axlUSDC Flow of the Astroport $LUNA↔$axlUSDC LP is 200x times higher than the $LUNA↔$axlUSDC LP from TerraSwap.
    • It’s seems that the inflows and Outflows in both LPs are the same, but maybe that is the reason of the Inflows to Luna, to add liquidity to this Astroport LP.

    $axlUSDC Inflows and Outflows from Luna↔$axlUSDC Liquidity Pools from Astroport and Terraswap