Cover photo

Farcaster Rollups

Why would we need them, and what could they look like?

Assume you want to use Farcaster to let your users comment on a basketball game, or play a game of chess, or discuss an event as it happens.

These use cases, may have special requirements such as very fast, real-time interactions and app-specific context (for example, the minute of the game), things that Farcaster is not very good at. And on the other hand, things that Farcaster is good at, such as censorship resistance, may not be very important.

In these cases, you could build what could be called a "Farcaster rollup".

You can think of a Farcaster rollup as a discussion that happened someplace other than hubs. It takes advantage of the Farcaster identity system (so, your users have to use their FID), and could use a signed proof of some kind (from an app-specific signer, to a message signed by an other signer such as Warpcast, similar to how frame payloads are signed) to prove that the user is participating in the rollup. It has a start and an end in time, and once it's completed, the app posts a "proof" it happened as a cast.


Depending on the application requirements there are various levers one can adjust, but let's take a simple (and probably popular) example, an app that lets casters comment in real time during a basketball game.

Your app would announce the game using a cast, and a frame that lets users sign-in. Your app stores the signed payload sent by the frame as a way to prove that a user actually joined the chat. Then it redirects you to a centralized chat server where you sign-in with Farcaster and you can comment in real time. At the end of the game, your app saves the whole discussion as a json on IPFS, alongside the proofs for each participant. Then it posts the whole discussion as "extrenal data" (the FIP is draft, but will probaby be finalized soon). It may also mention users that participated, in replies to this cast.

So, you leveraged FIDs, no need for signups, avatars, etc. You also have a proof that users actually joined the chat. Your users did not consume any Farcaster storage space, experienced a real-time chat that is hard to impossible to implement in a decentralized way. In the final transcript, each comment is tagged with the minute:second of the game. It can also show additional context, like the team each user supported, or score changes. And when the game was over, everything was rolled up, and posted to Farcaster.

Your app could also post intermediate "checkpoints" to Farcaster, something like "@A, @B, @C and 20 other users are currently commenting on the game", every 10 minutes, to drive participation.


If this was about a more sensitive topic, let's say, a political debate, the app could work like a traditional Farcaster client (request the user to approve a new signer, and sign each message), or even implement a stronger model, using client-side signatures.


When we discuss how Farcaster can scale to millions, it is often assumed that sharding may be unavoidable. But maybe something that resembles rollups may be a better solution that will preserve the global state model without unreasonable hardware requirements.

Loading...
highlight
Collect this post to permanently own it.
Purple Submarine logo
Subscribe to Purple Submarine and never miss a post.