Cover photo

Farcaster.vote is more than just a polling frame

It's a verifiable, tamper-proof, secure, and decentralized solution for decision-making

At Vocdoni, our guiding philosophy since 2018 has been "web2 at the forefront, web3 at the core". This means we're committed to creating products that are not only user-friendly but also retain the foundational features of web3 technology.

Recently, we introduced farcaster.vote, a platform that empowers members of the Farcaster social network to initiate and engage in decision-making processes within Frame.

However, farcaster.vote is no ordinary polling platform. It represents a leap forward, offering a verifiable, tamper-proof, secure, and decentralized solution for decision-making. At its core, it comprises a sophisticated assembly of components that form an end-to-end cryptographic chain of trust. This ensures that every part of the process, from casting votes to announcing results, is transparent and verifiable by anyone.

Opting for a centralized approach in this domain might have been simpler, involving a centralized database and vote verification performed by a trusted party. Yet, we chose the more challenging route, aligned with our core belief: every step of the process must be deterministic, reproducible, and verifiable by all. Moreover, our solution is designed to be censorship-resistant, ensuring its longevity and operation even under attempts to shut it down.

Such characteristics might not immediately resonate with most users, who may find trustless systems less convenient and somewhat feature-limited. However, the necessity for such a system becomes evident in certain situations, which, in hindsight, can lead to regret at having not prioritized these aspects sooner.

A case in point occurred on March 9, 2024, involving an Arbitrum DAO funding proposal by a Tornado.Cash advocate. The proposal faced censorship and removal from a centralized forum and Snapshot. Had this been discussed on Farcaster and voted through the Vocdoni frame, censorship issues could have been mitigated.

Attempts to silence the conversation might have led to a temporary setback, but the community could swiftly revive the dialogue using an alternate Farcaster client and deploying a copy of farcaster.vote. This resilience is possible because these platforms are open-source, do not depend on any centralized database, and are built on blockchain technology.

In essence, when we design software solutions, we're not advocating for decentralization for its own sake. However, we firmly believe in maintaining open-source principles and the autonomy granted by not relying on private data. There's a line we refuse to cross, emphasizing the importance of openness and the collective ability to verify and participate freely in the digital realm.

To conclude, it's crucial to acknowledge that neither Vocdoni nor Farcaster claim to be flawless or invincible systems. There's always space for enhancement and improvement. Yet, the commitment to our fundamental principles remains strong. It is our hope that, as we progress, we will discover the optimal balance between user-friendliness and decentralization, thereby creating solutions that not only respect our core values but also cater to the evolving needs of our users.

Exploring Farcaster.vote and Vocdoni

Farcaster.vote's backbone is its code, hosted on a GitHub repository. This codebase, comprising 13,000 lines of Go and 900 of TypeScript, is far from trivial, highlighting the project's complexity beyond simple poll management.

To understand how voting processes maintain their integrity and trustworthiness, let's outline the chain of trust that the protocol establishes:

  1. User Identification: Every Farcaster user has a unique Ethereum address, verified through the Optimism L2 network. This ensures that each user is who they claim to be.

  2. Creating Signers: Users generate signers (special keys for interacting within Farcaster clients) using their Ethereum address. These signers are also registered on Optimism, tying them securely to the user's identity.

  3. Building a Census: Vocdoni's technology scans the Optimism network to compile a list of all signers. This list is organized into a secure structure known as a Merkle tree, culminating in a "Merkle root" - a single hash representing all the data. This root is then stored on IPFS, an immutable file system.

  4. Registering a Poll: To create a poll, a user uploads the question and possible answers to IPFS and sends a transaction to the Vocdoni blockchain. This transaction includes details about the poll and the merkle root, initiating a new "process".

  5. Poll as a Frame: The poll is then formatted into a Frame, a type of post that can be shared on the Farcaster network.

  6. Voting: When a user interacts with the Frame and votes, they send a digitally signed message directly to the farcaster.vote backend.

  7. Processing Votes: The backend takes this message, retrieves the necessary Merkle proof (evidence that the vote is legitimate), and prepares the vote transaction.

  8. Blockchain Submission: This transaction is sent to the Vocdoni blockchain via any of its peer-to-peer (p2p) nodes.

  9. Verification: The blockchain's internal mechanisms check the vote, its proof, and the accompanying signature to ensure everything matches up.

  10. Counting Votes: If the verification succeeds, the vote is officially counted.

  11. Updating Results: Finally all p2p nodes on the blockchain refresh to reflect the new vote, ensuring the results are up-to-date and accurate.

Explore the Farcaster Census

In this JSON file, available in the farcaster.vote source repository, you can find the current Census used for casting and verifying votes. All your Farcaster signers must be included.

https://github.com/vocdoni/vote-frame/blob/main/farcaster_census.json

{
  "root": "51b9ea2c22df2de533a6dc5b87d8a236daf75abb48eb144e7d1f592da8b36a7c",
  "uri": "ipfs://bafybeickfxuj43xau2jjc6nhfffziuyc6x6purrylhgiqbtedk65deg5cy",
  "size": 254961
}

It is generated by Vocdoni's census3, a service that constantly scans the Optimism network to capture the latest updates from Farcaster's keyRegistry smart contract.

The current census can be retrieved and explored using Vocdoni's tool "censusdump".

git clone https://github.com/vocdoni/vocdoni-node
go run ./cmd/tools/censusdump --url=ipfs://bafybeickfxuj43xau2jjc6nhfffziuyc6x6purrylhgiqbtedk65deg5cy --output=farcaster.json
## it might take some time since IPFS is slow propagating data

It is possible to verify that the census and its merkle-root are correct, and that a registered vote on Vocdoni's blockchain includes the merkle-proof, confirming the Farcaster user's legitimacy.

Run Your Own Farcaster.vote Instance

You don't have to rely solely on our platform; you can set up your own farcaster.vote instance to create voting frames or to simply view and verify them.

Start by cloning the repository and using Docker to launch it:

git clone https://github.com/vocdoni/vote-frame.git
cd vote-frame
cp .env.example .env
## edit .env and add at least one neynar API key
docker compose build
docker compose up -d

Afterward, navigate to http://localhost:8888 to access your personal farcaster.vote application. Keep in mind, if you wish to create a poll and have others participate, you'll need a valid HTTP(s) domain that's accessible from the internet.

With your application now set up, you're able to view any poll created on Farcaster by simply copying and pasting the vote identifier (a 64-character hexadecimal string). For example:

https://localhost:8888/app/#poll/4ae20a8eb4caef37a84dcc761d6e22138aed3dd1f2fd62237e67100000000048

What's more, you can cast votes on these polls using your frame, even if they were initially created on a different instance. This exemplifies the true power of decentralization.


For those interested in diving deeper or understanding more technical aspects, additional insights and explanations can be found on this blogpost, our developer portal, and this article on remote voting in the age of cryptography.

Loading...
highlight
Collect this post to permanently own it.
Vocdoni logo
Subscribe to Vocdoni and never miss a post.
#farcaster#vocdoni#governance#digital voting#voting
  • Loading comments...