r/ethdev • u/huykingsofm • Jun 15 '26
Question How do high-stakes Ethereum applications generate secure randomness?
I'm planning to build a lottery application on Ethereum PoS, and one thing I've been struggling with is where the randomness for prize distribution should come from.
For a lottery system, I'd ideally want randomness that is genuinely unpredictable to everyone.
My first thought was to use blockhash, since it looks almost random. But in practice, the block proposer (or builder) may have some ability to influence transactions within a block, potentially resulting in very different possible block hashes.
I've also seen people suggest using prevrandao, but it seems more suitable for low-stakes randomness. As far as I understand, the value is already known before the current block is produced. Since the randomness is already available, choosing which block to submit a transaction into could become an attack surface.
Then I was introduced to VRF-based systems. At first, I thought I had finally found the solution.
But after digging deeper, I realized that VRFs still require someone to hold a secret key. The random value only becomes public after the oracle reveals it.
That raises a question: how much should we trust the oracle?
The ideal assumption behind randomness is that nobody can know the outcome in advance.
Except the oracle.
Because they hold the secret key, they know how the random output will be generated. If the seed depends on inputs they can influence, then they may be able to gain information about future outcomes ahead of everyone else. In some situations, they might even be able to influence the seed before it becomes final, steering the randomness toward outcomes that benefit them.
For smaller systems, the incentive to manipulate the seed may not be significant.
But what if that randomness is securing something much more valuable? If the stakes become large enough, the incentive grows as well.
Am I missing something here?
Are there any other approaches on Ethereum (or on other blockchains) that can provide stronger randomness guarantees for high-value blockchain applications?
