Unveil the magic behind Farcaster Hubs - the linchpin for crafting Frames and Farcaster apps, empowering interaction in the decentralized web.
Farcaster, a decentralized social protocol skyrocketing in popularity, isn’t new in its existence but has been recently growing in popularity amongst developers. The main catalyst for popularity? Frames. If you haven’t heard of Frames by Farcaster, they are small windows in your feed that look like social media posts but are actually fully functioning apps. How are those frames built and powered? By Hubs.
Where do Hubs Fit In?
Essentially, Hubs are a distributed network of servers that allow Farcaster data to be stored and accessed. A Hub will download on-chain Farcaster data from Ethereum and off-chain Farcaster data from other Hubs via an API - this is so that you can read and write data to Farcaster. Long story short, if you’re building a frame or a Farcaster app, you’re going to need to interact with a Hub.
How Do Hubs Work Under the Hood?
A Hub’s process begins by syncing data from Farcaster contracts on the Optimism blockchain. While doing so, they become aware of every user’s account, their account keys, and the messages being sent. The standard flow is as follows:
- A new message is created on Farcaster
- The message is signed with an account key
- The message is uploaded to a Hub
- The Hub checks then checks the message’s validity
- The Hub then sends that message to peer Hubs
By checking the message validity, the Hub not only ensures a valid account key signature, but also that the message meets the requirements of the message type. After the validation process occurs, the message is then checked for errors before being stored in the Hub.
Just like with IPFS (we have a little bit of experience here) you can set up and run your own Hub, but also as with IPFS, we created a free Farcaster Hub to help you easily build on Farcaster while ensuring scalability and reliability. With our Hub and integrated IPFS infrastructure, you can rapidly build on Farcaster, while utilizing the ease and convenience of Pinata IPFS storage. If you’re ready to give it a try and build something cool, get started with our free Hub.
Happy pinning (and framing)!
February 9, 2024
Ready to shape the future?
Explore our plans