I would be thankfull for any comments on the lottery I have developed.
- each participant can buy coupon (0.01, 0.1, 1 or 10 ether value)
- after that he/she is put in proper coupon round
- each round consists of 100 participants
- random number generation process is triggered by using runSweepStake function, which works only for full rounds (100 participants)
- winners get: 1x 25%, 4x 10%, 4x 5%, 4x 2.5% and 2x 2% if the random number is odd
- after the winners are chosen they can withdraw their prize by calling prizeWithdraw function
- author is only getting some part (4%) of gathered ether if the generated random number is even
- author can't withdraw any remaining balance until some certain requirements are met: lottery is stopped, everybody have withdrawned their prizes, etc.
- the code is focused on honesty against players
Contract addresses (code verified on etherscan):
rinkeby (testnet): 0x50ac8dfdc7e0a4e10566a31c7ab8d65e7d213cf0
You can take part in the sweepstake by calling join() function and send ether: 0.01, 0.1, 1 or 10 - depends in which stake you want to take part.