What is the Federal Universe? How can Web3 accelerate the development of decentralized social protocols?

share
What is the Federal Universe? How can Web3 accelerate the development of decentralized social protocols?

What is decentralized social networking? From early federated universe protocols like ActivityPub and OStatus, to last year's Nostr launch and this year's Lens Protocol v2, decentralized social networking protocols have been rapidly evolving. What are the differences between them? Well-known venture capital firm 1kx believes that social protocols based on Web3 technology may significantly enhance the user experience of decentralized social networking products due to the characteristics of blockchain technology.

This article is compiled and translated. For any doubts, please refer to the original text.

Development of Decentralized Social Products

Social software is an interesting example of how Web2 companies charge users for excess value. Driven by financial interests, whether it's Facebook, Twitter, or Snapchat, they earn huge profits by collecting more and more user data, but in turn, the value of users is relatively deprived, and the rest of the story is well known.

Evolution of Social Software

Therefore, many solutions have emerged to address this problem, from the federated universe to Web3 decentralized social community protocols, all striving to enhance user rights.

Introduction to the Federated Universe

Long before the term Web3 appeared, similar decentralized concepts were brewing in the federated universe fediverse. The federated universe is a decentralized alternative social media platform. Well-known federated universe applications include Mastodon, Misskey, PeerTube, which typically have the following features:

  • Data controlled by users and transmitted in a distributed database
  • Frontend maintained by the community
  • Content moderation based on community consensus
  • Algorithms chosen by users themselves
  • Open source

A federated network refers to a system where multiple independent servers or "nodes" collaborate to form a social network, rather than a centralized platform controlled by a single organization, which is similar to how blockchain operates today.

The emergence of federated universe products is attributed to the gradual maturity of federated protocols. In a federated system, each server must run the same federated protocols such as ActivityPub and OStatus to communicate with each other. Users registered on one server can seamlessly follow posts, interact, and share content on other servers, just like operating on the same platform.

Users can choose servers they trust, migrate community data to different servers according to preference and purpose, and even set up their own servers. Therefore, users of the federated universe typically have greater autonomy.

The above federated universe applications, such as Mastodon, can only operate on applications built on federated protocols. The concept is similar to web services built on top of HTTP or Gmail built on SMTP. The federated protocol is the foundation of social network operation.

The ActivityPub protocol has been more widely adopted by federated universe applications, becoming a W3C recommendation standard in 2018.

Decentralized Social Networks Built by Web3

In the web3 industry, the underlying design of blockchain and smart contracts is inherently designed to build decentralized protocols. Therefore, many protocols similar to ActivityPub have emerged, such as Lens Protocol or Farcaster. Decentralized social protocols built on blockchain typically have the following features:

  • Data recorded in decentralized systems, with blockchain serving as the backend server for storing content
  • User identities managed by the user's wallet, enabling easy verification of any content or action generated by the user
  • Chain assets such as NFTs can record the content to be stored in metadata, as well as serve as domain names or decentralized identities (DID)

Since any frontend can index and provide content, there is intense competition between frontend layers, promoting the vigorous development of functions. On the other hand, because the data is stored on the chain, users can choose frontends and algorithms, and consider what incentives are provided by the frontend page for a comprehensive evaluation, giving users control over the value of their data and content.

Comparison of Decentralized Social Protocols

From the federated universe to blockchain-based Web3 community protocols, what are the advantages and disadvantages of these decentralized social protocols? Why does the latter have the potential to enhance the user experience of decentralized social protocols? 1kx proposes some important comparative aspects to better understand the development of decentralized protocols, namely:

  • Identity and namespace
  • Data format and interaction
  • Data storage

The operating principles of Web3 protocols and ActivityPub protocols are similar, both constructing social graphs through relationships between users. However, due to the above three reasons, enhancing the user experience of decentralized social protocols may be possible, and with incentive models, the industry's development may be accelerated.

Identity and Namespace

Namespace is a common concept in programming languages, mainly used to distinguish the scope of a variable or class name to avoid compilation conflicts caused by identical names.

In federated and decentralized network protocols, namespace settings create uniqueness for user identities and identifiers. Currently, various decentralized social applications have multiple ways to create namespaces:

Key Pairs

Using Nostr released last year as an example, users create accounts directly through encryption, allowing for quick account creation and high security. However, similar to most current encrypted wallets, the drawback is that the address cannot be changed unless the wallet is replaced, leading to issues such as private key security concerns. Since all community records are tied to the private key, changing accounts can cause some degree of inconvenience.

URL

ActivityPub identifies users through a unique URI. This URI points to the user's profile and serves as a global identifier in the federated universe namespace. To enhance user experience, many social platforms based on the ActivityPub protocol typically use the Webfinger system, allowing users to have identifiers in a format like "@[email protected]", making it easier for users to understand.

NFT

Lens Protocol and CyberConnect manage user profiles using NFTs. In Lens' design, a user address can store multiple user profile NFTs, meaning one address can have multiple accounts and easy transfers. Each user profile NFT encapsulates a complete history of user activities, including posts, retweets, comments, and other types of content.

Lens User Profile NFT Records All User Actions and Data Source

In addition, Lens' personal profile NFT supports a special module - FollowModule, which manages fan acquisition rules to obtain Follow NFTs. Follow NFTs are used to directly record and maintain contact relationships with other users on the chain.

Aside from user profile NFTs, Lens also has a title mechanism that allows users to build community account names similar to Twitter's "@Alice". This is a separate namespace independent of user profile NFTs. Since titles are NFTs, they can be freely traded on the market.

Smart Contract Management

The final example is Farcaster, where accounts have a unique numeric string called Farcaster ID (fid). Using the Ethereum contract IdRegistry, user profiles are published and managed on the chain. To create an account, users must transact with IdRegistry to obtain a new fid. The wallet address with the fid is the owner of the user data, and IdRegistry ensures that no two fids are the same.

Farcaster extends this namespace to support ENS names published on-chain or off-chain. Users can submit a signature to the network to acquire that username.

Data Format and Interaction

Data creation and standardization are crucial foundations of protocols. The most common technique for managing data is using standardized formats, such as JSON objects or logs, to define and record user social interaction behaviors like "liking" or "following." Therefore, data formats in social protocols typically fall into several categories:

  • Distinguishing Users from Other Objects: Defining active operators and passive objects, where the former includes users or groups, and the latter defines content or actions like creating posts or liking.
  • Publication Content Objects: All types of post or comment content are encapsulated as "publication content" objects for composability across different content formats, typically linking content objects via URLs to external content to save on-chain resources.
  • Log Content: Fully records user actions, whether publishing or updating posts, adding and storing in chronological order.

Several examples are individually introduced to understand how social protocols operate and transmit using specific data formats.

Distinguishing Users from Other Objects

In ActivityPub, entities are classified as actors, typically users or groups, and objects that create content or like, follow, etc. When an actor performs an action, an activity object is created, such as creating a post when a user creates a post, the protocol generates a "create post" object.

ActivityPub uses the ActivityStreams 2.0 data format, a JSON-based data structure, to represent various user social interactions, like creating content or liking. The protocol has two main components responsible for transmitting the above object data:

  • Client-to-Server (C2S): C2S allows users to interact with their servers through various clients.
  • Server-to-Server (S2S): S2S facilitates message delivery between servers, enabling a robust federated network.

Publication Content Objects

Many Web3 products adopt many core ideas of ActivityPub and apply them on-chain.

Lens Protocol introduces the design of publication content Publications, which encapsulate various user-generated content like posts, retweets, comments, and other media. Each publication content is associated with a ContentURI linking to the external file storage location of the content, such as IPFS or AWS S3.

Web3 social protocols like Lens Protocol offer a more direct way to commercialize user content and influence. Users can set a fee for minting Follow NFTs, meaning other users need to pay to follow; users can also choose to integrate Collect Modules with their publication content, allowing for NFT minting fees linked to their published content - the publication content itself is not an NFT.

Log Content

CyberConnect represents each "user action record" as a data stream, where only the data owner (the user) is allowed to update. Each data update is appended to the stream in the form of an appended log when the state changes, such as switching between following and unfollowing, the update is added to the log and stored on a central server, periodically uploaded to a decentralized storage platform.

Scuttlebutt also uses a similar mechanism, recording data through appended logs. Each user has their own log, and each new message or operation is signed by the user's Ed25519 key and appended to the end.

Additionally, Scuttlebutt supports sharing binary data blobs, which can be images, videos, or any other binary content. Blobs are stored separately from the appended logs, but references to these blobs' hash can be included in the logs.

Data Storage

Aside from comparing user names and data recording and interaction methods, how user-generated content is stored is a critical issue for decentralized social protocols.

Peer-to-Peer Network Storage

Early decentralized protocol data storage methods primarily relied on off-chain devices.

Scuttlebutt uses a peer-to-peer network, where data is stored on users' local devices. While this method ensures data sovereignty, with users having full control over their information, data availability depends on whether the user or other devices with data copies are online. To increase storage space efficiency, some Scuttlebutt clients may delete less frequently used data.

Therefore, peer-to-peer networks are not particularly suitable for decentralized community products in terms of storage purposes.

Server Storage

Take the Matrix protocol as an example, Matrix can store historical records copies for multiple servers and synchronize them. When a user sends a message or records any event, the server broadcasts the event to other participating local servers, which store the event and forward it to their connected clients.

ActivityPub allows each entity or server in the network to store its data, typically stored in a database. The choice of database type depends on the specific implementation of the ActivityPub software, such as the mainstream ActivityPub platform Mastodon using a PostgreSQL database.

This mechanism, in practice for years, is currently the mainstream method. However, each protocol needs to consider the number of servers to ensure the protocol operates.

Blockchain Storage

Protocols like CyberConnect, Farcaster, and Lens use blockchain for data storage. On-chain storage ensures data immutability and verifiability, using blockchain's underlying consensus mechanism to sync state. However, this method faces scalability challenges, as each piece of data needs to be stored on-chain, resulting in high transaction costs and slower retrieval times.

Therefore, many Web3 social protocols attempt a hybrid approach. Using on-chain storage for infrequent operation data like personal data or subscription content; and off-chain storage for high-frequency events like likes, retweets, comments; or batch uploading data to the chain at frequent intervals, treating off-chain storage as a temporary expedient.

CyberConnect efficiently handles frequent updates of user social graph connection links by employing a hash-linked list design in a distributed database. When a user initiates a connection, an operation log is automatically created, and subsequent state changes, such as switching between following and unfollowing, are added to the log and stored on a central server, then periodically batch uploaded to a decentralized storage platform.

Farcaster also adopts a hybrid mechanism, using on-chain contracts for infrequent operations such as account data, usernames, storage, and keys; off-chain systems for high-performance frequent operations like user-created messages.

Web3 Will Accelerate Decentralized Social Adoption

Driven by the Web3 wave, decentralized social adoption will accelerate. Products related to public-private key pairs have accelerated adoption, helping the market better understand concepts like decentralized identity, open protocols, and even the metaverse, as well as becoming aware of the censorship and data security issues of Web2 social media companies.

Understanding these technologies is very helpful for industry understanding and concepts. However, do not forget that from the past federated universe to today's Web3 community products, although the technology is continuously iterated and updated, the ultimate goal is to allow users to communicate more freely with others. Viewing development with this belief can provide a clearer context.