Title: “The Emergence of Decentralized Social Networks”
Author: Lorenzo Sicilia, Engineering Lead at Outlier Ventures
Translation: Chris, Techub News
Decentralized social networks (DeSo) are gradually capturing the attention of real users, with platforms like Farcaster and Lens Protocol showcasing their potential in the market. As encryption technology matures, it becomes more practical and efficient, gradually overcoming the obstacles of private key management and user experience, which are crucial factors hindering widespread adoption.
In this article, we will delve into several major decentralized social media platforms, analyze their features and architectures, and explore the opportunities for Web3 founders in building new permissionless social graph protocols.
Social Networks
Traditional centralized social networks like Instagram, Facebook, and Twitter are built around user demand, providing personalized information streams. These platforms have built massive user databases and transformed user data into commodities to attract sustained user engagement.
In contrast, decentralized social networks aim to break free from these limitations by offering identity portability and enhanced privacy controls, simplifying the transition for users between different platforms and truly empowering users.
DeSo platforms, like cryptocurrencies, provide anyone in the world with permissionless transaction opportunities, as well as uncensorable communication and broadcasting capabilities. This model not only attracts users but also offers developers the freedom to innovate on existing protocols without traditional gatekeepers’ permission, similar to the “Lego” effect in the DeFi space.
Before the rise of DeSo in Web3, Mastodon was one of the few platforms that attempted decentralized social networking. Although it briefly benefited from Elon Musk’s acquisition of Twitter, Mastodon’s growth eventually stagnated due to fragmentation issues in availability and user experience, with only 1 million daily active users.
Today, Farcaster, Lens, and other projects are trying a different approach based on Web3, bringing something new to the table.
SocialFi
SocialFi is a decentralized financial model that integrates Web3 elements into the social network graph. In this ecosystem, participants such as content creators, influencers, and regular users expect better control over their data and freedom of speech, leveraging their social media influence and user stickiness to earn income.
In SocialFi, monetization is primarily based on cryptocurrencies, while user identity is managed through a series of private keys. These participants can also resist censorship through decentralized autonomous organizations (DAOs), although the effectiveness of this mechanism is still being explored.
Several key differences between SocialFi and traditional social networks include:
Token-gated areas: Only users holding specific creator tokens can access certain features or content areas.
Tips: Users can directly tip creators with cryptocurrencies, either native platform tokens or other types of tokens.
Subscription model: Users can purchase one-time or recurring subscriptions with cryptocurrencies to access digital goods or services.
Platform incentives: Users and creators can earn platform tokens as incentives based on their participation level.
The early success of these innovative implementations can be seen in Friend Tech’s efforts, which explored using so-called “key” tokens to access token-gated chat areas. These tokens not only tradeable but also allow users to benefit from the popularity of content creators.
Despite having 800,000 unique user addresses during its peak in the market, friend.tech experienced a significant drop in user retention, highlighting the challenges and limitations faced by this model.
Web3 Social Graph
Social graphs represent relationships between entities such as people, organizations, places, and anything that can be interconnected. Web2 entities like Facebook, Twitter, Instagram, and TikTok have already accumulated significant network effects, especially in preventing users from joining other social networks as switching networks means starting from scratch.
Lens, Farcaster, and other projects differentiate themselves by developing truly open graphs with multiple frontends, offering different user experiences while using the same data.
However, Facebook generates 4PB of data every day. It has 510,000 comments posted per minute, 293,000 status updates per minute, 4 million likes, and 136,000 photos uploaded. Currently, no existing blockchain can handle such large amounts of data, and it may never be able to as blockchain optimizations target different use cases: permissionless value exchange.
For example, double-spending is a typical blockchain financial risk that is irrelevant in decentralized social networks that handle usernames, content distribution, and notifications. The Lens and Farcaster teams need to consider different assumptions in the trade-offs.
Lens Protocol
The Lens Protocol is an innovative composable social graph developed by Stani Kulechov, the founder of Aave. It currently runs on the Polygon blockchain. This protocol is community-centered and designed to be fully community-driven and managed.
The architecture of the Lens Protocol is mainly based on several key smart contracts that collectively handle various aspects of the social network:
Profiles: In the Lens Protocol, a user’s profile is represented by NFTs. Users who own a Profile NFT control their social graph and the content they publish. A Profile includes the entire history of a user’s posts, quotes, mirrors, comments, and other user-generated content.
Publications: These represent the content elements in the protocol and are divided into four types: Posts, Comments, Quotes, and Mirrors. Posts are the basic content units, and the other three are extensions of Posts. Each publication is associated with a ContentURI that points to content stored on decentralized storage solutions like IPFS, Arweave, or AWS S3, including images and text.
Interactions: Mirrors, Comments, and Quotes enable user interactions, such as commenting, quoting, or sharing content. These interactions follow certain rules, for example, only followers can quote, comment, or mirror.
Open Actions: These are designed for developers and provide a way to build custom functionalities directly embeddable into the protocol. They can be seen as hooks triggered by the protocol, for example, automatically triggering an indexer to track earnings when Alice receives a tip from Bob.
The design of the Lens Protocol aims to increase the transparency and user control of social networks while providing developers with flexibility to innovate on existing protocols without the permission of centralized institutions.
From the beginning, the Lens team focused on the protocol itself and let the community take charge of frontend development, resulting in many different UIs, each with its own style.
This approach has created a vibrant ecosystem, albeit with some chaos, and many projects disappeared shortly after their initial launch. However, we are gradually seeing some consolidation, with projects like buttrfly, hey.xyz, and orb gaining attention.
After running Lens v1 for some time, Lens introduced Momoka, an Optimistic L3 that goes beyond the blockchain space. Instead of storing data directly on Polygon, they leverage a Data Availability (DA) layer, reducing costs by only uploading data to Arweave.
Farcaster
Farcaster is another Web3 social network built on Ethereum that utilizes on-chain smart contracts and a peer-to-peer network matrix based on the “Hub” client.
Similar to Lens, Farcaster is open and has given rise to various client applications, with Warpcast being the most popular developed by the Farcaster team, along with Supercast (with paid features) and Yup (focused on cross-posting).
In 2022, Varun Srinivasan published a blog post on “fully decentralized” ideas, which has since been at the core of Farcaster’s architecture and approach.
The main idea is that if “two users can find each other and communicate across other barriers on a network, then the social network is decentralized enough.”
To achieve this, the following are needed:
Unique usernames
Ability to publish messages under those usernames
Ability to read messages from any valid name
Farcaster achieves its architecture by deploying a set of core smart contracts on Optimism:
IdRegistry creates new accounts and allows users to transfer and recover Farcaster accounts. It also integrates with ENS to enable legitimate owners to obtain usernames.
Storage Registry leases storage to accounts. The storage price is denominated in USD and converted to ETH using an Oracle. The price is variable based on supply and demand.
Key Registry allows accounts to publish app keys, enabling them to post messages on behalf of the keys.
As you can see, none of the above smart contracts send or receive messages; this responsibility is delegated to Hubs. Hubs form a distributed network consisting of Hubble instances, with Hubble being a node built using TypeScript and Rust.
Each node is responsible for validating, storing, and replicating messages, as well as assessing their peer nodes.
Validation is done by verifying the valid signature of a user account key for a given message.
Once a message is validated, it is stored in the hub asynchronously using a Conflict-Free Replicated Data Type (CRRDT) approach.
Replication is achieved through diff sync and a gossip protocol based on the popular libp2p code library. Diff sync is performed regularly by selecting a random node to compare Merkle trie hashes of messages and find any missing ones.
Hubs have a strong eventually consistent architecture, as they can rebuild their state using their peer nodes even if they go offline.
Peer nodes are crucial for maintaining the protocol’s state, so they evaluate each other. If a node doesn’t accept valid messages, falls behind, or gossips too much, it may be ignored.
Permissionless
From these protocols and principles, we see new primitives emerging. One of them, Farcaster’s Frame, has gained significant attention.
Frame enables injecting custom experiences into the Farcaster information stream. It extends the Open Graph standard and turns static images into interactive experiences by adding up to four buttons. When users press a button, they receive a new image based on button clicks and user metadata sent to Frame’s generation server.
On top of this, we are starting to see many experiments, such as creating pools, digital collectibles, and games deployed through these Frames.
Any application server capable of returning HTML content can create Frames, but we have seen a significant number of Frames, such as https://framesjs.org/, https://frog.fm/, and others that help developers streamline the process.
Frames have been successfully released on Farcaster, and Lens is now considering similar considerations, indicating that having common standards can be a powerful driving force.
Conclusion
Decentralized social networks still face significant challenges before achieving full success, such as scaling their infrastructure to accommodate more users, streamlining the process of creating digital wallets for new users, and minimizing gas fees as much as possible.
Despite these challenges, Farcaster has made substantial progress in user experience and has formed a community with high stickiness around the platform. For example, Farcaster has around 50,000 daily active users and 350,000 registered users. One contributing factor to these achievements is the user-friendliness of its mobile app, making installation easy and providing a user experience similar to traditional social networks.
Another key factor is the permissionless nature of protocols like Farcaster and Lens, which offer developers rich possibilities for innovation and building on existing blocks and features without the permission of centralized institutions.
We are witnessing a dynamic experimental environment similar to the DeFi summer, with explorations based on emerging protocols, including yup.io (a decentralized social network aggregator), drakula.app (a short video platform), and neynar.com (a SaaS tool based on Farcaster).
Founders can now start building native Web3 distribution channels for their projects, allowing users to start their journey from the points they initially find interesting and potentially expand to other applications embedded directly in their information flow or linked applications. At the same time, applications that attract new users can serve as distribution channels to guide users back to the rest of the decentralized social network, forming a positive feedback loop.