Created by
Jack

How to generate a random number in a way that everyone can verify is fair even if they don't necessarily trust each other. One name for this is a "public randomness beacon".

Update: We have a Manifold bot that you can easily use to generate secure, verifiable public randomness! See https://manifold.markets/FairlyRandom. This implements the method I proposed below.

Here are some methods:

  • Some website that publishes random numbers periodically, for example daily. E.g. https://avkg.com/en/daily-random/ (the first google result for "daily random number"). Downsides are that you only get them once a day. (If anyone finds a website like this that does hourly numbers, please let me know!) Numbers from some random website might be manipulated or hacked - definitely not suitable for high-security applications (but probably fine for manifold markets)

    • Or maybe lottery draws - many of these are published. But lottery numbers might be statistically biased.

  • Blockchain: Take the first block published after some pre-specified timestamp (e.g. midnight UTC), and use the last N characters of the hash as a random value. See https://manifold.markets/jack/resolves-yes-1-chance-na-99-chance for example. Downside: blocks are published at unpredictable intervals, and there's some small chance of disagreement about block timestamps, or short-lived forks. I'd suggest using e.g. Ethereum rather than Bitcoin, so you don't have to wait as long for the random number to be generated.

  • I believe the ideal way to do this is with a true public randomness beacon, which generates random numbers periodically (e.g. every minute) and publishes and signs them cryptographically to provide strong verifiability and security properties. Unfortunately, the current implementations I am aware of don't work very well.

In general, to avoid using the same random values for multiple different things, you would want to use hash(concat(public randomness beacon value, nonce)) where nonce is published in advance (e.g. the market ID).

Also, Manifold could provide a RNG service as a built-in feature! That would make things a lot easier. The simplest method I can think of is Manifold just adds a bot that comments with a random number upon request. E.g. I post a comment @RngBot 1-20 and it replies with a random number between 1 and 20. (Even better would be if that bot sources the random number from a public randomness beacon instead of just using a local RNG, so that you don't have to trust the bot's security. It can get the next RNG value from a public beacon, and combine it with the comment id of the requesting comment as the nonce.)

Some related discussion: