Skip to content

jinilshah21/Lottery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Lottery

A lottery system using solidity


It is a lottery system inspired from ancient Chinese lottery game. How does the lottery work ? The lottery is managed by a manager externally. Manager interacts with the smart contract to see the total balance and declare the winner.

  1. Each player has to deposit a fixed amount of ETH which is 1 ETH to the smart contract.
  2. Player is allowed to make multiple deposits which can increase chances of winning
  3. Manager can declare a winner once there are a minimum of 3 participants in the lottery.
  4. A very large number is created using blocks-timestamp and difficulty
  5. This number will be divided by number of players
  6. Remainder will be the index of the array of players registered sequentially.
  7. Winner is declared and is transferred the total balance of the lottery smart contract.
WINNER IS DECLARED!!!

About

A lottery system using solidity

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published