project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4

OmniVote

OmniVote is a decentralized voting platform that allows users to participate in governance decisions across multiple blockchain networks securely and efficiently.

OmniVote

Created At

ETHOnline 2024

Winner of

Sign Protocol - Sign Everything Pool Prize

Prize Pool

Project Description

OmniVote is a decentralized voting platform designed to enable secure, transparent, and cross-chain governance for decentralized autonomous organizations (DAOs). The platform allows users to cast votes on proposals deployed across multiple blockchains, specifically Ethereum Sepolia and Base Sepolia, using Chainlink CCIP (Cross-Chain Interoperability Protocol) for seamless communication between these chains.

Core Concept

The primary goal of OmniVote is to allow users to participate in governance activities from multiple chains without the complexity of interacting directly with each blockchain's smart contracts. The voting data is stored on one chain (referred to as the "primary chain"), while users from a secondary chain can submit their votes. The message relaying between the two chains ensures that votes cast on one chain are transferred to and recorded on the primary chain, maintaining a unified and tamper-proof voting system.

How It Works, Smart Contracts on Multiple Chains:

OmniVote has deployed two smart contracts, one on Ethereum Sepolia and the other on Base Sepolia. One of these chains (let's assume Ethereum Sepolia) acts as the primary chain, where all voting results are stored and verified. The second chain (Base Sepolia) serves as a secondary chain, allowing users to cast votes there.

Chainlink CCIP for Cross-Chain Communication:

Chainlink CCIP is utilized to facilitate communication between the two smart contracts deployed on the two different blockchains. When a user from the secondary chain (Base Sepolia) tries to vote, instead of directly recording the vote on Base Sepolia, the system sends a cross-chain message using Chainlink CCIP to the primary chain (Ethereum Sepolia). This message includes the user's vote, identity, and relevant metadata.

Vote Submission Process:

If a user is on the primary chain (Ethereum Sepolia), the vote is directly recorded and stored on-chain in the smart contract. If a user is on the secondary chain (Base Sepolia): The user interacts with the smart contract on Base Sepolia to cast their vote. The vote is not stored locally; instead, it triggers a cross-chain transaction via Chainlink CCIP. Chainlink’s CCIP transports the voting data securely from Base Sepolia to Ethereum Sepolia. The Ethereum Sepolia smart contract receives the message and processes the vote, ensuring that all votes are centrally recorded on this chain. Security and Trust:

Sign Protocol is integrated to ensure that every vote sent across chains is authenticated and cannot be tampered with during transmission. The integrity of the cross-chain message, including the user’s vote, is protected by Chainlink CCIP’s secure messaging framework. Only votes validated by the smart contract on the primary chain are counted toward the final tally.

Final Tally:

Once the voting period ends, the voting results are collected and stored on the primary chain (Ethereum Sepolia). All votes, regardless of whether they were cast on Ethereum Sepolia or Base Sepolia, are reflected in the results, ensuring complete transparency and consistency. Users can verify their votes through the public ledger on Ethereum Sepolia.

Key Features

Cross-Chain Interoperability: By leveraging Chainlink CCIP, OmniVote enables users from different blockchains to participate in a unified governance process, bridging the gap between chains.

Single Point of Truth: All votes are ultimately stored on a single chain, reducing the complexity of managing multiple voting tallies across chains while ensuring that all users can participate regardless of which chain they’re on.

Secure Communication: Chainlink CCIP ensures that messages transmitted across chains are secure, reliable, and verifiable, ensuring that votes are counted exactly as they were cast. Scalability: By decentralizing the voting process across multiple chains, OmniVote allows DAOs to engage more users across various blockchain ecosystems, encouraging broader participation in governance decisions.

Example Use Case

Consider a DAO that has governance proposals stored on Ethereum Sepolia. A user who holds tokens on Base Sepolia can still participate in the vote by interacting with the OmniVote contract on Base Sepolia. Instead of storing the vote on Base Sepolia, Chainlink CCIP ensures that the vote is securely sent to Ethereum Sepolia, where it is recorded and counted with other votes.

In this scenario, the user’s voting experience is seamless, but the infrastructure ensures the vote is centralized for easy tallying and transparency, regardless of which chain the user is on.

OmniVote provides a powerful solution for cross-chain decentralized governance, using Chainlink CCIP to create a seamless and secure voting experience across multiple blockchains. By storing all votes on one chain and using cross-chain messaging to relay votes, OmniVote simplifies the voting process, ensuring broad participation and accurate results.

How it's Made

OmniVote is the result of combining multiple modern technologies to create a decentralized, cross-chain voting platform that allows users to seamlessly participate in governance decisions across different blockchain ecosystems. Below is a detailed breakdown of the technologies and design choices that brought OmniVote to life:

Technologies Used

Frontend:

Next.js: OmniVote’s frontend is built with Next.js, a powerful React framework known for its server-side rendering, static site generation, and API capabilities. It provides the foundation for creating dynamic, high-performance user interfaces while handling complex logic behind the scenes.

shadcn: Used as a component library to streamline UI design and ensure a consistent user experience. It simplifies the creation of modular, reusable components for forms, modals, and other interactive elements.

Tailwind CSS: Tailwind is used for rapid and responsive styling of the frontend. It allows for quick and easy customization of the UI without writing verbose CSS, making it easier to maintain styling consistency across the application.

Backend:

MongoDB: MongoDB serves as the database for storing and querying essential platform data, including proposals, DAOs, and votes. MongoDB's document-based structure makes it ideal for handling the dynamic nature of proposal data, allowing for flexible queries and rapid development.

SignProtocol: SignProtocol is integrated into the backend to store and query attestations, which play a vital role in verifying the authenticity and integrity of votes. By relying on SignProtocol, OmniVote ensures that votes are securely signed and can be easily verified later, which adds an extra layer of trust.

Web3Auth: For user authentication, Web3Auth is used to enable decentralized and seamless login functionality. It abstracts away the complexity of dealing with wallet addresses and private keys, making it easier for users to authenticate without sacrificing security. Web3Auth supports multiple authentication methods, including wallets and social logins, to streamline user onboarding.

Smart Contracts:

Solidity: The smart contracts that power the core voting mechanism are written in Solidity. These contracts are deployed on both Ethereum Sepolia and Base Sepolia to support voting on two different chains. One chain acts as the primary chain (Ethereum Sepolia) for storing votes, while the other chain (Base Sepolia) interacts with the primary chain through Chainlink CCIP. The smart contracts manage:

Creation of proposals and voting rounds.

Recording votes and verifying eligibility.

Interacting with Chainlink CCIP to handle cross-chain communication.

Chainlink CCIP:

Chainlink CCIP (Cross-Chain Interoperability Protocol) is the core cross-chain messaging layer used in OmniVote. It allows smart contracts deployed on Ethereum Sepolia and Base Sepolia to communicate with each other. Chainlink CCIP ensures that a user’s vote on Base Sepolia is securely relayed to Ethereum Sepolia for tallying. The use of CCIP ensures that votes are counted only once, no matter which chain they originate from, while providing a seamless user experience across chains.

Building Process

Frontend Development:

Using Next.js, the frontend was built to be fast and responsive, handling the logic for form creation, proposal submission, and voting seamlessly. The integration with shadcn and Tailwind CSS helped create a clean, modern UI. With Next.js’ API routes, backend calls to MongoDB for querying proposals and DAOs were efficiently handled.

Backend and Storage:

MongoDB was integrated to store the data for proposals, DAO details, and voting records. Since MongoDB is schema-less, it allowed rapid iteration of data models as requirements evolved during development. SignProtocol was used to store attestations. It is integrated to verify that votes are valid and authenticated, ensuring no fraudulent activity takes place in the voting process.

Authentication:

Web3Auth is used to manage decentralized authentication. This allows users to log in using crypto wallets or other social sign-in methods, making it easier for users to participate in the platform without friction. By abstracting away private key management, Web3Auth enhances security while keeping the login process user-friendly.

Smart Contract Deployment:

The smart contracts were developed in Solidity and deployed to Ethereum Sepolia and Base Sepolia testnets using Remix. These contracts manage the core logic of the voting process, from the creation of proposals to tallying votes. By using Chainlink CCIP, cross-chain voting was made possible. When a vote is cast on Base Sepolia, it triggers a message to be sent to Ethereum Sepolia for recording. This ensures that all voting data is ultimately stored in a single place, making it easier to compute the final vote tally while preserving decentralization.

Notable Hacky Solutions

Cross-Chain Message Optimization:

One interesting challenge was efficiently sending and receiving messages between the two chains. To minimize gas fees, only critical data (such as the voter ID and proposal ID) is sent across the chain using Chainlink CCIP. This optimization ensures that the voting process is cost-effective for users, especially when votes need to be relayed across chains.

Benefits of Partner Technologies

Chainlink CCIP: Using Chainlink CCIP was essential to enabling cross-chain voting in OmniVote. Without it, we would have needed to implement our own cross-chain messaging protocol, which would have been complex and potentially error-prone.

Web3Auth: By using Web3Auth, OmniVote significantly simplified the user authentication process. Users can sign in quickly without needing to manage private keys, making the platform more accessible to non-crypto-native users.

SignProtocol: Integrating SignProtocol provided a layer of trust for the vote attestations. By storing attestations in a decentralized manner, we ensured that each vote can be traced and verified independently, improving transparency.

Conclusion

OmniVote was built with a stack of modern web and blockchain technologies, integrating decentralized tools like Chainlink CCIP, SignProtocol, and Web3Auth to deliver a scalable, secure cross-chain voting system. By combining the power of Solidity for smart contracts and MongoDB for flexible data management, the platform offers a seamless and efficient user experience across blockchains.

background image mobile

Join the mailing list

Get the latest news and updates