REQUIRES HASHPACK WALLET BROWSER EXTENSION WITH TESTNET ACCOUNT TO WORK
Inspiration
“Give a man a fish, and you feed him for a day. Teach a man to fish, and you feed him for a lifetime.” - Someone. While communal organizations such as soup kitchens are key pieces to solving the food insecurity puzzle, providing individual meals is not the ideal way of feeding the students in need. Instead, directly providing groceries or funds to buy groceries is a more efficient and longer term solution. However, a problem that many traditional charity funds have is that of lack of transparency and accessibility. Indeed, the payout process is usually very slow since traditional payments systems are tedious, and it is often difficult to verify where the donated funds are being used because they are held in private bank accounts. This is where I came up with the idea of The People’s Potluck.
What it does
The People’s Potluck is a semi-decentralized charity fund powered by blockchain that allows people to give what they can, and take what they need. Blockchain solves both of the mentioned issues: 1) Since everything is public and visible on the blockchain, it is easy to track where the funds are going. Additionally, all donated funds are held in a smart-contract, not an individual’s account. 2) Users can withdraw funds directly from the donation pool without a middleman.
Patrons put funds directly into the donation pool. The donation treasury is a smart-contract, not an individual’s bank account.
Students in need can then apply for an access card in the form of an NFT that entitles them to a fixed amount from the treasury every 30 days. To prevent abuse, the application includes some identification like a phone number verification and proofs of income and enrolment. After their application is approved, students with an access card may withdraw funds directly from the treasury and receive them instantly. No need to wait for us to send it!
This project is entirely non-profit. 100% of the donated funds go directly into the treasury. The only fee that exists is the gas fees that everyone pays, but these are negligible on Hedera. There is no token/coin to speculate on. The NFT is purely an access card. It has no value on the market since it is bound to the person who applied for it.
How we built it
The application is built on the Hedera network using the Hedera SDK for JavaScript. The smart-contracts were written in Solidity. The frontend is built with React and Material UI. The backend is built with Flask. The SMS verification uses the Twilio API. The wallet integration is powered by HashConnect. I used PostgreSQL for my database. The backend is hosted on Heroku, the frontend is on Firebase, and the smart-contracts live on the Hedera test network.
Challenges we ran into
This was my first time building something that interacts directly with a blockchain. I had to learn a new language in Solidity to write the smart-contracts. I also had to familiarize myself with the Hedera hashgraph and its SDK in order to actually use the network. Debugging my smart-contracts was also very difficult because I could only see if it broke, not where and why, after it was deployed on the testnet. Any changes I made had to be redeployed on the network, which was very tedious.
Accomplishments that we're proud of
I am really proud of the range my project covers. It goes beyond the typical fullstack of frontend and backend, and adds the additional layer of blockchain. Like I mentioned, this was my first time writing smart-contracts in solidity and interacting with the Hedera network, so I am very proud that I was able to figure everything out in so little time. I actually surprised myself with how well I juggled everything I had to do being a one-man-team and all.
What we learned
The two main things that I learned are how to write smart-contracts in Solidity and how to integrate the Hedera network using its JavaScript SDK.
What's next for The People's Potluck
The main goal moving forward is to find more ways to decentralize and de-trust the application. In an ideal world, the charity is entirely decentralized and crowd managed. As it stands, the project can only be considered semi-decentralized since it still requires a centralized entity (me) to verify and approve the access card applications. If anyone could access the fund, then it would quickly be abused and drained.
One realistic way to do this is by decentralizing the approval process. I could divide and delegate the approval power to many existing food security non-profits, so that in order for a student’s application to be approved, multiple trusted entities must agree. Since I currently hold sole power over who gets access cards, I could theoretically give myself infinite access cards and drain the treasury (but I would never do that :P, plus it’s fake testnet money right now). Having multiple approvers removes that possibility.
The idealistic solution that could potentially fully decentralize the project is by using zero-knowledge proofs, which removes the need for centralized approvers (like me) entirely. In a perfect world, people could give and receive funds directly from each other, but how could the giver be sure that the receiver is someone in need? Giving sensitive information like ID and proof of income to a stranger online is a terrible idea, so how can we use the peer-to-peer model? Well, receivers can cryptographically prove their identity and that they are in need to the giver using zero-knowledge proofs, which reveals nothing about their ID and income. However this technology is still in its infancy and is a topic for another day :)
Built With
- firebase
- flask
- hedera
- heroku
- javascript
- material-ui
- postgresql
- python
- react
- solidity
- twilio
Log in or sign up for Devpost to join the conversation.