Inspiration

We think it is a good idea to create a Lottery game to learn about all the web3/dapp process.

What it does

What we develop is a Lottery game. The idea is to guess a number between 1 and 5 (for example). Obviously this is set when deploying the contract, apart from this value you also enter the cost of playing on WEI, the commission that the platform receives and the ID of the CHAINLINK VRF subscription. The game works as follows. The player connects with an address with metamask or some supported wallet. Then enter a number from 1 to 5 (in this case). Then accept the transaction. The user can play other numbers if they wish but cannot play again with the same address on the same number on the same day. The round of the game is repeated daily so that the number generated is obtained from the next day. If there are several winners who have selected the winning number, the prize is distributed among the winners.

Networks: sepolia, polygonAmoy

Example :

```5 people played and 2 won (the value of playing is 10 wei).

The value raised in the round is 50 wei

The winners would get:

50 wei - 10% (commission) = 45 wei

Each player would receive 22 wei.

The platform would receive 5 wei```

It should be noted that the user must go and claim his winnings. The draw function should be run manually each day.

How we built it

We develop a web3/dapp for this project using VRF with subscription.

Challenges we ran into

All this kind of apps has severals challenges, like security in smart contracts, ui design, and integration between blockchain and frontend.

Accomplishments that we're proud of

We are completely proud of this product that allows you to play a betting game in a very simple way. When making this game we had to think in very detail how to make a game that allows the user to earn money and that all parties are happy.

What we learned

We learn about how the whole app process is.

What's next for Tombola

  • improve the UI
  • More reports in list tab
  • The draw call should be call automatically, Now it is manual.
  • Add more similar lottery games to make the user be fun more time without borring.

Built With

Share this project:

Updates