Inspiration
This project is a usecase for the provable number generator from HPB.
What it does
It runs a lottery contest automatically triggered by the participants. Each participant who will keep entering enters the contest will make a deposit of the contest prize, so when the quorum for the contest is achieved, the winner is chosen (using the HPB random number generator) and the prize is promptly sent to the winner discounted a participation fee. For the startup deployment, the quorum was defined as 100 participants, with a ticket price of 0.1 HPB, and a 5% fee.
How we built it
Solidity + last night deadline with a huge cup of coffee + some miracle (and a ton of willpower).
Challenges we ran into
Time. I didn't want to giveup participating the hackaton, blockchain is currently presenting great business and development opportunities, which is awesome, but sometimes it's hard to find time for hackatons. This one I didn't wanted my submission let go away, so I'm double shifting to make it happen. So, didn't have time to finish a frontend, in order to run the system you need to go to hscan (verified) and run the contract from there (and yeah... probably we should test a bit more).
Accomplishments that we're proud of
I believe had made some useful contributions into HPB community based on some improvements from hscan, verification, token generation and some suggestions to improve the hscan profile. Maybe not directly related to the hackaton itself, but they were consequence of it (since the engagement with the community started with the hackaton).
What we learned
- How to use the HPB provable random number generator.
What's next for Fare Lottery
If I were to make some improvements, I would :
- Test, test and test. Run a beta, run an alpha. Just deliver after all batches finished
- Document the architecture
- An attractive and simple frontend, React would suffit
Log in or sign up for Devpost to join the conversation.