D
DeLotto
A decentralized, trustless, and automated web app to play Lottery Games deployed on Polygon. It is not the normal Lottery dapp that is available all over youtube, we have made some important changes.
Created on 3rd April 2022
•
D
DeLotto
A decentralized, trustless, and automated web app to play Lottery Games deployed on Polygon. It is not the normal Lottery dapp that is available all over youtube, we have made some important changes.
The problem DeLotto solves
- Trustless: You don't need to trust the company for fairness in selecting a winner. (Web 2 companies have centralized servers, they can maybe select a friend of theirs as the winner and take some commission from the prize money)
- Reliable: The prizes and the means by which they are delivered to winners will be guaranteed by smart contracts. (Eliminating the cases where the Lottery Organizing Body sold their tickets and just ran away)
- Transparent: The immutable nature of the blockchain ledger means that all data on ticket sales, who picked the winner, and who won will be safely stored and all the data is available to the public. (In Web 2 these data are available only to some people with special powers)
- Infallible: Due to its autonomous nature, blockchain tech eliminates the need for human intervention.
Challenges we ran into
- The transactions were getting failed on Mumbai Testnet via Metamask. There is currently some issue with the Infura Nodes which Metamask uses, so we have to edit the RPC URL in the MetaMask settings with Alchemy URL. This issue was very frustrating because it was not anywhere on the internet but finally, a gentleman from one of the discord communities I am part of, helped us to resolve the issue.
- How to implement timer in smart contracts and random number generation in smart contracts. All the languages we have previously worked with have some kind of random number generator, but that is not the case with solidity. This issue was of a moderate level as we were able to get blogs and tutorials discussing the issue with some effort on the Internet.
- Understanding and using events was a bit tricky, well to be honest while researching, I found it can be improved further using The Graph, but due to the time limit, I have decided to implement it after the hackathon ends.
Discussion
Builders also viewed
See more projects on Devfolio