0000000000001100 - Steemit Interface PoC - What Do Users Do With Their Steem?

in hive-192037 •  3 years ago  (edited)

image.png
Source

I've had a busy few days (and am away for the next few days) and don't really have time to write this post so apologies if it's shorter than usual. Hopefully the substance behind the latest addition to the new front-end will more than make up for it.

Separator-code.png

To start with, I'll say that I didn't write this with the intention of it "competing" with @starlord28's #club5050 tool (available here).

As part of the new interface, it makes sense for a user to be able to quickly get a snapshot of another Steemit user and I'd like to make each user's profile page a lot more than what they've posted and commented. I'd like to include lots of user statistics - things like support networks, content tag clouds, favourite authors, biggest fans, etc. and I decided that the first stage to this would be to include some power-up and transfers statistics - building upon the work that @starlord28's done and providing additional in-depth information.

Separator-code.png

An introduction to the interface

image.png

The idea is that there are essentially 3 categories:

  1. Power Up (what are people doing with their Steem)
  2. Transfers In (where is their Steem coming from)
  3. Transfers Out (where is their Steem going).

This is all summarised in a Pie Chart so that (for example), if a user's club status is being considered - you can see how much has been powered up and how much is being "held back" for whatever reason. One thing I noticed when I uncovered a scam recently was that users were neither powering up, nor withdrawing so that technically, they appeared to be in #club100 whereas they weren't "buying into" the idea behind it (plus, they were scamming so did what they needed to).

So this gives a clear indication of what's being powered up and in my mind, 3 months is the #club period so this is what I've used. My intention is to provide alternative timeframes that you can toggle between.

Separator-code.png

How does it work?

In one sense, it's quite complex because there are a lot of factors to consider. In addition to this, rewards aren't made solely in Steem but also in Vests and SBD so a conversion is required - which involves a dynamic exchange rate.

Historic exchange rates aren't available at the moment so some of the figures are approximations - I believe that the percentages are fairly accurate though.

I've gone off on a bit of tangent - how does it work?

image.png
Source

The first stage is to retrieve all of the rewards that a user has received for a specific time period. This includes author rewards, post rewards, curation rewards, savings rewards, producer rewards and a couple of others which are included in the code but not currently active (liquidity rewards and proposal rewards).

Some of these are made in SBD and some in Vests so I split them out, total them up and convert the Vests to Steem.

These transactions make up the bulk of what you see in the Steem/SBD Rewards sections at the bottom of the screenshot.

image.png

In addition to this, I retrieve all of the "Transfers To" the user under review and once again, total up the SBD and Steem components to this. These are included within the bottom 2 charts and details can be seen under the "Transfers In" tab next to the username.

image.png

I've tried to make it all look pretty with rainbow colours.

Once I'd retrieved all of the "money in", I retrieve the users "Trades" to see how much SBD they've converted to Steem and Vice versa. Whilst I'm not displaying this information to the interface, it proved useful to help validate some of the calculations I do later.

Separator-code.png

The next step was to see what money's "going out" so similar to the "Transfers In", I looked at the "Transfers Out". I've created an array of exchanges (which is currently incomplete) so that I can differentiate between money directly leaving the platform and money going to different users. This can be see in the top pie chart and table under "Transfers Out: To...".

image.png

I also included details of this with another separate tab titled "Transfers Out".

image.png

I then looked at how much Steem was "powered up" via the "transfer_to_vesting" query which is once again included in the top chart and table.

The final pieces of information that are included are unclaimed rewards and SBD and Steem sat in the user's wallet which completes the picture as to what a user's doing with their Steem after they've earned it.

Quick recap:

  • All Rewards and Transfers In
  • Trades
  • Withdrawals and Transfers Out
  • Powered Up
  • Unclaimed and Unused Rewards

When putting the data into the top pie chart, the SBD is converted into Steem using the current internal market exchange rate so that every value is comparable.

I almost forgot... I mostly use Google Charts to make it look nice

Footer-Top-green.png

This is slightly longer than I'd expected. If you'd like to play with it in a live environment then you can visit http://steemit.lovestoblog.com/index.php and click on a username underneath a post or alternatively, follow this link - http://steemit.lovestoblog.com/clubstatus.php?author=fpl-gorilla - and change the "author" after the "author=" in the query string.

Please let me know what you think.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  
  ·  3 years ago (edited)

So, when I do an "advanced powerup" in order to powerup a different account, it appears that it shows up as a "transfer"?

Update: Or after looking more closely, and comparing to SteemWorld, I guess it doesn't show up at all?

I think it should appear as a transfer - do you have an example?

Or after looking more closely, and comparing to SteemWorld, I guess it doesn't show up at all?

I use steemchiller's API so presumably I'm retrieving the same data, I'll have to check though.

I see that most of your rewards go to remlaps1 - is this what you're referring to or something more complex?

  ·  3 years ago (edited)

The transfers are not right for me too.
I did a little research. It could be that you haven't set the limit for your transfer_to request. The default limit is 250 records. If I increase it to 1000, the correct values are displayed for me. In three months, some users can get a few transfers. :-)

Edit: It depends on which api you use.
account_history_api. ... default limit: 1000
transfers_api. ... default limit: 250

Good spot, thank you. I'm using the transfers_api and forgot to run a check on the transfers limit. Over a 3 month period, 250 isn't very many at all so I'll need to look at well over 1,000 I guess. I'll use your account as an edge case 😁

Thanks for pointing this out - I also discovered a bug in my "Trades" calculations so it's lucky that I haven't exposed this information yet (although I've remembered why I thought this would be useful) 🙂

Can you confirm something for me please? Do you know how many times you've powered up? I count 3 trades, all on March 7th - does this sound correct to you?

Yes, this is correct. In the last three months there have been 3 trades, all on the same day and at the same order.
And in the same period i have powered up 5 times.

👍🏼

I've spent the entire day bug fixing but your account should be in order now 🙂

http://steemit.lovestoblog.com/clubstatus.php?author=moecki

You took a long time to do that 1st power up meaning that you powered up 54.796 SBD despite earning 25.942 SBD 🙂

I've spent the entire day bug fixing but your account should be in order now

I hope nobody was left behind because of that ;-)

you powered up 54.796 SBD despite earning 25.942 SBD

Yep, I haven't done any conversions for a long time....

I hope nobody was left behind because of that ;-)

the-mrs-gorilla wasn't very happy about it.

As an example, here's a screen grab from steemworld. From remlaps-lite, the "transfer" to remlaps1 appears, but the "transfer to vesting" to remlaps-pb does not.

image.png

Got it - within my "power-ups" code for "transfer to vesting", I run a check for "transfer from" == "transfer to" so it doesn't capture power ups via another account. In my "transfers in", I check "transfers to" and not "transfers to vesting" so the don't get picked up.

They definitely need including in my "transfers in"... I'll get onto that, thank you 👍🏼

Since I have been a curator for the last two months, I can say that what you have done is an invaluable service to curators. It makes their lives easier and saves time.

In general, you have a lot of ideas, and if you manage to implement them, at least part of it, the new frontend will be very cool. I do not mean appearance, but functionality. It's important to me that your initiative to hide all sorts of shit, as well as filter content with tags, now there's information about clubs, and that's great.

I think it's time for you to write a proposal, because you have put a lot of time and effort into your work, but it is not known whether this proposal will be supported.

Thank you - I've probably just spent the same amount of time again fixing bugs and checking everything. I really need to get that proposal written and see where it leaves me 🙂

The interface of the summary of the transfers has been very good for you, I like that style. It looks clean. I am currently trying to work with the steemchiller API only for transfer queries, I am not a programmer but I am learning and looking for a way to do it. Good job with the site!

Thank you. Steemchiller's API's really good to work with and he's very helpful with any questions or if you're not getting the output you'd expect (normally user error on my part). Transfers is an interesting one to work with and it took me a while to get my head around it - who the current_owner and open_owner is and how it relates to the STEEM and SBD values. I had to take my time with that bit!

Well, I've been at it for several days, it only gives me the complete data in the console but I can't get it to show up in a table. I think I'll try to do it with simple queries and then move on to Transfers since it's my first time using the steemchiller API.

By the way I am forming a curator team on the topics of Technology, finance and computing, I think your main account is @the-gorilla right? If you are interested and have time you can leave me your contact information.

Greetings.

What's the API query that you're running and I might be able to help you to parse the data...?

That is indeed my main account and I've already been invited to join a curation team for this round of applications (a Lifestyle team). Thank you for asking 👍🏼

Thanks for answering. I'm taking the /transfers_api/getTransfersByTypeFrom/transfer/oscarcc89 api and used this script to connect and try to display it 😄

image.png

This data appears in the browser console but I have not been able to show it in the table. I am using a bootstrap template with hmtl5.

image.png

Thanks my friend. If you prefer you can write to me on discord. oscarcc89#4887

You can see in the console the structure of the response. You have not built this structure into your code.
The response has an element result. And in it is the element row. And it contains the transactions that you run through with your loop.

It's often useful to have these discussions publicly so that others can see in the future who might have the same problem 🙂

To output the JSON object into a template, the first thing I did was convert the object to an Array and then navigate this Array instead.

PHP has a var_dump command which outputs the array into the browser - I'd recommend keeping your code away from the HTML template for now. Perhaps using document.write() or alert() as a starting point. If you can get a piece of data output like this, then it should make embedding it into a template easier.

The UI looks really good dude!

I almost forgot... I mostly use Google Charts to make it look nice

Might switch to this on steemcryptic as well.

Thank you, I recommend Google Charts - once you've got your raw data, it's all very easy to use and then you can switch chart types very easily too.

I've created an array of exchanges (which is currently incomplete) so that I can differentiate between money directly leaving the platform and money going to different users.

It would be cool if there was a canonical list of these somewhere. If I can get the script I'm currently working on functional I'll eventually need to research this myself before I could turn it into a tool that's useful for the public.

It's a bit of a nightmare - especially as there are things like huobi-pro which can hide where the final destination wallet is. And then @remlaps appears to have created his own swap2020 which withdraws funds to Binance.

My list is very short at the moment:

$knownExchanges = ["binance-hot", "bittrex", "bitvavo", "deepcrypto8", "huobi-pro", "ionomy", "orinoco", "poloniex", "roqqulovesteem", "swap2020"];

I don't know who created swap2020, but it wasn't me. It's linked to the site simpleswap.io.

🤷🏼‍♂️ I keep finding services like this. There seem to be so many of them kicking around!

I can't remember if it was you who told me... but do you know how to submit a proposal into the DAO? I want to give it a go and see how it lands.

Yeah, I think it was me. Here was the launch post and a 3rd party web site for submitting proposals was here - https://steemproposals.com/. According to the FAQ, it costs 10 SBD to submit one.

TBH, at this point that site has been idle for years, so I don't know if I'd recommend trusting it with your keys. (I'm not even sure if it works with Steem Keychain or at all.) If you have the means, it might be preferable to make your own form with the create_proposal and proposal_pay API calls... I'm not entirely clear on that process, though. I've never submitted a proposal. The cli_wallet might be an option too, but I haven't been able to get that to compile in my environment for the last few years.

On a totally unrelated note - could you track the number of votes that are submitted? Similar to when I tracked the delegation abusers before, I'm doing similar again with old (1+ year) delegations. My logic being that accounts this old don't need their delegation any more and many of them are being used for farming 🙂

Still running around 8 votes per block.

I don't think anything's been done with the data I shared yet 🤷🏼‍♂️

And ironically, today it's running at 8 votes per block. I would have expected it to move in the other direction - if at all. ;-)

🙂 It should definitely be in the "if at all" category. I've highlighted just over 150,000 delegations that are over a year old which I believe should be removed. A lot of the accounts are simply dormant and the rest are being used to farm upvotes. Since steem has about 1 million outgoing delegations, I've analysed less than half to get this list but I think that by the time I'm done, there'll be over 1 million STEEM being returned 🙂

Sure. It's currently running a little above 6 votes per block.

Cool, thanks. I'm wary about sharing my keys too so will make sure to have just enough liquid rewards to submit the proposal and then change my master key straight after. If it all goes to shit, you won't be hearing from this account again 🤣

If it doesn't work, then we'll start to pool some knowledge of how it all works and look into Steemit's API / SteemJS and see what can be done. If we want a strong Steemit future, having this available has the potential for significant change so it's probably worth the effort.

Your post is manually rewarded by the
World of Xpilar Community Curation Trail

STEEM AUTO OPERATED AND MAINTAINED BY XPILAR TEAM
https://steemit.com/~witnesses vote xpilar.witness

Thank you 👍🏼