Inspiration
I've used snapshot.org in the past for voting in different platforms and chains but stacks is not included in their list of L1 chains so I though I could build one for this hackaton.
What it does
Tohyo (vote in Japanese) is basically a decentralized voting system running on stacks. It provides flexibility when creating proposals allowing the user to...
- Choose different SIP010 tokens to allocate votes for an option (DIKO, stDIKO and USDA for the testnet, more tokens coming in the future)
- Personalizing a proposal with different options and ways to vote
- Adding a time limit to vote (based on blocks)
- Creating groups that can be managed by multiple accounts. These groups will be able to create and manage proposals.
How we built it
I've used the following technologies:
- Clarity
- IPFS (using infura.io) to save proposal details.
- React
- Netlify
Challenges we ran into
As this was my first app using the stacks network (I have little experience with solidity), learning Clarity was a big challenge. Coming from object oriented languages like Ruby or Python, learning Clarity was a big shock at first, but after a while it grows into you. Once you get the concept of the language you see the good things and flaws of object oriented languages.
Accomplishments that we're proud of
- Learning Clarity and being able to write two different big and useful contracts
- Learning the clarinet framework
- First time creating a React app and deploying it (I work as a backend developer using Ruby, so this was a first :D)
What's next for Tohyo - A decentralized voting system plaform
As this was a project for a hackaton, lots of things were missed when it was first deployed. This list includes the next ideas:
- Tests for react components - Clarity contracts have tests that can be executed running
yarn clarinet:testand live in thecontracts/testsfolder. - LOTS OF UI/UX improvements (there are no notifications right now and some transitions are clunky)
- Block tokens when an user vote.
- Accept multiple tokens for the same proposal (stDIKO and DIKO could be used in the same proposal).
- Use SIP009 (NFT tokens) to be counted as voting power.
- Vote to multiple options for the same proposal.
- Tracker for the transactions, we can even show a notification when your vote function has been processed correctly and the transaction has been confirmed.

Log in or sign up for Devpost to join the conversation.