From a technical perspective, how do mainstream Web3 social platforms innovate?
Written by: 1kx
Compiled by: Luffy, Foresight News
Driven by commercial motives, corporate-controlled social media platforms have emerged and greatly undermined the initial hopes for a culture of online participation. Network information technology was supposed to fundamentally democratize cultural production, but today, these profit-driven platforms limit and shape online behavior—"likes" are not expressions of gratitude for content, but rather a commercial tool.
Alternative social media platforms built on decentralized technologies and federated protocols recreate the original vision of online social interaction. Data is controlled by users and recorded in decentralized databases, the front end is community-driven, moderation is an expression of community preferences, and algorithms are chosen by users. This is an innovation driven by the spirit of open source.
The History of Decentralized and Alternative Social Media
Before the internet became the center of commerce, entertainment, and social interaction, it was primarily a tool for academic and military domains. Tim Berners-Lee held an egalitarian vision when formulating the first web protocols: the original design of the internet was a decentralized network where information could flow freely between nodes, with no individual able to control it and no single point of failure.
However, with the commercialization of the internet, centralized platforms like search engines and social media giants became dominant. While these entities provide immense value, they have strayed from the original spirit of decentralization, leading to our current Web2 environment.
A key innovation in the development of alternative social networks is the emergence of federated protocols. A federated network refers to a system composed of multiple independent servers or "nodes" that collaborate to form a social network, as opposed to a centralized platform where one organization controls all servers.
In a federated network system, each server runs software that adheres to shared protocols, allowing them to communicate with each other. Users registered on one server can seamlessly follow users on other servers, interact with users on other servers, and share content as if they were on the same platform. Examples of federated protocols include ActivityPub and OStatus, which support federated platforms like Mastodon and PeerTube.
In a federated system, users can choose servers they trust, and they may migrate to different servers or set up their own servers, granting them more autonomy. The term "Fediverse" (a portmanteau of "federation" and "universe") is used to describe such systems. The Fediverse originated with the GNU Social platform and its predecessors (Statusnet and Laconica), but the real turning point was the development and widespread adoption of the ActivityPub protocol, which was published as a W3C recommendation in 2018.
In Web3, once data is migrated to the chain, federated social networks become the default state of decentralized systems. The blockchain acts as the backend server for storing content, while the front end indexes this content and delivers it directly to users. Identities are tied to public and private key pairs that manage user wallets, allowing users to easily verify any data or content they generate. Additionally, on-chain primitives like NFTs can bundle stored content with metadata and serve as domain names or decentralized identities (DIDs).
Similar to how ActivityPub works, Web3 protocols seek to guide social graphs through authenticated relationships between user nodes. Since any front end can index and provide this content, there is fierce competition at the front end layer, and new features flourish. Moreover, since data is stored on-chain, users can choose their preferred algorithms and can be incentivized to regain value from their data using certain algorithms. This, combined with more direct means of content monetization, provides a better overall experience for creators who have largely been excluded from monetization, even though their content drives demand for these platforms.
Protocol Comparison
To truly understand the innovations of decentralized social media protocols, it is necessary to grasp the technologies that enable them. Notably, we do not include all social protocols here, but rather select some of the most popular social protocols:
Identity / Namespace
In federated and decentralized social graphs or network protocols, "namespace" refers to the unique domain of user identifiers or other resources. It is a method of distinguishing one domain/server from another, ensuring that there are no conflicts or ambiguities when integrating or communicating across multiple domains.
The identity and associated namespaces of different decentralized social protocols range from simple key pairs (Nostr, Scuttlebutt) to URIs pointing to hosted profiles (ActivityPub), to more complex models using on-chain primitives like NFTs (and recent ERC-6551 extensions, such as Lens V2).
Farcaster is a good example of these technologies. A Farcaster account represents a unique entity on the network. Each account has a unique digital identifier called a Farcaster ID (fid). Identities are managed on-chain using an Ethereum contract called IdRegistry, where users initiate transactions to IdRegistry to obtain a new fid. The address that holds the fid is the user's management address. IdRegistry ensures that fids can be transferred between addresses and that no two addresses have the same fid. Farcaster also extends this namespace to support on-chain or off-chain published ENS domain names. Users must submit signed proof to the network to claim a username.
On the other hand, ActivityPub identifies each user through a unique URI (usually an HTTPS URL). This URI points to the user's profile and serves as their global identifier in the Fediverse. To make these URIs more user-friendly, many ActivityPub platforms use a system called Webfinger. Webfinger allows users to have identity identifiers like "@username@domain.com".
Lens and CyberConnect manage user profiles as NFTs. For example, in Lens, a user address holds a Profile NFT, and a single address can hold multiple Profile NFTs. Each Profile NFT encapsulates the entire history of user activity. Additionally, Profile NFTs have a FollowModule, which is essentially a set of rules for managing how different accounts acquire Follow NFTs. These Follow NFTs are directly recorded on-chain, establishing the connection between accounts and profiles. Some handles can be created separately from profiles and can link to or unlink from another profile. Handles exist in their own namespace (e.g., lens/@alice).
Data
Data can be said to be the most important feature of decentralized networks, as the creation and standardization of data form the foundation of these systems. The most common technology for managing data here is the use of standardized formats, such as JSON and common relational objects (e.g., likes, follows). Core data objects typically include:
- Subject & Object: Defined "subject" (e.g., user) and "object" (e.g., post or message).
- Publication: Posts or comments are encapsulated as "publications," often linked to external content via URLs.
- Append-only log content: Each entry (whether a post or update) is a log of discrete content items added and stored in sequence.
Let’s delve into a few examples to understand how specific protocols operate.
ActivityPub utilizes the ActivityStreams 2.0 data format (a JSON-based data structure) to represent various social interactions, such as posts or likes. The protocol includes two main components: client-to-server (C2S) and server-to-server (S2S). C2S allows users to interact with their respective servers through client applications. In contrast, S2S facilitates communication between servers, enabling the protocol's robust federated features.
In ActivityPub, entities are classified as "subjects" (typically user accounts or groups) and "objects" (content or actions, such as posts or likes). When a subject performs an action on an object, it creates an "activity" object, such as "create," "follow," or "like."
The Web3 social graph borrows many core ideas from ActivityPub but applies them to the blockchain. For example, Lens Protocol introduces "publications," which encapsulate various user-generated content, such as posts, mirrors, comments, and other forms of media. Each publication is associated with a ContentURI that points to specific content stored on decentralized protocols (like IPFS or Arweave) or centralized storage services (like AWS S3). This design ensures that users' profiles and all related publications are securely stored in their personal wallets, eliminating reliance on centralized databases.
Moreover, compared to Web2 architecture, Web3 offers a more direct way to monetize user content and influence. Users can charge for the minting of Follow NFTs or integrate Collect Modules with their publications. The latter option allows them to charge minting fees for NFTs linked to the ContentURI of their publications. In addition to these features, Lens Protocol provides a GraphQL API to abstract blockchain components from the front-end interface, offering a more user-friendly experience than previous decentralized social networks.
Ultimately, many decentralized social network protocols create append-only data structures and authenticate them through user keys. For instance, on CyberConnect, every user-centric piece of data is represented as a data stream, where only the data owner is allowed to update it. Each update to the data is appended to the data stream in the form of an append-only commit log, and the generated data structure becomes a hash-linked data structure known as a Merkle DAG. Data types include content, collections, comments, and subscriptions.
Scuttlebutt also employs an append-only log data structure. Each user has their own log, where each new message or action is appended after being signed by the user's identity. It also supports sharing binary data known as "blobs." These can be images, videos, or any other binary content. Blobs are stored separately from the append-only log, but references (hashes) to these blobs can be included in the log.
For Farcaster, messages are public updates, such as posting, following, or adding profile pictures, which are encoded as protobuf and must be hashed and signed by the account signer. Users can publish messages to the Hub as long as there is enough storage space. The Hub checks the validity of the signer before accepting each message.
Storage
Early decentralized protocols primarily stored data off-chain. For example, Scuttlebutt uses a peer-to-peer gossip network to store data on users' local devices. This approach ensures data sovereignty, as users have complete control over their information. However, it also means that data availability depends on whether users' devices are online or if other nodes in the network have copies of the data. Over time, to manage storage space, some Scuttlebutt clients may need to implement garbage collection strategies to remove old or less relevant data.
An alternative to this peer-to-peer approach is the emergence of data storage servers. For instance, in Matrix, multiple home servers store copies of room histories and synchronize with each other. When a user sends a message (or any event) in a room, their home server broadcasts that event to other home servers, which then store the event and forward it to their connected clients. Similarly, ActivityPub allows each instance (or server) in the network to store its data, typically stored in a database. The choice of database (relational, NoSQL, etc.) depends on the specific implementation of the ActivityPub software. For example, the popular ActivityPub platform Mastodon uses a PostgreSQL database.
Protocols like CyberConnect, Farcaster, and Lens have adopted blockchain for storage. On-chain storage ensures data immutability and verifiability, providing a solid foundation for decentralized applications that synchronize state using underlying consensus mechanisms. However, this approach may pose scalability challenges, as every piece of data needs to be stored on-chain, potentially leading to high transaction costs and slower retrieval times.
This has led many Web3 social protocols to attempt hybrid approaches, using on-chain storage for low-frequency operations (like profiles and subscriptions) while employing off-chain storage for high-frequency events (like likes, shares, comments) or using off-chain storage as a temporary measure to batch upload data to the chain at certain intervals.
CyberConnect employs a hash-linked list in decentralized data storage to effectively handle frequent updates between user connections. When a connection is initiated, an "operation log" is created. Subsequent state changes (like toggling between following and unfollowing) are added as new nodes to this log. While these updates are initially stored on centralized servers, they are periodically batch-uploaded to decentralized storage platforms like Arweave or IPFS. To enable quick data retrieval, nodes in the operation log are centrally stored. However, users can independently verify data integrity by browsing this hash-linked list. Even if some data queries rely on centralized servers, CyberConnect's system is designed to be fully decentralized while providing high performance.
Farcaster uses a similar hybrid approach: on-chain contracts are used for low-frequency operations that are important for consistency and decentralization. Accounts, usernames, storage, and keys are managed using a series of Ethereum contracts. Off-chain systems are used for high-frequency operations that depend on performance. Messages created by user accounts are stored and propagated on the peer-to-peer network of the Farcaster hub.
Discussion
Decentralized social protocols have the potential to revolutionize user experiences in digital interactions. Driven by Web3, the accelerated adoption of public and private key pairs will help broaden the understanding of identity primitives in this context, and the ongoing moderation and data capture by Web2 social media companies will push more users to seek alternatives. We anticipate that the adoption curve for these decentralized social protocols will accelerate.
To foster the development of innovative applications, protocol developers and open-source contributors urgently need to go beyond the basic data types and relational objects currently used in the infrastructure layer. While existing primitives adequately encompass the functionalities of traditional Web2 social media, there remains immense potential for expansion and innovation. Most of the protocols discussed here inherently support scalability within the system, providing a solid foundation for future development and open-source contributions.
However, interoperability is also crucial. While front-end developers can independently enhance functionality, doing so may undermine the overall benefit of the system if the enhanced features cannot interoperate with other applications built on the same underlying protocols. Ensuring compatibility and seamless integration between various applications is vital for the long-term success and adoption of decentralized social protocols.
In the realm of data storage, Web3 social protocols tend to favor hybrid approaches. Allocating high-value assets like identity and primary content to on-chain primitives while assigning lower-risk content like likes to off-chain solutions, this balanced approach not only preserves the integrity and security of critical data but also provides a user experience closer to traditional social media platforms.
Decentralized networks are poised to transform interpersonal communication, information sharing, and community building. By prioritizing user autonomy, privacy, and fostering organic relationships, these networks are paving the way for a more equitable and user-centric digital environment. Furthermore, the decentralized nature of these networks contributes to the democratization of access to information and resources, mitigating the risks associated with centralized control.