Title: “The Emergence of Decentralized Social Networks”
Written by: Lorenzo Sicilia, Engineering Lead at Outlier Ventures
Translated by: Chris, Techub News
Decentralized social networks (DeSo) are gradually gaining real user attention, with platforms like Farcaster and Lens Protocol demonstrating their potential in the market. As encryption technology matures, these networks are becoming more practical and efficient, overcoming the challenges of private key management and user experience, which are crucial factors inhibiting widespread adoption.
In this article, we will delve into several major decentralized social media platforms, analyzing their features and architectures, and explore the opportunities for Web3 founders to build new permissionless social graph protocols.
Social Networks
Traditional centralized social networks like Instagram, Facebook, and Twitter are built around user demands, offering personalized information feeds. These platforms have built massive user databases, turning user data into commodities to attract continuous user engagement.
In contrast, decentralized social networks aim to break free from these limitations by providing identity portability and enhanced privacy control, simplifying user transitions between different platforms and giving control back to the users.
DeSo platforms, like cryptocurrencies, offer permissionless transaction opportunities to anyone globally, as well as permissionless communication and uncensorable broadcasting capabilities. This model not only attracts users but also provides developers with the freedom to innovate on existing protocols without the need for traditional gatekeepers, 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 experienced a brief surge after Elon Musk’s acquisition of Twitter, Mastodon’s growth eventually stagnated due to issues of availability and fragmented user experience, with only 1 million daily active users.
Today, Farcaster, Lens, and other projects are trying a different approach built 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, while earning profits through the influence and user stickiness of their social media.
In SocialFi, monetization is primarily based on cryptocurrencies, and user identities are 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 platform-native tokens or other types of tokens.
Subscription models: Users can make one-time or recurring subscriptions using cryptocurrencies, purchasing digital goods or services.
Platform incentives: Users and creators can earn platform tokens as incentives based on their level of engagement.
The initial success of these innovative implementations can be seen in Friend Tech, which explored the use of “key” tokens to access chat areas with token gates. These tokens not only have tradability but also allow users to benefit from the popularity growth of content creators.
Although friend.tech had 800,000 unique user addresses during its peak in the market, its user retention rate later dropped significantly, revealing the challenges and limitations of this model.
While bonding curves excel in driving adoption through creating urgency and FOMO, they lack user retention in the long run. To truly maintain user stickiness, two key elements are needed: the formation of network effects that amplify platform value as more users join, and tangible long-term utility that provides benefits beyond short-term gains.
Web3 Social Graphs
Social graphs represent the relationships between entities such as people, organizations, locations, and any other interconnected entities. Web2 entities like Facebook, Twitter, Instagram, and TikTok have already accumulated significant network effects, especially in preventing users from joining other social networking sites as switching networks means starting from scratch.
Lens, Farcaster, and other projects are building differentiation from this point, developing true open graphs with multiple front-ends that provide different user experiences using the same data.
However, Facebook generates 4PB of data every day. It receives 510,000 comments per minute, updates 293,000 statuses, receives 4 million likes, and uploads 136,000 photos. Currently, no existing blockchain can handle such massive amounts of data, and it may never be able to because 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 should consider different assumptions under various trade-offs.
Lens Protocol
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-centric, aiming to be completely driven and managed by the community.
The architecture of the Lens Protocol is primarily based on several key smart contracts that collectively handle various aspects of the social network:
Profiles: In the Lens Protocol, users’ profiles are represented by NFTs. Users who own a Profile NFT have control over their social graph and the content they publish. A Profile contains the entire history of a user’s posts, quotes, mirrors, comments, and all other user-generated content.
Publications: These represent the content elements within the protocol, divided into four types: Posts, Comments, Quotes, and Mirrors. Posts are the basic content units, and the other three types are extensions of Posts. Each publication is associated with a ContentURI that points to the content stored on decentralized storage solutions like IPFS, Arweave, or AWS S3, including images and text.
Interactions: Mirrors, Comments, and Quotes allow users to interact by commenting, quoting, or sharing content. These interactions follow certain rules, such as only followers being able to quote, comment, or mirror.
Open Actions: Designed for developers, these provide a way to build custom functionalities directly embedded in the protocol. These can be seen as hooks triggered by the protocol, such as automatically triggering an indexer to track earnings when Alice receives a tip from Bob.
The design of the Lens Protocol aims to increase transparency and user control in social networks, while providing developers with flexibility to innovate on existing protocols without the need for centralized institutional permission.
From the start, the Lens team focused on the protocol itself and allowed the community to take responsibility for frontend development, resulting in the creation of many different UIs, each with its own style.
This approach has led to a vibrant ecosystem, albeit with chaotic scenes, as many projects quickly disappear within a few days. However, we are gradually seeing some projects gaining integration, such as buttrfly, hey.xyz, and orb, which have garnered some attention.
After running Lens v1 for a while, Lens introduced Momoka, an Optimistic L3 that goes beyond the blockchain space. Instead of directly storing data on Polygon, they leverage a Data Availability (DA) layer, reducing costs by uploading data to Arweave only.
Farcaster
Farcaster is another Web3 social network built on Ethereum, utilizing 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 clients, with Warpcast being the most popular, developed by the Farcaster team themselves, along with Supercast (with paid features) and Yup (focused on cross-posting).
In 2022, Varun Srinivasan published a blog post on “Fully Decentralized” with some ideas that have since been at the core of Farcaster’s architecture and approach.
The main idea is that if “two users on a social network can find each other and communicate across other barriers on the network,” then the social network is decentralized enough.
To achieve this, the following are required:
Unique usernames being obtainable
Messaging being possible under those usernames
Reading messages from any valid name
Farcaster achieves its architecture by deploying a set of core smart contracts on Optimism:
IdRegistry: Creates new accounts, allowing users to transfer and recover Farcaster accounts. It also integrates with ENS, making usernames accessible to legitimate owners.
Storage Registry: Rents storage to accounts. Storage prices are quoted in USD and converted to ETH using an oracle. Prices depend on supply and demand.
Key Registry: Allows accounts to publish app keys, enabling them to publish 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 the Hubs. Hubs are 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 evaluating their peer nodes.
Validation is done by verifying the valid signatures of account keys from a user and performing message-level validation.
Once a message is validated, it is stored in the hub using an asynchronous process that utilizes Conflict-Free Replicated Data Types (CRRDT). Replication is achieved through the use of diff sync and the gossip protocol based on the popular libp2p code library. The hub periodically selects a random node to perform diff sync, comparing Merkle tries of message hashes to find any missed messages.
The hub has a robust eventually consistent architecture, as it can reconstruct its state using its peer nodes even if it goes offline.
Peer nodes are crucial for maintaining the state of the protocol, so they evaluate each other. Nodes that do not accept valid information, lag behind, or gossip too much may be ignored.
Permissionless
From these protocols and principles, we see new primitives emerging. One notable example is Farcaster’s Frame, which has gained considerable attention.
Frame allows injecting custom experiences into the Farcaster information flow. It extends the Open Graph standard and turns static images into interactive experiences by adding up to four buttons. When users press the buttons, they receive a new image based on button clicks and user metadata sent to Frame generation servers.
Building on this, we are starting to see many experiments, such as creating pools, digital collectibles, and mini-games deployed through these Frames.
Any application server capable of returning HTML content can create Frames, but we have already seen many Frames like https://framesjs.org/, https://frog.fm/, and others that help developers simplify the process.
After the successful launch of Frames on Farcaster, Lens is now also considering a similar approach, indicating that having common standards can be a powerful driving force.
Conclusion
Decentralized social networks still face significant challenges before achieving complete success, such as scaling their infrastructure to accommodate more users, simplifying the process of new users creating digital wallets, and minimizing gas fees as much as possible.
Despite these challenges, Farcaster has made substantial progress in user experience and has formed a highly sticky community around its platform. For example, Farcaster has around 50,000 daily active users and 350,000 registered users. One important factor contributing 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 provide developers with rich possibilities to innovate and build on existing blocks and features.
We are witnessing a dynamic experimental environment similar to the DeFi summer, including yup.io (a decentralized social network aggregator), drakula.app (a short video platform), and neynar.com (a Farcaster-based SaaS tool). These are explorations based on emerging protocols.
Founders can now start building native Web3 distribution channels for their projects, allowing users to start their journeys from the points they initially find interesting and possibly expand to other applications embedded directly in their information flow or linked applications. Meanwhile, 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.