Understanding Farcaster: A Sufficiently Decentralized Social Graph Protocol

Bellsofaba
4 min readAug 7, 2023
Photo by GuerrillaBuzz on Unsplash

Overview

Farcaster is a social graph protocol that is sufficiently decentralized and enables the connection of applications and users through decentralized technology methods. Examples of these technologies are p2p networks, blockchains, and distributed ledgers.

When a decentralized social graph is built, applications form an interconnected synergy between themselves, sharing information without the need for centralized corporations like Twitter, Facebook, or Google.

Being a completely open-source protocol, anyone has the opportunity to build their own apps on it. Users get value from the dApps that run on top of Farcaster when they leverage its technology.

Sufficient Decentralization

Social networks are typically managed by corporations that have access to user data and relationships. With Twitter’s recent rebranding to X, we saw how easily Twitter was able to take possession of the @x and @music handles without consulting the current owners of those handles.

In a similar vein, Reddit recently changed the pricing for its API, effectively wiping off some of the most popular third-party Reddit applications.

In these circumstances, the limitations on the freedoms of users and creators are evidently pronounced.

As a result, Farcaster describes itself as a sufficiently decentralized protocol. If two users can connect and communicate with one another, even if the remainder of the network wishes to stop them from doing so, then the network is sufficiently decentralized. This indicates that users can always connect with their audience, which is only possible if network engineers can create a large number of clients.

For this to be possible, three features must be attained:

  1. Obtaining a distinctive username
  2. The capability of using that name to post messages
  3. Reading messages from any valid name and understanding them

Not Fully Decentralized

Social networks offer more than just messaging.

Push notifications get sent, posts are arranged in a feed, new individuals are suggested for following, and so on.

The list of things that people want will expand faster than there is the ability to decentralize them, and many features are not simple to decentralize. These functionalities can, however, be built centrally by clients because they don’t significantly impair decentralization.

For instance, the protocol for email has the ability to send messages, but clients need to create their own centralized spam filters.

Farcaster believes that this is unnecessary and even undesirable, in contrast to certain other networks that aim for complete decentralization and demand that the entire social network be on-chain. A better approach is to use off-chain systems for a better user experience while leveraging on-chain systems to decentralize ownership.

User Identity

On Farcaster, a user is identified by a numeric number, such as 054321, that is managed by a keypair. The mapping of identifiers to key pairs is done via a smart contract registry.

In the event that someone thinks their keypair has been compromised, the use of the registry enables key rotation, and smart contract wallets may even enable recovery and provide protection against key loss in the first place.

Farcaster IDs, or fids, are the names of these identifiers. By separating the identity and namespace layers and allowing users to correlate these fids with human-readable names when utilizing clients, identity may be more easily decentralized.

Messages

A message is an action taken by a user, such as editing their profile or submitting an update. Each communication is uniquely recognized by the hash of its contents, which may contain some text and metadata.

Each message must additionally have a timestamp for ordering, an implicit or explicit resource id to address conflicts, and a resource name.

The identifier 321.display_name, for instance, can be included in a message that modifies the display name of user 321. The network retains the message with the highest rank based on timestamp comparisons when multiple messages share the same identification.

Authentication

Every message must also contain the user’s fidand need them to sign it using their key pair. The message becomes tamper-proof and self-authenticating as a result. The signature can be validated by the recipient by looking up the key pair connected to the fid in the smart contract registry.

All messages must be re-signed with the new key pair if the fid switches to a new keypair as a result of key rotation.

Users can also grant the signer keypair, a third party, the authority to sign messages on their behalf. Despite not having authority over the user’s identity, this enables applications to create messages on the user’s behalf. Each signer needs to be individually approved by a user.

Hubs

In Farcaster, hubs resemble blockchain nodes. Every Hub maintains a copy of all the network’s data.

Users’ communications are accepted by hubs, which then peer-to-peer copy them in real-time. It can be used to submit new messages and will keep track of all currently active messages.

Registry Contracts

The registry contracts are only present on the Goerli testnet of Ethereum at the moment because Farcaster is in an invite-only beta.

Registration will be available to everyone when the protocol is live on the mainnet.

The Farcaster team presently has control over registration on the testnet, allowing them to invite people one at a time.

Thanks for learning about Farcaster.

I will see you on the next one.

--

--

Bellsofaba

Web3 Developer, Technical Writer & Digitalization Enthusiast