Decentralized Social Media

Photo by fabio on Unsplash

Decentralized Social Media

The Lens Protocol

Why Decentralized Social Media?

It is said that "Necessity is the mother of all inventions". This does hold for the lens as well. We have seen many applications of decentralization, be it in gaming or finance, but when it comes to social media, we are hardly using any decentralized one. Do we need one? Yes. Seeing all the social media in chaos, getting victims of social media's algorithms, being the 'product' for social media's advertising businesses. Decentralized social media has become a need for the generation. To own our data and not let other giants own our data and sell it has become necessary.

In social media, we can see the circulation of the same arts, content and memes without ever knowing the creator of the content. In this scenario, many people fake being someone else and take credit for someone else's work. And this all happens without the original creator's information. And there is no tool to verify an actual creator unless the creator claim. These are a few of the many issues we can tackle by having decentralized social media.

How to build decentralized social media?

Web3 is a new evolving space, and it's still on the runway. There are many issues, yet to be solved. But, wei by wei we are moving towards betterment. Lens protocol is the one which comes to our rescue when we wish to develop a decentralized app.

The Lens Protocol

The Lens Protocol is a user-owned Web3 social graph on the Polygon Proof-of-Stake blockchain. In web2 social media, we can't use Facebook profiles to post on Twitter or vice versa. But, by building an application over the top of lens protocol, this wouldn't be an issue. We own the data; hence, we can bring it to any application built over lens protocol.

We can improve users' experiences by adding meaningful features in the app since we are not competing for the user's attention or building any algorithm to have the advantage over a particular group of people.

We will no longer fear abandonment by the social media owner or losing our data or getting our account hacked and being used by someone else.

Architecture of Lens Protocol

Profile Owners can:

  • Publish content
    1. Post
    2. Comment
    3. Mirror (Share)
  • Set the profile's 'follow module.'
    1. The logic to be attempted when someone tries to follow the owner
  • Set the profile's image URI
  • Set the profile dispatcher which can act on behalf the owner

    When we make any transaction on the blockchain, the wallet popups, it's good when we transact coins or tokens. But, when we use the 'follow' or 'comment' feature, we use the optimistic approach because we don't want validators to validate the data. In this case we add the dispatcher address, which will sign the transaction.

Regular Wallets can:

  • Follow profiles
  • Collect Publication

New features and fixes can be added.

The Lens protocol uses the ERC721 format for all the NFTs.

Type of Modules in Lens

Modularity is the main power of the Lens Protocol, it can be expanded in for many use cases without any restrictions. Modules allow the profile owners to include unique functionalities.

  1. Follow Module This module contains the logic to be executed when a user tries to follow a profile.

  2. Collect Module This module contains the logic to be executed when a user tries to collect the given publication or post.

  3. Reference Module This module contains logic to be executed when a user tries to comment on or mirror(share) any given post.

Tech and Tools behind Lens

Lens uses GraphQL to query the APIs as it saves time while fetching data with its strongly-types schema. In social networks, you want data to be ready as soon as it is mined, so when it comes to social networks, we can't compromise with speed. For that purpose, Lens uses its win indexer and the Postgres database. The data structured in a relational manner allow the transactions to be fast and scale well.

Dispatcher concept has been used to keep the transactions gasless. And others on the Polygon network, which is fast.

Features and Functionalities

The lens protocol is just not limited to letting add, post or comment or share. But, it also has the functions to add reactions, revenues, feeds sorting and filtering, and reporting a malicious user or content.

References: