Front-running on content platforms with market – case study of yours.org front-running bot (part 2)

In previous part, I shared what is interesting about content sharing networks that incorporate direct market mechanisms such as upvoting, tipping, paid comments and paid content (paywall). In this part, I will focus on upvoting, because it allows people other than content creators to discover and invest in great content and make money if they are right. I will share my experience and code of a front-running bot (running on yours.org) that does this semi-automatically.

Remember this picture:

In the votes section, you can see how the voting system works. The last person to vote pays 25 cents and they are distributed among the previous voters. Here, the previous voter earns 23.9 cents, the one before 22.8, etc. In this distribution, the first quarter always makes money (sometimes more than first quarter, if someone votes more than once). So here, there are 24 voters, so the first 6 will always make money. The first vote is “free” and it is given to the author of the article.

What is front-running?

The term originates from the era when stock market trades were executed via paper carried by hand between trading desks. The routine business of hand-carrying client orders between desks would normally proceed at a walking pace, but a broker could literally run in front of the walking traffic to reach the desk and execute his own personal account order immediately before a large client order.

Front-running normally means using or even abusing an information that is not public, but has since been used more widely.

This topic is especially important in blockchain based systems. Imagine there is something as a “market order” executed on the decentralised exchange settled by smart contracts. “Market order” means “I would like to by X amount of an asset Y, whatever the price might be”. Now imagine you see this order in the mempool, before it is mined into a blockchain. Yes, you guessed correctly, free money. You put a limit buy order and a limit sell order, pay higher fee to be included in the blockchain before the poor guy’s market order and you made a profit. If you are a miner, you can do other things, you can reorder transactions however you like, so in the case you understand the underlying smart contracts and transactions, you are in for an additional treat.

To be honest, most current blockchain applications try to combat front-running. ENS (Ethereum Name System) does blind auctions. Most DEXes only support limit orders, not market orders.

Investing into content – is it front-running?

So am I doing front-running? Not in a sense that I know something that others don’t – I don’t. What I do is I guess what articles are successful and I put my vote as soon as the article is out and noticed by humans. And there’s someone that is more capable in doing that than me – a machine. So if I wanted to bet that a drawing by Satoshi Doodles is going to be successful, I’d rather be among the first in the row – because the first quarter makes money.

I am not front-running on any information that is known only to me – everyone loves Satoshi Doodles. But so do people like the writings of Craig S. Wright, which honestly half of the time don’t even make any semantic sense, he usually writes like a high school essayist, trying to convey a “controversial” idea by touching on things that the reader would not understand, because they miss the context. I don’t know why, but Craig S. Wright gets upvotes too and I invest in his articles, because I want to make money, not because I like them (contrary to Satoshi Doodles, which I like).

So picking the right authors is not about picking what I think is good, but what other people might consider good content (a Schelling point). It is a form of popularity contest, where you are rewarded more if you conform with the masses among the first. I am front-running the mass opinion. In this sense, it is contrary to front-running, because I am extrapolating on publicly known information, not using unknown information.

What are the technicalities?

The way yours.org works is that they do Bitcoin Cash SV transactions on-chain for every vote. So if I click on vote and pay 25 cents, these 25 cents are sent on-chain to all the previous voters. I used to make fun of people who were complaining that I pay on-chain for coffee in Bitcoin Coffee (part of Paralelná Polis). I would show them some of the 20KB transactions distributing fractions of a cent on-chain for an article vote. It would always make them crazy.

In order to do the vote, I have to interact with the platform directly. It contains BSV JavaScript wallet that distributes the funds and also receives profits from tips, upvotes and other ways to make money on the platform. So I decided the best course of action would be to use a headless scriptable browser that would make it easy for me to interact with the platform without needing to do any transaction signing, etc.

I picked puppeteer, mainly because it is developed by Google Chrome team and it is fully scriptable Chrome browser. I guess yours would always work in Chrome, so that would make it a nice long-term solution. That also means that unless the platform is significantly changed on the outside, it would follow all the upgrades of the backend. I didn’t need to change a single line of code after the fork from Bitcoin Cash to BSV. I was merely clicking buttons, I only had to get some BSV tokens, which I didn’t have, because I got rid of all BSV tokens after the fork (which turned out to be a great decision, paid for a coffee or two).

I wanted to discover the best strategy, but what was important is that I didn’t want to be a jerk to the operators of yours. I implemented very sane delays in order not to put unnecessary load on the server infrastructure of yours. Also, I realized that a lot of the work is done by the client in JavaScript. What I also realized is the fact that if a user votes more than once, he is at a disadvantage, because previous votes don’t get a cut from the 25 cents. This is simply not a good solution and I created two more accounts on the platform which the bots also use, but not in parallel.

This is not a high frequency game, there are people voting and they are slow. Also, I don’t really need to be first, I need more to be under the radar, so the operators don’t implement some CAPTCHAs (which are BTW very easy to go around these days – AI has become better than us in CAPTCHAs and you can buy services to go around them).

Next was picking of the authors. I went through the front page and found people who were consistently upvoted. I won’t share my list, but if you are on yours for a while, these are the usual suspects. A development update here, some news from the crypto world there, good commentators and even some crazy people that are building a following. After the fork, the platform had a reduction in users and I realised that I am deciding the content on the front page. It cost me two dollars (that’s the investment budget that I put in after the BSV fork). Most of the budget is returned to my other accounts. Why? If an author writes an article and my three puppet users vote on this article, there are four voters (the author gets the first vote). The cost of first user is 25 cents (it all goes to the author), the second user pays me back 12.5 (through the first account) and the third user pays a bit to both. So while it’s true that I pay 75 cents, I get immediate refund of around 30 cents. Then every user that votes (maybe because they find the article on the homepage – this is usually enough to get a user on a homepage) pays me back.

Was it worth it?

Did I earn the cost of my time back? No, I haven’t. Being an entrepreneur, this is a very low return strategy for me. The fact is that I love programming, so I enjoyed the time invested in thinking about this and actually making it happen. And if there are content networks that implement market principles, I wanted to be among the first that make use of these markets and I wanted to make them more efficient at discovering content. There’s an interesting positive feedback loop – what is popular is what I make popular. And I make popular what would probably be popular. Positive feedback loops can be used in many areas of life.

I didn’t make money on all posts – not by far. But before the fork, it paid for one or two sushi dinners per month. Thankfully, there was a portal that allowed me to order sushi paying with BCH that I made directly using Bitpay – I bet those were the largest (in kilobytes) transactions they’ve ever seen.

I also wanted to play with direct on-chain applications and I decided to combine it with a small dopamine injection, so I wrote a program that would withdraw the money I made once a week to my wallet. It happened on Sunday and it was my small celebration, although it did not happen every week, some weeks, my investments lost money. I didn’t redo this script for BSV, but I guess it could now be used on honest.cash which uses BCH ABC.

Conclusion

Some comments on the first article was about what is the best coin, how shitty is BCH ABC / SV, or “insert-my-coin” is the best. I don’t care, that was not the point, the point was that there is a way to reward content creators and people who discover content, that cryptocurrencies make a great part of this infrastructure (otherwise authors from crazy dictatorships like Venezuela would not be able to receive any money – and they can really make a living out of writing high quality content).

I really like yours.org as an experiment in this regard. There are several problems with the approach of yours – by making it easy for someone to promote their own articles (opening several accounts and upvoting is basically free – there are only some small fees and one could be on the homepage for a long time). The difference between several votes on one article by one user and more users does not make too much sense (anyone can create more than one account). Other than that, I have certainly learnt a lot about how these markets could operate and what emerges when you create a market structure based on content.

I wish yours.org, honest.cash and other such platforms all the best and I hope we have not seen last of those.

The code

You can find the code on my github. Please note that this is an unsupported software and it might stop working at any time with any change on the side of yours.org. Also, it is probably my first JavaScript outside of basic HTML, so it is not pretty.

Before you go

If you like my writing, please note that I am currently working on a book called Financial Surveillance and Crypto Utopias, where I explain what happened to banking secrecy, how the current payment networks are regulated and how crypto can solve these problems, thus creating the unique value proposition for cryptocurrencies. Other peoples’ mistakes are the best value proposition for competing projects and this is the case for old-school financial sector vs cryptocurrencies. Read more about the project and sign up for updates and releases here.

Leave a comment

Your email address will not be published. Required fields are marked *

You can encrypt your comment so that only juraj can read it.