Decentralizing Farcaster: Ferrule

Beginner7/4/2024, 7:18:19 PM
This article introduces the decentralized social network application Farcaster, highlighting its architecture built on Ethereum and Optimism, aimed at achieving digital sovereignty and user ownership.

One of the fundamental promises of blockchain is digital sovereignty and ownership. Legacy systems have been fundamentally broken for some time now. The advent of frontier technology enables us to move beyond these systems into new paradigms. Social media is one of many such systems that require a massive overhaul. This sentiment is not new nor novel. Builders, users, and investors have been advocating for a decentralized social graph, attestation layer, and all that comes with it since the Bitclout days.

Many have tried, but none have succeeded yet. Enter Farcaster, a sufficiently decentralized social network application built on Ethereum and powered by Optimism. Farcaster functions similarly to X (formerly known as Twitter) and Reddit. Users can quickly join the network, create profiles, post “casts” (similar to tweets), and follow other users. Much of the heavy lifting is done by Warpcast, a Farcaster client that abstracts the technical complexities and makes the user experience seamless.

Unlike X and Reddit, Farcaster allows users to own their accounts and the social graphs and relationships they create with other users. This is a significant upgrade from existing legacy systems. Each Farcaster user is free to move between different apps launched on Farcaster, ensuring user autonomy and ownership within the client.

State of Farcaster


=

\=
Hub: Similar to blockchain nodes, Hubs store data and listen to Ethereum and Optimism for specifics about users.

Client Apps: Applications used on the Farcaster platform, essentially a Keypair and dataset on-chain that a Client App publisher uses to act on behalf of a user, allowing them to post, read data, and perform other actions.

Farcaster has built a “sufficiently decentralized” system that allows users to have a portable identity between Client Apps. This is akin to using Google to sign into Facebook and X, but Farcaster goes further by making data portable too. Different Client Apps can create unique experiences over the same data. For example, Warpcast resembles Twitter, while another app might feel more like Discord.

A Client App must connect to a Hub, which is under no obligation to allow communication. Hubs are similar to web servers in web2 land, and there is no charge for Client Apps to read or write data to a Hub. Usually, the team that makes the Client App (like Warpcast) also runs the Hub nodes they connect to, making them “operators” of the Hub. Anyone can run a Hub, and if the initial configuration points to other Hubs, a network is created.

Users can have a portable crypto balance, and Client Apps can create fiat wallets or additional Client App-specific crypto balances. For example, Warpcast users pay for “warps,” which are used for global Farcaster storage and Warpcast-specific features.

The chosen architecture is “sufficiently decentralized” because it assumes multiple Client Apps operating independently and that anyone building a Client or Connected app will need to run a node or buy access from a node-running entity.

Looming Problems

Misaligned Network Incentives

Farcaster operates through Hubs that store data and facilitate communication between Ethereum and Optimism. Hubs host APIs allowing Client Apps to read and write data. Users must pay for storage by calling a “rent” function on an Optimism smart contract. This payment gate potentially reduces spam and bot accounts, but none of the rent money is given to node operators. As Farcaster grows, storage may become untenable for a single node. Horizontal scaling or incentivizing node operators could address this.

Centralization of Client Apps

Warpcast is the core contributor and creator of Farcaster, and it is the most widely used Client App. If only one client dominates, Farcaster risks becoming another centralized social media platform. Client Apps use a single key to act on behalf of the user, which is similar to how web3 wallets work but carries significant power. Integrating smart wallet technology could allow users to use their Farcaster key account as a primary wallet.

Introducing Ferrule and Ferrule MPC

Farcaster is exciting not only for its technical achievements but also for the community it has cultivated. However, the final form of Farcaster is not yet realized. Enter Ferrule, a protocol built within Farcaster that enables anyone to build their own client for Farcaster.

Importance of Ferrule

Currently, the economics of Farcaster are limited. Specifically, there are no incentives for anyone to run a Farcaster Hub, resulting in Farcaster managing the entire network. While this is not entirely centralized, it is not fully decentralized, hence the “sufficiently decentralized” tagline of Farcaster. The path to a more decentralized network would benefit immensely from Ferrule.

The benefits of a fully decentralized network are significant. As with Ethereum and Solana, state growth is becoming an increasingly problematic issue. As more users join and interact, the burden of data storage rests entirely on Farcaster. This becomes an issue of both centralization and scalable, sustainable state growth. With mass adoption, this problem will accelerate.

Source: https://dune.com/pixelhack/farcaster

Farcaster growth has not slowed down and continues to gain momentum, with over 60,000 unique daily users, up 66% month-over-month. With exponential growth, the user activity embedded within each unique account increases. Although anyone can run a Farcaster node, there are no incentives to do so. Incentives for node growth will be essential for the system to scale optimally.

Ferrule Design

Ferrule is a novel design of Farcaster Hubs operating as an Eigenlayer Actively Validated Service (AVS). It enables the use of existing assets to secure and ensure the operation of Hubs and the correct function of the Farcaster protocol. Users restake into Ferrule contracts, and assets are delegated to hubs dynamically based on network behavior. Some staking yield will be directed to hub operators as rewards, along with some storage account rent costs.

Currently, Farcaster Hubs have limited data integrity checks and no economic disincentives for spam or manipulation. Ferrule aims to address this by ensuring Hubs operate verifiably and securely. Ferrule nodes broadcast cryptographically verifiable artifacts attesting to correct operation. Economic incentives encourage correct behavior, and inaction or malicious action is punished through slashing.

As Ferrule evolves, it aims to tackle state growth and client/hub centralization problems. Incentivized Hubs can create a routing system ensuring they do not need to store all data, are rewarded for storing and providing access to data. The Ferrule design aims to make centralization less viable by rewarding correct hub behavior.

A few roadmap items for Ferrule include:

Restaking Mechanism:

  • Restaking: Users can restake their existing assets (such as ETH or other compatible tokens) into Ferrule contracts. This staking process binds their assets to the security of Farcaster Hubs.
  • Dynamic Delegation: The staked assets are dynamically delegated to various Hubs based on the network’s behavior and needs. This ensures that the network remains secure and responsive to changes in usage patterns.

Incentivization:

  • Rewards for Hub Operators: A portion of the staking yield and storage account rent costs are directed to Hub operators. This provides a financial incentive for maintaining the network’s integrity and performance.
  • Economic Disincentives: Inaction or malicious actions by Hubs are economically penalized through slashing mechanisms. This ensures that Hubs are motivated to operate correctly and securely.

Verifiable Operation:

  • Cryptographic Artifacts: Ferrule nodes must broadcast cryptographically verifiable artifacts that attest to their correct operation. These artifacts are used to ensure that the actions performed by the Hubs are legitimate and in line with network rules.
  • Consensus Mechanisms: The AVS framework ensures that all Hubs operate in a verifiable manner, contributing to a trustless environment where users can be confident in the network’s reliability.

Data Sharding and Routing:

  • State Growth Management: To manage state growth, Ferrule incorporates data sharding and routing mechanisms. This approach ensures that no single Hub needs to store all the data, distributing the storage load across the network.
  • Data Access Incentives: Hubs are rewarded for storing data and providing access to it. Proofs of data storage are broadcast across the network, creating a map of data locations and ensuring efficient data retrieval.

Ferrule MPC: Enabling Decentralized Client and Connected Apps

MPC Framework:

  • Multi-Party Computation (MPC): Ferrule MPC utilizes MPC techniques to allow multiple parties to jointly compute functions over their inputs while keeping those inputs private. This ensures that sensitive user data remains confidential, even during collaborative processes.
  • Client and Connected Apps: The MPC framework enables the development of truly decentralized Client or Connected apps on Farcaster. These apps can operate securely and independently, interacting with the network without compromising user privacy.

Authorization and Smart Wallet Integration:

  • Granular Authorization: Ferrule MPC supports the creation of an authorization system that allows users to delegate specific actions over their accounts. This is similar to emerging patterns in blockchain where users can authorize particular activities over their wallets.
  • Smart Wallet Technology: Integrating smart wallet technology allows users to use their Farcaster key account as a primary wallet. This integration provides a seamless user experience, enabling users to manage their crypto assets and social interactions from a single account.

API and Data Interfaces:

  • Standardized Data Access Points: Hubs provide standardized data access points, ensuring that Client apps can interact with the network’s data in a consistent manner. This standardization simplifies the development of new apps and enhances interoperability.
  • Extended Object Models: Client apps, such as Warpcast, can extend the Farcaster object model to include additional features like pre-computed social graphs and behavioral data. This flexibility allows for the creation of diverse and innovative user experiences.

Ferrule MPC is a library and set of examples for teams to run decentralized Client or Connected apps on Farcaster. It will be a core part of Ferrule should it be pursued fully. While not fully ready for release, Ferrule MPC aims to ignite discussion within the Farcaster community about solving these looming problems.

We hope that Ferrule MPC will be a useful tool moving forward. If the Ferrule design excites you,

Disclaimer:

  1. This article is reprinted from [Ferrule Github], All copyrights belong to the original author [austbot, David Shuttleworth, JJ Alicea]. If there are objections to this reprint, please contact the Gate Learn team, and they will handle it promptly.
  2. Liability Disclaimer: The views and opinions expressed in this article are solely those of the author and do not constitute any investment advice.
  3. Translations of the article into other languages are done by the Gate Learn team. Unless mentioned, copying, distributing, or plagiarizing the translated articles is prohibited.

Decentralizing Farcaster: Ferrule

Beginner7/4/2024, 7:18:19 PM
This article introduces the decentralized social network application Farcaster, highlighting its architecture built on Ethereum and Optimism, aimed at achieving digital sovereignty and user ownership.

One of the fundamental promises of blockchain is digital sovereignty and ownership. Legacy systems have been fundamentally broken for some time now. The advent of frontier technology enables us to move beyond these systems into new paradigms. Social media is one of many such systems that require a massive overhaul. This sentiment is not new nor novel. Builders, users, and investors have been advocating for a decentralized social graph, attestation layer, and all that comes with it since the Bitclout days.

Many have tried, but none have succeeded yet. Enter Farcaster, a sufficiently decentralized social network application built on Ethereum and powered by Optimism. Farcaster functions similarly to X (formerly known as Twitter) and Reddit. Users can quickly join the network, create profiles, post “casts” (similar to tweets), and follow other users. Much of the heavy lifting is done by Warpcast, a Farcaster client that abstracts the technical complexities and makes the user experience seamless.

Unlike X and Reddit, Farcaster allows users to own their accounts and the social graphs and relationships they create with other users. This is a significant upgrade from existing legacy systems. Each Farcaster user is free to move between different apps launched on Farcaster, ensuring user autonomy and ownership within the client.

State of Farcaster


=

\=
Hub: Similar to blockchain nodes, Hubs store data and listen to Ethereum and Optimism for specifics about users.

Client Apps: Applications used on the Farcaster platform, essentially a Keypair and dataset on-chain that a Client App publisher uses to act on behalf of a user, allowing them to post, read data, and perform other actions.

Farcaster has built a “sufficiently decentralized” system that allows users to have a portable identity between Client Apps. This is akin to using Google to sign into Facebook and X, but Farcaster goes further by making data portable too. Different Client Apps can create unique experiences over the same data. For example, Warpcast resembles Twitter, while another app might feel more like Discord.

A Client App must connect to a Hub, which is under no obligation to allow communication. Hubs are similar to web servers in web2 land, and there is no charge for Client Apps to read or write data to a Hub. Usually, the team that makes the Client App (like Warpcast) also runs the Hub nodes they connect to, making them “operators” of the Hub. Anyone can run a Hub, and if the initial configuration points to other Hubs, a network is created.

Users can have a portable crypto balance, and Client Apps can create fiat wallets or additional Client App-specific crypto balances. For example, Warpcast users pay for “warps,” which are used for global Farcaster storage and Warpcast-specific features.

The chosen architecture is “sufficiently decentralized” because it assumes multiple Client Apps operating independently and that anyone building a Client or Connected app will need to run a node or buy access from a node-running entity.

Looming Problems

Misaligned Network Incentives

Farcaster operates through Hubs that store data and facilitate communication between Ethereum and Optimism. Hubs host APIs allowing Client Apps to read and write data. Users must pay for storage by calling a “rent” function on an Optimism smart contract. This payment gate potentially reduces spam and bot accounts, but none of the rent money is given to node operators. As Farcaster grows, storage may become untenable for a single node. Horizontal scaling or incentivizing node operators could address this.

Centralization of Client Apps

Warpcast is the core contributor and creator of Farcaster, and it is the most widely used Client App. If only one client dominates, Farcaster risks becoming another centralized social media platform. Client Apps use a single key to act on behalf of the user, which is similar to how web3 wallets work but carries significant power. Integrating smart wallet technology could allow users to use their Farcaster key account as a primary wallet.

Introducing Ferrule and Ferrule MPC

Farcaster is exciting not only for its technical achievements but also for the community it has cultivated. However, the final form of Farcaster is not yet realized. Enter Ferrule, a protocol built within Farcaster that enables anyone to build their own client for Farcaster.

Importance of Ferrule

Currently, the economics of Farcaster are limited. Specifically, there are no incentives for anyone to run a Farcaster Hub, resulting in Farcaster managing the entire network. While this is not entirely centralized, it is not fully decentralized, hence the “sufficiently decentralized” tagline of Farcaster. The path to a more decentralized network would benefit immensely from Ferrule.

The benefits of a fully decentralized network are significant. As with Ethereum and Solana, state growth is becoming an increasingly problematic issue. As more users join and interact, the burden of data storage rests entirely on Farcaster. This becomes an issue of both centralization and scalable, sustainable state growth. With mass adoption, this problem will accelerate.

Source: https://dune.com/pixelhack/farcaster

Farcaster growth has not slowed down and continues to gain momentum, with over 60,000 unique daily users, up 66% month-over-month. With exponential growth, the user activity embedded within each unique account increases. Although anyone can run a Farcaster node, there are no incentives to do so. Incentives for node growth will be essential for the system to scale optimally.

Ferrule Design

Ferrule is a novel design of Farcaster Hubs operating as an Eigenlayer Actively Validated Service (AVS). It enables the use of existing assets to secure and ensure the operation of Hubs and the correct function of the Farcaster protocol. Users restake into Ferrule contracts, and assets are delegated to hubs dynamically based on network behavior. Some staking yield will be directed to hub operators as rewards, along with some storage account rent costs.

Currently, Farcaster Hubs have limited data integrity checks and no economic disincentives for spam or manipulation. Ferrule aims to address this by ensuring Hubs operate verifiably and securely. Ferrule nodes broadcast cryptographically verifiable artifacts attesting to correct operation. Economic incentives encourage correct behavior, and inaction or malicious action is punished through slashing.

As Ferrule evolves, it aims to tackle state growth and client/hub centralization problems. Incentivized Hubs can create a routing system ensuring they do not need to store all data, are rewarded for storing and providing access to data. The Ferrule design aims to make centralization less viable by rewarding correct hub behavior.

A few roadmap items for Ferrule include:

Restaking Mechanism:

  • Restaking: Users can restake their existing assets (such as ETH or other compatible tokens) into Ferrule contracts. This staking process binds their assets to the security of Farcaster Hubs.
  • Dynamic Delegation: The staked assets are dynamically delegated to various Hubs based on the network’s behavior and needs. This ensures that the network remains secure and responsive to changes in usage patterns.

Incentivization:

  • Rewards for Hub Operators: A portion of the staking yield and storage account rent costs are directed to Hub operators. This provides a financial incentive for maintaining the network’s integrity and performance.
  • Economic Disincentives: Inaction or malicious actions by Hubs are economically penalized through slashing mechanisms. This ensures that Hubs are motivated to operate correctly and securely.

Verifiable Operation:

  • Cryptographic Artifacts: Ferrule nodes must broadcast cryptographically verifiable artifacts that attest to their correct operation. These artifacts are used to ensure that the actions performed by the Hubs are legitimate and in line with network rules.
  • Consensus Mechanisms: The AVS framework ensures that all Hubs operate in a verifiable manner, contributing to a trustless environment where users can be confident in the network’s reliability.

Data Sharding and Routing:

  • State Growth Management: To manage state growth, Ferrule incorporates data sharding and routing mechanisms. This approach ensures that no single Hub needs to store all the data, distributing the storage load across the network.
  • Data Access Incentives: Hubs are rewarded for storing data and providing access to it. Proofs of data storage are broadcast across the network, creating a map of data locations and ensuring efficient data retrieval.

Ferrule MPC: Enabling Decentralized Client and Connected Apps

MPC Framework:

  • Multi-Party Computation (MPC): Ferrule MPC utilizes MPC techniques to allow multiple parties to jointly compute functions over their inputs while keeping those inputs private. This ensures that sensitive user data remains confidential, even during collaborative processes.
  • Client and Connected Apps: The MPC framework enables the development of truly decentralized Client or Connected apps on Farcaster. These apps can operate securely and independently, interacting with the network without compromising user privacy.

Authorization and Smart Wallet Integration:

  • Granular Authorization: Ferrule MPC supports the creation of an authorization system that allows users to delegate specific actions over their accounts. This is similar to emerging patterns in blockchain where users can authorize particular activities over their wallets.
  • Smart Wallet Technology: Integrating smart wallet technology allows users to use their Farcaster key account as a primary wallet. This integration provides a seamless user experience, enabling users to manage their crypto assets and social interactions from a single account.

API and Data Interfaces:

  • Standardized Data Access Points: Hubs provide standardized data access points, ensuring that Client apps can interact with the network’s data in a consistent manner. This standardization simplifies the development of new apps and enhances interoperability.
  • Extended Object Models: Client apps, such as Warpcast, can extend the Farcaster object model to include additional features like pre-computed social graphs and behavioral data. This flexibility allows for the creation of diverse and innovative user experiences.

Ferrule MPC is a library and set of examples for teams to run decentralized Client or Connected apps on Farcaster. It will be a core part of Ferrule should it be pursued fully. While not fully ready for release, Ferrule MPC aims to ignite discussion within the Farcaster community about solving these looming problems.

We hope that Ferrule MPC will be a useful tool moving forward. If the Ferrule design excites you,

Disclaimer:

  1. This article is reprinted from [Ferrule Github], All copyrights belong to the original author [austbot, David Shuttleworth, JJ Alicea]. If there are objections to this reprint, please contact the Gate Learn team, and they will handle it promptly.
  2. Liability Disclaimer: The views and opinions expressed in this article are solely those of the author and do not constitute any investment advice.
  3. Translations of the article into other languages are done by the Gate Learn team. Unless mentioned, copying, distributing, or plagiarizing the translated articles is prohibited.
Nu Starten
Meld Je Aan En Ontvang
$100
Voucher!