pull down to refresh
100 sats \ 1 reply \ @Jon_Hodl 24 Mar \ on: LN Roulette – A Lightning-Powered, Provably Fair Roulette Game bitcoin
Is there any way for you to prove that the winning number is not predetermined and that you’re using a legit RNG?
I get that you publish the hash + salt before hand and we can verify that the winning number isn’t modified between when the bets are placed and when the ball finally hits a number.
…but how do we know that you’re not collecting data based on how people are betting and then picking the numbers that receive the least amount of bets?
The key to proving fairness in RNG-based games lies in implementing a "commit-reveal" scheme that makes it mathematically impossible to manipulate the outcome after seeing the bets. Here's how it typically works:
Pre-commitment: Before any bets are placed:
Generate a random seed/number
Create a cryptographic hash of this number (plus optional salt)
Publish this hash publicly
Betting Period: Players place their bets while only knowing the hash
Reveal: After betting closes:
The original seed/number is revealed
Anyone can verify that:
a) The hash matches the revealed number (proving it wasn't changed)
b) The number is used in a deterministic way to generate the outcome
The critical point is that once the hash is published, it's cryptographically impossible to find a different number that would produce the same hash.
This means:
We can't change the number after seeing the bets
We can't "work backwards" from desired outcomes to find a matching number
The number must have been chosen before any bets were placed
To further enhance transparency:
Use a verifiable source of randomness for the initial seed (like blockchain block hashes)
Make the entire process open source
Provide tools for users to verify each step independently
This system mathematically proves that:
The outcome was determined before betting started
It couldn't be modified based on betting patterns
The operator cannot manipulate the result
The beauty of cryptographic proofs is that you don't have to trust the operator - you can verify everything yourself!
reply