A fully decentralized and permissionless voting smart contract built on the Stellar Soroban platform using Rust.
This project implements a Simple Voting System where:
- Anyone can create a poll
- Anyone can vote
- No admin or central authority exists
- Each address can vote only once per poll
The contract is designed with true Web3 principles — open, transparent, and trustless.
-
🔓 Permissionless Poll Creation Any user can create a poll with a question and options.
-
🗳️ Open Voting System Any user can vote on any poll.
-
🚫 No Admin Control No special privileges — fully decentralized.
-
✅ One Vote Per Address Prevents duplicate voting using address-based tracking.
-
📊 On-Chain Results Vote counts are stored and retrieved directly from the blockchain.
- Blockchain: Stellar Soroban
- Language: Rust
- SDK: soroban-sdk
-
Poll
id: Unique poll IDquestion: Poll questionoptions: List of voting options
-
VoteCount
counts: Mapping of option → number of votes
Creates a new poll.
Parameters:
poll_id(u32): Unique ID for the pollquestion(Symbol): Poll questionoptions(Vec): List of options
Allows a user to vote on a poll.
Parameters:
poll_id(u32)voter(Address)option(Symbol)
Rules:
- A user can vote only once per poll
- Requires authentication (
require_auth)
Fetches poll details.
Returns vote counts for each option.
-
Permissionless by Default No admin-only functions or restricted access.
-
Sybil Resistance (Basic) One vote per blockchain address.
-
Transparent State All data is publicly accessible on-chain.
- ❗ Poll IDs must be unique (handled off-chain)
- ❗ No time limits for polls
- ❗ No vote editing or deletion
- ❗ Basic randomness (if extended for lotteries, etc.)
- Deploy the contract on Stellar Soroban testnet
- Call
create_pollwith your question and options - Users call
votewith their choice - Fetch results using
get_results
-
Logo: VoteChain / OpenVote
-
Navbar:
- Create Poll
- View Polls
-
Hero Text:
"Create and vote on polls — no permissions, no limits."
- Add poll expiration time
- Store metadata using IPFS
- Improve UI/UX with React
- Wallet integration (Freighter)
- Gas optimization
Feel free to fork and improve this project. Contributions are welcome!
MIT License
Built with the vision of enabling free, open, and censorship-resistant voting systems using blockchain technology.
contract address : CDVVUMLYNC2LEGRATMIEJHA3U5GF3DSIKCU6MH6NMFEJA2R76SCVBWQ4
wallet address : GAYS4ZCG2GDJB7BS4MXSEHJC2ZZOQOBS5SQDV2GPTDJTY5JWIOTO6SRP