I'm design a lottery smart contract. The lottery is like this:
- the lottery will be drawed everyday;
- 24 hours of one day is split to active period(23 hours), freeze period(30 mins), and draw period(30 mins);
- users can bet and apply for reward only in active period;
the contract use the latest 6 blockhash, and current block's timpstamp as seed to generate random, because no-one can bet in freeze period and draw period, no-one can bet a set of number base on a known blockhash.
Is it a safely design for a lottery smart contract?
still more. i plan to using the latest 6 blockhash to generate the randomness, like this:
it will consume more gas. but, is it safe?