This project is a decentralized system that allows users to vote on various projects using blockchain-backed technology based on the well known "This-or-That" Game. The system ensures transparency and accuracy in calculating project scores and provides intelligent project recommendations based on user votes. It involves several key components, including an algorithmic scoring system, a project recommendation system, and a detailed user journey flow.
- JUDG3
The system uses multiple mathematical models to compute a project's score based on the user votes:
- Self Convergence Model: Ensures that the system reaches a stable score for each project as votes accumulate.
- Bradley-Terry's Score Updating System: Uses a pairwise comparison model to update project scores based on matchups between projects.
- Geometric Mean Calculation: Normalizes the votes and calculates an average performance metric across all projects.
- Score Normalization: Adjusts scores to ensure they fit within a specific range, making comparison easier.
The system recommends projects for users to vote on based on a probability-driven approach:
- Probability Calculation:
- If the probability of a project being recommended is below a threshold (ε), the system randomizes the project.
- If the probability exceeds ε, the system performs information gain and entropy calculations to select a project with the maximum information gain.
- Project Randomization: Introduces random projects for more diverse comparisons.
- Checking for Duplicates: Ensures that users don't get the same project recommended twice consecutively.
- Recommend Project: Selects and recommends the project based on the criteria outlined above.
The user journey begins with project organizers and voters, and follows these steps:
- Event Creation: Organizers create events where users can vote on projects.
- Voter Approval: Organizers approve voters for specific events.
- Open Voting: Once approved, voters are allowed to vote on various projects.
- Live Leaderboard: After votes are cast, a live leaderboard is generated.
- Post Voting: Voters can see the final leaderboard after the voting period ends.
This structured journey ensures that only approved voters can participate, and the process is managed securely with clear updates.
The system is designed with the following components:
- User: Each user has a unique identifier and associated attributes such as verification status, address, etc.
- Vote: Represents the act of voting on a project. The winner of a project matchup is recorded.
- Project: Each project has a unique ID, name, description, and media such as photos.
- Event: Organizers create events in which users vote on projects.
- Application: Users submit applications to join events, and the system manages the approval process.
- ProjectMatchup: Keeps track of project matchups (i.e.,
project1_wins
,project2_wins
). - UserPairing: Matches users to projects for voting.
- Leaderboard: Displays the live status of projects based on votes.
The architecture ensures scalability, user-specific data handling, and smooth interaction between the different components.
This project contains smart contracts designed to manage voting on projects using a blockchain-based system. Below are the deployed contract addresses and their descriptions on various networks.
- Contract Address:
0xee884352e5d52524
- Description: This smart contract manages the core voting functionality on the Flow blockchain. It registers projects using unique project IDs and allows users to cast their votes securely. The contract leverages Flow’s efficient consensus mechanism for fast and low-cost voting transactions.
- Project Registration: Allows project creators to register their projects using unique IDs.
- Voting Mechanism: Secure and scalable voting with fast transaction finality.
- Low Transaction Fees: Thanks to Flow's architecture, transaction costs are minimized.
- Contract Address:
0x6905DC4f9e8eDb26cC06e7f08a9fd5650EBB1caA
- Description: Deployed on the Morph Testnet, this contract supports decentralized voting by registering projects and collecting votes using project IDs. It is optimized for reducing gas fees, storing minimal data on-chain while maintaining the integrity of the voting process.
- Gas Optimization: Minimizes gas costs by storing only project IDs on-chain.
- Project Voting: Users can securely vote for projects via a simple interface.
- Testnet Deployment: Currently deployed on Morph Testnet for testing and scalability purposes.
- Contract Address:
0x2181Aa3499699D4873EE25fc679A7c3F39e6B644
- Description: This contract utilizes Oasis Protocol’s privacy-preserving smart contract features to handle voting. It ensures that votes are cast securely and privately, protecting user identities and project details.
- Confidential Voting: Uses Oasis Protocol’s confidentiality features to protect voter privacy.
- Secure Vote Casting: Voting is securely processed and recorded while maintaining user anonymity.
- On-chain Voting Integrity: Despite privacy, the voting process remains transparent and verifiable.
- Contract Address:
0x35b037E8b52C0522aa0A0Ab87B724A52077C7300
- Description: This contract is deployed on the Linea Testnet and integrates the Verax SDK to provide attestations for each vote. The voting system uses the Linea network for transparency and integrity but excludes MetaMask integration, focusing solely on attestations and verifiable data.
- Attestation System: Each vote is accompanied by an attestation via Verax SDK, adding a layer of credibility.
- Testnet Deployment: Deployed on the Linea Testnet for testing the integration of attestations into a scalable voting system.
- Transparent Voting: Ensures transparency in voting, with verifiable records but no dependency on MetaMask integration.
- Flow Network: Optimized for low-fee, high-speed transactions, ideal for fast project voting.
- Morph Network: Testnet deployment focusing on gas-efficient voting for scalability testing.
- Oasis Protocol: Designed for privacy-first voting systems, ensuring user and vote confidentiality.
- Linea Verax: Focuses on verifiable attestation-based voting without MetaMask, ensuring credibility and transparency.
- Clone the Repository: Clone this project to your local machine.
- Install Dependencies: Run the following command to install the necessary packages:
npm install
npx hardhat run scripts/deploy.js --network <network_name>
To run this project locally, you'll need to have the following installed:
- Node.js: Used to run the backend.
- Hardhat: For smart contract deployment and testing.
- Verax SDK: For creating attestations during the voting process (for Linea Testnet integration).
-
Clone the repository:
git clone https://github.com/your-repo/voting-system.git
-
Frontend:
cd frontend
npm i
npm run dev
- Backend:
cd backend
virt\Scripts\activate
pip install -r requirements.txt
python manage.py makemigrations
python manage.py migrate
python manage.py runserver
Our team is composed of highly passionate developers, data scientists, and blockchain enthusiasts committed to building innovative solutions for decentralized voting systems. We bring expertise from various domains including machine learning, full-stack development, cryptography, and blockchain technologies.
- Hussain Pettiwala - Backend Development
- Gaurish Baliga - Backend Development
- PargatSingh Dhanjal - Full Stack Development
- Rahul Dandona - Backend and Smart Contracts Development