Inspiration

We took an inspiration from a DAO contract where a proposal i.e. charity based is accepted based on votes by the members.

What it does

We added a simple type of proposal where the proposer can enter the stack address of an organisation whom he thinks should get DAO tokens as charity. The DAO tokens are used to vote in this system and users can get those tokens on registration using their STX. Charity Organisations can convert those tokens back to STX using this contract. It is assumed that the contract owner will add tokens and funds in the contract initially to make it work.

How we built it

We built is using FT tokens to work as a token for the system interaction and DAO contract for members to vote to select the winner. We used block-height for the proposals to be processed and assume that the front end will be calling this function after a specific block-height is reached (currently it is every 10 blocks). We also added a conversion rate for the DAO Tokens i.e 1 STX = 1 DAO Token and gave a 100 tokens to the users who registered in their wallet so that they can start proposing and interacting. We kept it limited to 100 members only so that people don't abuse it. We used a pattern i.e. Register -> Propose -> Process -> Evaluate -> Execute -> Reset and each user and proposal goes through this pattern for execution.

Challenges we ran into

We ran into the challenges of making the contract public for everyone but still limit it to the verified people. So we used FT concept so that only people who own this token can unlock the interactions with the contract.

Accomplishments that we're proud of

We are proud of how we managed to write the voting system and its execution by using folds on the processed proposals lists and finding the winner based on vote-difference. Also, we achieved more than 90% test coverage.

What we learned

We learned how a FT can be used to limit the users of the contract and how DAO can be used for different applications in the real world.

What's next for Velcoity DAO - Charity

We will try to make a website out of it on React and see the capabilities of contract.

Built With

Share this project:

Updates