How not to architect a social network on its way to the proverbial moon

Whether BitClout is a nightmare, a scam, the future of social media, or all three is up for fierce debate on newsfeeds everywhere — but one place there’s little socializing happening is BitClout itself, because the first 24 hours of public availability has brought the site to its knees. Frustrated with the sluggishness, I ctrl-shift-I‘d into my browser’s developer tools and spied a couple of disastrous design choices that is hammering the centralized gateway with unnecessary data lookups.

I have no idea who Davidsun is, but since I didn’t use the $5 they start you with to drive the price of my own coin up, I looked like a good deal.

Now, BitClout’s core functionality is essentially Twitter (and indeed their primary attraction is the 15,000 most popular twitter identities that they have copy-pasted and started selling shares of whether the account owner knows about it or not). You follow people, people follow you, you post, you comment on others’ posts. So to read any timeline, your browser must make a request to pull these posts and comments, plus some metadata and a link to the profile pic. So, peeking into my network traffic, I thought it was bad enough that the user’s profile pic was base64 encoded string 3kB in length — embedding binary data into a JSON response prevents any cache mechanism from taking it off your hands, not to mention that gzipping these bytes has little effect.

ProfilesFound[“0”][“ProfilePic”] was the first large data blob that caught my eye

But that’s not the half of it even one percent of it. Expanding the Posts array of length 8 shows that the exact same 3kB base64 profile pic is a property of each comment, needlessly exploding the size of the response. What’s more, running ctrl-f to find all occurrences of ProfilePic returned 244 results – where are all these hiding? Ah, let’s peek in this 267 Length Array called UsersThatHODL: each of these elements also includes a ProfileEntryResponse object — these are the profile pics of every user who has bought a share of this identity.

Hopefully this would be a quick fix, as user uploaded photos are already pushed to imgur.com and cached — so it was perhaps a simple oversight that profile photos got base64ified and stuck in a database. By performing a search and replace on the base64 strings and replacing the 3,000+ character binary data with 56 bit unique id (14 hex characters) to use as a URI, the zipped size of this payload that occurs on every timeline is minimized by over 90%. At this moment not everyone has 240+ “shareholders” for lack of a better term (cloutchasers?), but I expect they will quickly outgrow their current strategy.

Response Text1,085 KB
Response Zipped534 KB
Response without ProfilePic228 KB
Response w/o ProfilePic Zipped39 KB

I’ll clarify here that I don’t think serving 1MB of text every page load is the bottleneck — but the fact that 1MB of text must be serialized out of the database with each request. Depending on their choice of server (which, by the way, their tech stack is not yet disclosed, they don’t even say what kind of blockchain they use besides Proof of Work), only so many requests may be handled concurrently. In a worst-case-scenario, their server may have to finish up one connection before moving on to the next (as opposed to answering requests in parallel), as is the case with a basic Apache server, but I’m sure they have something more advanced than that, right? 🦗🦗🦗

UPDATE: apparently a ‘minor bug’ brought down the whole network in a recursive reboot of death, as you can see in the rather embarrassing error message below. Reverted transactions? Full refunds? What kind of blockchain are these folks running here?

As for how BitClout got to this point, from what I can tell, this utopia/dystopia of a reputation marketplace was secretly booted into existence in mid Jan (see the blockchain explorer for the null hash), where coins have been pre-mined to distribute to the various Venture Capitalists whose involvement was only announced yesterday. Over that time span, it seems that instead of an invite-only system like Facebook and Clubhouse had utilized, a simple password was passed around allowing friends of friends to register (my only source here is Clubhouse chatter). Whether yesterday’s public launch was scheduled is unclear — but the password was leaked to reddit a few days ago so perhaps the administrators decided the crypto-cat was out of the bag and opened the site for all.

I’ll withhold my ethical and economic concerns until I have some more experience on the platform, but so far the community is welcoming, full of positivity and futurist (if accelerationist) optimism with a bias for boosting small creators: there’s not much to be gained in buying shares of Kanye West; maybe you double your money, maybe it cuts in half. If you’re here for gains, you want to identify the creators that are going to climb their way through exponential growth, from $1 to $10,000. In this way, the platform encourages money-flow from the rich (seeking an inflation-busting asset) to the masses of content-creators currently competing for ad-industry crumbs.

One last point: the screenshots above are errors I received today browsing BitClout. I uploaded them to OpenSea.io intending to mint them as NFT, but the transaction fee to do so is currently 160 USD, not including fees paid by the buyer. Besides, I don’t feel great about burning a month’s worth of electricity to list these screenshots on a marketplace. I think BitClout is going to have a much lower barrier to entry for getting money in your pocket as an artist, as soon as they provide some means of withdrawing funds and trading tokens on the crypto-marketplaces at large — check out their “one-pager” overview for more info on what future the BitCloutians have in mind.