What percentage of the network does Steem Monsters & Steem Engine use?

avatar
(Edited)

image.png

Update: After thinking about it, I am including transfers to and from Steem Monsters and Steem-Engine, these are calculating now and will update when the results are in.

Was having a discussion with Aggroed yesterday about full nodes and the question came up "how much of the network does Steem Monsters and Steem Engine (this includes Tribes) use". I said probably around 50% sarcastically, I knew that was high but I figured it was still a large chunk.

As I generally like to know things, I decided to figure it out.

Creating a python script

I wrote a small python script and started monitoring the results. I used the ID field of custom JSON operations to filter transactions. I know both use custom JSON transactions to interact with the blockchain. The ID field is used to disclose the type of operation being performed.

Most of the Steem Engine transactions can be collected by watching for the ssc-mainnet1 ID. Steem Monsters and Scotbot use many unique IDs.

Filtering Aggroed's ops and other

I created two lists, ops_id and poorly named not_ops_id. I also had two global counters ops and aggroed_ops which kept track of the total operations and any operations that were related to an aggroed project (Steem Monsters, Steem Engine, and Scotbot).

I then monitored the blockchain filtering just custom JSON operations. Immediately upon finding a custom JSON transaction I would increase the ops variable. I would then look to see if the ID was in the list of aggreod related IDs. If so I increased aggroed_ops and continued looking for new transactions.

If the operating was not in the list, I then checked the not_ops_id list for transactions I knew about and if it was in that list I would just continue monitoring for new operations. If it wasn't on either list, it means I didn't have it assigned so I printed the operation's ID. I would stop the program and assign that ID to the appropriate list and start over.

After a few runs, I had most every operation assigned to a list and the program ran without printing any new operations. There are still some operations I don't have assigned but they didn't appear during the timeframe I ran the program.

Results

Once I was at this point, I added a print statement to print the variables ops and aggroed_ops for each JSON entry found. I also did the formula round(aggroed_ops/ops*100, 2) to calculate the percentage for each operation.

Over a short period of time, I found the percentage of total operations would range from 14% to 22% of all transactions on the blockchain.

Running overnight over almost 300,000 transactions, I ended up with 23.93%.

Total Ops: 299922
Aggroed's Ops: 71773 (23.93%)

Using SteemSQL to analyze the last 30 days

I wanted to refine my answer by checking over the last 30 days. With access to SteemSQL I could do just that. It's a lot more complicated but here is the logic I used.

First, I wanted to confirm I got all possible operation IDs. So I scanned the txcustoms table for any operation that started with sm_ or scot and updated my list to reflect any of the more rare transactions I didn't see. I picked up a few more Steem Monsters transactions but I had all the Scotbot transactions as there are only a few.

txcustoms has a timestamp field, so it is really easy to just look for the last 30 days of transactions that have any of the above ids in the tid field.

The transaction table however only has expiration for a datetime field, while this is helpful it isn't exactly what I am looking for. It does, however, have a block_num field and we know exactly how many blocks we have in a 30 day period. Unfortunately, due to the chain halt, this number isn't exactly perfect but should be fine for our purposes. I added in 12 hours worth of blocks (14,400) to account for chain downtime.

For the last 30 days, there have been 6,435,882 operations using the IDs I know about. Over the last 30 days (minus 12 hours) we have seen 27,261,701 total transactions.

6,435,882 / 27,261,701 * 100 = 23.6%

Over a period of 30 days, we are still in the 23-24% range. So I would say this is a really good estimate of the percentage of transactions across the entire blockchain.

Script

This is a quick and dirty script to answer the above question. You will need beem to walk the blockchain. I take no responsibility if you develop developer like symptoms.

from beem.blockchain import Blockchain
from beem import Steem

ops = 0
aggroed_ops = 0

op_ids = ['scot_claim_token',
          'sm_find_match',
          'ssc-mainnet1',
          'sm_submit_team',
          'sm_open_pack',
          'sm_team_reveal',
          'sm_sell_cards',
          'sm_gift_cards',
          'sm_combine_cards',
          'sm_claim_reward',
          'sm_combine_all',
          'sm_enter_tournament',
          'sm_undelegate_cards',
          'sm_update_authority',
          'sm_start_quest',
          'sm_cancel_match',
          'sm_refresh_quest',
          'sm_purchase_record',
          'sm_cancel_sell',
          'sm_surrender',
          'sm_join_guild',
          'sm_purchase_orbs',
          'sm_open_all',
          'sm_burn_cards',
          'sm_market_purchase',
          'sm_token_transfer',
          'scot_payout_beneficiaries',
          'sm_price_feed',
          'sm_guild_contribution',
          'sm_gift_packs',
          'test-sm_price_feed',
          'sm_delegate_cards',
          'sm_purchase_item',
          'scot_set_vote',
          'scot_create_claim',
          'scot_claim',
          'scotauto',
          'sm_set_authority',
          'sm_card_award',
          'sm_tournament_checkin',
          'sm_update_price',
          'sm_leave_tournament',
          'sm_leave_guild',
          'sm_guild_remove',
          'sm_guild_promote',
          'sm_guild_invite',
          'sm_guild_decline',
          'sm_guild_accept',
          'sm_edit_guild',
          'sm_create_tournament',
          'sm_convert_cards',
          'sm_cancel_match',
          'sm_add_wallet',
          'sm_accept_challenge'
         ]

not_op_ids = ['follow',
              'nextcolony',
              'vote',
              'drugwars',
              'GameSeed',
              'wise',
              'actifit',
              'pm_create_bid',
              'sh_active_user',
              'pm_cancel_bid',
              'sh_active_user',
              'vaporchain',
              'esteem_boost',
              'BandiFight_Fight',
              'start_mission',
              'likwid-beneficiary',
              '3speak-publish',
              'blockchainstudio_gdp',
              'blockchainstudio_fp',
              'BandiFight_Fight',
              'get_new_missions',
              'pm_update_bid',
              'pm_accept_contract',
              'steemfinex',
              'qwoyn_report',
              'poo',
              'pm_new_delegation',
              'pm_cancel_delegation',
              'BandiFight_UpdateStats',
              'blockchainstudio_wit3',
              'esteem_point_transfer'
             ]

def process_operation(op):
    global ops
    global aggroed_ops
    
    ops += 1
    
    if op['type'] == 'custom_json':
        if op['id'] in op_ids:
            aggroed_ops += 1
            print(f"Total Ops: {ops} \nAggroed's Ops: {aggroed_ops} ({round(aggroed_ops/ops*100, 2)}%)")
        else:
            if op['id'] not in not_op_ids:
                print(op)               
                

def main():
    stm = Steem()
    chain = Blockchain(stm, 'head')

    for op in chain.stream():
        process_operation(op)

if __name__ == '__main__':
    main()

SQL Statements

Count transactions in last 30 days

select count(*)
from transactions
where block_num > 35262014

Find all SM & SE Transactions

select count(*)
from txcustoms
where tid in (
'scot_claim_token',
          'sm_find_match',
          'ssc-mainnet1',
          'sm_submit_team',
          'sm_open_pack',
          'sm_team_reveal',
          'sm_sell_cards',
          'sm_gift_cards',
          'sm_combine_cards',
          'sm_claim_reward',
          'sm_combine_all',
          'sm_enter_tournament',
          'sm_undelegate_cards',
          'sm_update_authority',
          'sm_start_quest',
          'sm_cancel_match',
          'sm_refresh_quest',
          'sm_purchase_record',
          'sm_cancel_sell',
          'sm_surrender',
          'sm_join_guild',
          'sm_purchase_orbs',
          'sm_open_all',
          'sm_burn_cards',
          'sm_market_purchase',
          'sm_token_transfer',
          'scot_payout_beneficiaries',
          'sm_price_feed',
          'sm_guild_contribution',
          'sm_gift_packs',
          'test-sm_price_feed',
          'sm_delegate_cards',
          'sm_purchase_item',
          'scot_set_vote',
          'scot_create_claim',
          'scot_claim',
          'scotauto',
          'sm_set_authority',
          'sm_card_award',
          'sm_tournament_checkin',
          'sm_update_price',
          'sm_leave_tournament',
          'sm_leave_guild',
          'sm_guild_remove',
          'sm_guild_promote',
          'sm_guild_invite',
          'sm_guild_decline',
          'sm_guild_accept',
          'sm_edit_guild',
          'sm_create_tournament',
          'sm_convert_cards',
          'sm_cancel_match',
          'sm_add_wallet',
          'sm_accept_challenge'
)
and timestamp > getutcdate() - 30

Find unique IDs for Steem Monsters

select distinct(tid)
from txcustoms
where tid like 'sm_%'
and timestamp > getutcdate() - 2

Find unique IDs for Scotbot

select distinct(tid)
from txcustoms
where tid like 'scot%'
and timestamp > getutcdate() - 2


0
0
0.000
23 comments
avatar

That is a lot of transactions!

0
0
0.000
avatar

To listen to the audio version of this article click on the play image.

Brought to you by @tts. If you find it useful please consider upvoting this reply.

0
0
0.000
avatar

ok, so they are using 25% roughly of all transactions on the chain so far. do you have an idea of how much this chain is capable of scaling wise? I saw some comparisons last year that said steem is using 1 or 2 % of its overall capacity but this was before @aggroed and @yabapmatt happened :-) so it would be cool to see how we are doing in that dept (but I have no way to find out with my non-tech skills)

0
0
0.000
avatar

So what's the biggest user of the other 76%? haha

0
0
0.000
avatar

I'd have to be a bit more clever as this was relatively easy as I knew it was all json transactions.

It's actually a lot higher if you factor in transfers to steem monsters and other activity which isn't factored in.

0
0
0.000
avatar

Cool analysis, I would have guessed more, if you look at the tx count on steemapps.com, Steem Monsters alone use up to 50% of all tx. Have you missed some Steem Monsters and Steem Engine related transactions?

0
0
0.000
avatar
(Edited)

I didn't touch transfers which there definitely are a lot of transfers to and from steem monsters/steem engine. I'll look into them as they are likely a decent amount as well.

I am re-running it taking into account transfers.

So far when adding transfers it goes up to as much as 28%

0
0
0.000
avatar

oh interesting, why still this huge gap compared to steemapps.com?

0
0
0.000
avatar

Not sure what metric they use.
I'm purely using transactions and with transfers, it is closer to 28-33%.

0
0
0.000
avatar

How many RPC nodes does aggroed operate?

0
0
0.000
avatar

0

0
0
0.000
avatar

Zero, as in - he himself operates no RPC nodes because others operate one for him?

Or zero, as in - they actually use other RPCs because they don’t even pay someone to run one for them?

0
0
0.000
avatar

Interesting.
Very interesting.

BTW, I noticed you downvoted TTS.
I used to think what a silly Bot... who needs it?
but, I've now run into a couple of users, here online who are struggling with vision issues. One types in All caps for her Posts, and when I asked, she mentioned her vision difficulties.

You might reconsider downvotes on the TTS bot.

0
0
0.000
avatar

marky, how do these resources costs compare with what else is on the chain. SM/SE might be 24% of tx activity, but I'm betting it's like 5% of RC cost.

0
0
0.000
avatar
(Edited)

It's much more work to calculate RC and so on. Custom Json which is what is most of SM/SE is more expensive than votes and transfers not quite as much as post/comments. So it will still be a large %.

The activity is more like 28-34% when you factor in transfers to SM/SE services.

I'm not saying it is bad that it uses a large chunk, just was curious. I do think it means you should have your own nodes though.

0
0
0.000
avatar

greetings, @themarkymark

Excelent post, man!! You could use "spt" tag too...

thank you and have a nice day

0
0
0.000