Problem Statement
A lottery organization is facing the challenge of designing a fair and transparent lottery system that ensures randomness and equal chances of winning for all participants. The organization needs to consider factors such as the number of tickets sold, the prize amount, and the rules of the game to ensure that the lottery system is secure and trustworthy. A real-life example is the growing popularity of decentralized finance (DeFi) and the need for decentralized lottery systems that can be used within the DeFi ecosystem. These systems need to ensure that the drawing of the winning numbers is done in a decentralized and tamper-proof manner, and that participants can securely purchase lottery tickets using cryptocurrency.
Solution
In a blockchain-based lottery system, a smart contract is used to define the rules and logic of the lottery. The smart contract is deployed on a blockchain platform, such as tezos, and is accessible to anyone with an internet connection. 5 participants buy a ticket to the lottery using 2 tezos coins. One of them is randomly selected and 80% of the total amount collected and the rest 20% is given to the operator of the lottery The Smart contract is made using python on tezos blockchain using the smartpy library. The front-end is made using React-JS, and the wallet used is Temple Wallet.
Future Scope And Applications
In the future, the participants of the game can be awarded NFTs as a proof their coin has been deposited. The Number of participants can be increased and the Prize pool increases significantly. Multiple tier prizes (1st, 2nd, and 3rd) can also be implemented. Multiple Games of chances and skills can be introduced. Operators commission for running the Lottery can be reduced which will eventually increase the prize amount.
Technologies Used
React JS Taquito JS BootStrap Temple Wallet Python (SmartPy) Tezos Blockchain
Built With
- blockchain
- bootstrap
- javascript
- python
- react
- smartpy
- taquito
- temple
- tezos
- wallet
Log in or sign up for Devpost to join the conversation.