I've read about the problems of randomness in smart contracts (basically that a miner can decide not to publish the block if he doesn't win or benefit otherwise).
What if someone posted a lottery contract where anyone could participate, and the price was huge (for example millions of dollars worth of ETH). Could we expect all miners start to mine but decided not to publish if they're not winners? If so - are there any protections against such situation?
I imagine - if all miners started to do this and ignore the network, then some miners that decide to ignore the lottery would emerge. They will start mining transactions as usual and maybe get ahead of the "greedy miners".
At some point one "greedy miner" get's the block on top of the current blockchain where he wins (and other competing miners can decide to pursue, but their chance diminishes with each block).
1/ Is this path of thinking correct? Is this how the network would behave in an autocorrecting fashion?
2/ If that's the case - why should we worry about dishonest miners when implementing randomness in our contracts? (I must miss some crucial understanding here)
3/ And a bit more speculative question: would chase after lottery be any more profitable than just honest mining?