tl;dr
Vocdoni is changing the game in digital governance by blending easy-to-use Web2 interfaces with the security of Web3. Thanks to the Farcaster Frames interface, we're making voting not just secure but also incredibly user-friendly. This means voting with just one click while backed by blockchain tech.
This article provides a technical explanation of how Vocdoni built a Farcaster Frame for reliable governance ๐๐ณ.
This article is written by @p4u, follow him on Farcaster for more technical updates on farcaster.vote.
At Vocdoni, our mission is to enhance the accessibility and security of voting systems using open-source technology. Our approach merges the simplicity of Web2 interfaces with the robust decentralization of Web3 backends, exemplified in our latest integration with the Farcaster network.
This article provides a concise overview of how Vocdoni leverages the Farcaster frame to simplify voting in the digital age, ensuring it is understandable even for those not deeply versed in blockchain technology.
Vocdoni is dedicated to creating open-source and decentralized voting protocols. Our systems are designed to be as user-friendly as Web2 applications, while harnessing the security and transparency of Web3 technologies. This blend has allowed us to deploy our voting infrastructure across various sectors, from sports clubs like Barcelona Football Club to political parties and municipal referendums.
Furthering our commitment to the crypto space, we've collaborated with the Aragon Project and launched advanced web3 applications, including onvote.app and our new Farcaster-compatible voting application available at Farcaster.vote.
At the heart of Vocdoni's products lies the Vochain, a cometBFT blockchain optimized for voting verification. Capable of processing approximately 800 transactions per second (TPS), the Vochain supports various cryptographic proofs, ensuring fast and secure vote verification without imposing gas fees on voters. This approach makes voting accessible and cost-effective. All activity in the Vochain can be observed through the block explorer.
Let's unpack the technical intricacies involved in verifying votes on the Vocdoni blockchain through the Farcaster frame interface.
The Farcaster frame interface is very basic, it only allows the backend to respond with static images and the user to interact with 4 buttons and 1 input text.
Then, on each interaction with the backend, the Frame user will send a JSON object like this:
{
"untrustedData": {
"fid": 2,
"url": "https://farcaster.vote/poll/0x7464837316182738372612638471aabcde",
"messageHash": "0xd2b1ddc6c88e865a33cb1a565e0058d757042974",
"timestamp": 1706243218,
"network": 1,
"buttonIndex": 2,
"inputText": "hello world",
"castId": {
"fid": 226,
"hash": "0xa48dd46161d8e57725f5e26e34ec19c13ff7f3b9"
}
},
"trustedData": {
"messageBytes": "d2b1ddc6c88e865a33cb1a565e0058d757042974..."
}
}
Let's focus on the trustedData
, the crucial component for constructing a voting frame. This element is a Protobuf serialized message that encapsulates the untrustedData
along with some additional information.
The signature on this data comes from the appkey
, which is an ed25519 EDDSA public key managed by the Farcaster client (such as warpcast, among others).
It's important to underline that this key differs from an Ethereum address, rendering it incompatible with conventional web3 signers.
Let's dive into the fields we use for building the vote transaction:
Button Index (1 to 4): This indicates the voter's choice. Each number corresponds to a specific voting option, allowing the system to understand the voter's decision.
Farcaster ID (fid): A unique identifier for the Farcaster user, crucial for ensuring the vote's authenticity and preventing double voting.
Public Key: Used to verify the signature of the vote, ensuring that the vote is indeed from the user it claims to be from.
URL of the Frame: This contextualizes the vote within a specific polling instance, we use it to check and verify the unique poll identifier (processID) and avoid using votes from one process into another.
The button index directly translates into a โvote packageโโan array of numbers representing the voter's choice, as per our ballot protocol. This package is the digital equivalent of marking a ballot in traditional voting systems.
The legitimacy of a vote on the blockchain is confirmed through a census proof. The proof validation must be deterministic, reproducible, and self-contained, so any node on the blockchain can verify it at any moment, without requiring external input.
For the Farcaster voting proof, we have two essential components:
Frame Signed TrustedData: This includes the user's public key, extracted directly from the frame backend. It's part of the trusted data signed by the user, ensuring the authenticity of the vote.
Merkle Proof from a Merkle-Tree of Farcaster Public Keys: Utilizing our Web3 EVM scanner, census3, we scan all event logs from the Farcaster registry-key smart contract. This process identifies registered public keys, builds a merkle tree, and publishes it to IPFS, establishing a verifiable and deterministic census. This merkle proof confirms that the voter is part of the eligible voting population.
When initiating a new voting poll on the Vocdoni blockchain, we specify the merkle tree root and its IPFS URI, cementing the census data and enabling nodes across the network to download, verify, and utilize it for merkle-proofs.
Here you can find the Farcaster proof verification implementation code.
A unique challenge in digital voting is ensuring a single vote per user. Farcaster's protocol allows a user to possess multiple ed25519 public keys, with the Farcaster ID (fid) serving as the unchanging identifier. To counteract double voting, we make use of a nullifierโa hash combining the Farcaster ID and the unique poll identifier (processID). This creates a unique hash for each voting attempt, nullifier = hash(FID,ProcessID)
, effectively blocking multiple votes by the same user across different keys.
This nullifier is crucial for maintaining the integrity of the voting process. Upon casting a vote, the nullifier is computed and stored in the blockchain state. Any subsequent voting attempts using the same Farcaster ID for the same poll are automatically detected and rejected.
By putting the Farcaster Protocol and the Vocdoni Protocol together, we believe Farcaster has the potential to become the go-to platform for building digital communities of all kinds, including DAOs and Network States.
We spent two fun and productive weeks developing the first version of Farcaster.vote but now is your turn to have bun by creating your first poll!
More updates, like token-gated polls, are coming soon ๐
Follow @vocdoni on Farcaster and don't miss any update!
Over 100 subscribers
Good
/proxyswap DAO Governance Proposal #1, powered by @vocdoni for context on the proposed token swap, please see the paragraph post linked in the replies https://frame.vote/1ilz3BmD
Terms: 30k $PROXY for 5m $DEGEN Counterparty: /degendao Cliff: 6m Vesting: 12m linear https://paragraph.xyz/@proxystudio.eth/proxyswap-dao-lessgreater-degen-dao
Is this the threshold?
governance documentation is forthcoming but this proposal will certainly pass.
um. we at like 1 per minute. lets keep that energy fam. @demipoet if you haven't already sir, please vote on this. everybody else, or weigh in on why you're not if so...?
yes done ser. thank you
Yessssssss LFG
this is so cool
social governance is amazing
Do you know how this works? Looking on the explorer I donโt see my address anywhere
@ferran
You are not voting with your Ethereum wallet, but with your Farcaster internal key. So the explorer will show you the voterID, which is a hash of the Farcaster publicKey of the client you used to cast the vote on the Frame. More info: https://blog.vocdoni.io/farcaster-vote-frame cc/ @proxystudio.eth
Link for the web view of the poll, with some more details https://farcaster.vote/app/#poll/4ae20a8eb4caa52f5588f7bb9f3c6d6b7cf003a5b03f4589edea10000000025c
very useful data, I can think of many ways to incentivize participation in the DAO
I would love to vote, is there a non frame version? My primary wallet is not connected to Warpcast
Yezzir!
Is this vote for proxy holders or degen dao holders? @purp @proxystudio.eth
Nevermind!
$proxy, habs vote tomorrow I believe
voted ๐ณ๏ธ, @vocdoni making voting so easy and seamless ๐
Is there a way to vote aside from a frame? My proxy wallet is not connected to Warpcast.
Heavy favorite
@proxystudio.eth any chance yโall could update the color of this text lmao
link please?
Yey! You can create e2e verifiable polls with Farcaster.vote, send me a DC if you have any doubt!
You might find this interesting too: https://blog.vocdoni.io/farcaster-vote-frame
We have implemented a voting frame that uses the @vocdoni blockchain network as backend for casting and verify votes! Honestly this is quite a sophisticated frame. It's been a lot of fun. Technical details here: https://blog.vocdoni.io/farcaster-vote-frame Btw this is probably the first pure Go frame implementation?
See a live example of the frame (full APGLv3 code here https://github.com/vocdoni/vote-frame) https://farcaster.vote/4ae20a8eb4caa52f5588f7bb9f3c6d6b7cf003a5b03f4589edea10000000003f
Found this on Kiwi... @purp and other dao members, tell me what you think? https://blog.vocdoni.io/farcaster-vote-frame
Huh. Funny, that ๐ฅ
I like the concept of voting in a frame on farcaster. I think @purp also has a framework being actively work on tho. Right now all we have is party base
Hopefully not rebuilding the wheel.
https://fc-polls.vercel.app/polls/0dc157e8-9258-4ead-91d2-fe0eb4059190
< 32 ETH is my only reason
Tax. The U.S. Internal Revenue Service treats staking rewards as current ordinary income whereas rETH appears to enable deferred long term capital gains.
why is it not better to be just regular income? it already feels like it is. The 32ETH is the only one that should be looked at as longterm gains, right?
While unclear, most U.S. taxpayers take the position they have a tax event when they stake into rETH but then do not recognize current income on staking rewards that build up โinside.โ That effectively turns current ordinary income into deferred long term capital gains. Far better unless the entry tax is steep.
If you are brave and send me 27 ETH (cookbooks.eth) I will be brave and stake your holy token, respectfully.
32 ETH is the equivalent of MYR 360,000+, where a cup of Starbucks espresso is MYR 9. Decentralization is not globally affordable.
oddly specific bro, and good point
Because that's where I am from. So apply it for your country
I really just don't want another server to babysit ๐
How many of your other servers print money and bring unstoppable apps to the decentralized permissionless world computer together with your internet magic money friends?
Worried about Slashing b/c my internet connectivity can be flaky
You cannot be slashed for going offline. Regular offline penalties are tiny (eg. 1% downtime -> earn 3.43% instead of 3.5%) You may be inactivity leaked if you're offline for multiple days at the same time as >1/3 of the entire network, but if that ever happens you'll hear about it everywhere on twitter/FC on day 1
Iโm sold lol
๐ Your cast cashed in! Claim ๐ฉ DEGEN tokens on jam now! ๐ฃ https://jam.so/?referrer=X0cAnl ๐ฃ
I think the slashing risk might be overplayed if this is the case. It is a huge "WARNING" on every platform. For me, the liquid token swap implications (taxes) and percieved full node complexity keep it on the back burner.
๐ for you on jam.so
Flaky internet is not terrible for staking once you are synced up. It is more stressful to worry about the computer going offline due to error or some problem with Linux.
Nothing to worry about that. You just loose few pennies a day at worst
Tax implications of pulling it out of coinbase.
Need ETH ๐ญ
Not even close to 32ETH
First is not enough ETH but more importantly the vulnerability of pools
1/2 Introducing Farcaster.vote: first Frame for verifiable & decentralized polls! Read this technical explanation by @p4u on how we built a Frame for reliable governance on Farcaster! https://blog.vocdoni.io/farcaster-vote-frame Sneak peek: We have a ๐ prepared! Soโฆget creative & start polling on Farcaster.vote
2/2 What's next? By putting together Farcaster and Vocdoni protocols we can create a better framework for digital governance and turn Farcaster into the natural place to build digital communities like DAOs and Network States. Roadmap: โ FID-based polls ๐ Token-gated polls ๐ Channel-gated polls Stay tuned!
3535 $DEGEN
I literally just minted a Ponder Pass and paid to submit my fiesta survey through them, lol. I look forward to seeing where this project goes next! 200 $degen
@launch
You scouted @vocdoniโs launch! https://www.launchcaster.xyz/p/65cfd6d441e97f68b5fee077
2000 $DEGEN
5000 $DEGEN
326 $degen
333 $DEGEN
651 $DEGEN
500 $DEGEN