Looking at the lottery game, where a ticket gives you 0.00000715% chances of winning the pot, how in the hell is the player favoured or the casino having ONLY a 3% edge here when in fact the casino has a 99.99999% edge? Are you on drugs or something? You are clearly out of your fucking mind to even state stupid shit like this. If you want to at least "look" intelligent, better shut up. If you want to BE intelligent, do your homework first and then start posting.
You're confusing variance and house edge.
A game where the player has a 99% chance of losing their bet does mean the house edge is 99%, you would need to know how much the player won 1% of the time.
Let's say it's a $1 bet and the player has a 99% chance of losing their entire bet.
If 1% of the time they won $100, then there would be no edge for either side.
If 1% of the time they won $110, the player would have a 10% edge over the casino
If 1% of the time they won $97, then the house edge would be 3%
In your example of a game where the Casino has a 99.999% house edge they player would win less than a penny 1% of the time and $0 99% of the time.
Let's try to do it step by step:
1.I give you SHA256("random_string") = 621e8b0818308b0bc408231cab46ba9ec65425b25ec9e367b6081406c87a7532
2.I tell you that the last character of the "random_string" is either 0 or 1
3.You make a guess and place a bet. I will double your Bitcoin if you are right.
4.I will reveal "random_string"
5.You verify that the SHA256 matches the value I gave you in the first step.
Provably fair takes a player seed + server seed + nonce to generate the result. In the above example, you're just picking a random number, there is no player seed.
WIth multiple player, you could use a server seed + player0 seed + player1 seed + player2 seed etc.
You don't have to take my word for it, and I'm not really interested in debating the basics with you, there are a lot of great resources out there on the topic and experts that are way smarter than me in this community.
Check out
https://cryptogambling.org/ or go visit their thread:
https://bitcointalksearch.org/topic/crypto-gambling-foundation-fair-gambling-for-all-2178857, ask them what they think about relying on the built in javascript
instead of a provably fair algorithm.
Since this is a peer-to-peer betting website, if i implement this, how would this prove i am not betting against my clients?
If you accept anonymous players, it's impossible to prove you aren't one of them. What needs to be proven to be considered a trusted crypto gambling site is that you don't have any advanced knowledge or the ability to manipulate the result of a bet.
The way i WAS going to implement is the same way Alex Cambose proposes it:
https://medium.com/@alexcambose/provably-fair-system-in-javascript-6457e028d2aa"Each result is generated using the following parameters:
client-seed — a randomly generated selection of text that you can (and should) modify. This is generated at client/browser level.
server-seed — a randomly generated selection of text (usually a 64-character hex string). This is generated server-side. You will get a hashed version of this before you start gambling, in this way you can make sure that the outcome has been pre-determined and not changed after the result was generated.
nonce — a sequential bet number"
The example above is, in principle, the same as this one here. You are not making a point here, the point being the fact that implementing this is absolutely REDUNDANT since what this implementation does is to ONLY certify the players that i will not modify the outcome of an event after his bet has been placed. What this implementation FAILS to certify is the fact that i can bet against my users.
Regarding your statement:
"If you accept anonymous players, it's impossible to prove you aren't one of them."
NOW you start talking sense.
Regarding this:
"What needs to be proven to be considered a trusted crypto gambling site is that you don't have any advanced knowledge or the ability to manipulate the result of a bet."
It is REDUNDANT implementing this. Why? Because i can always create more accounts and bet against my players and i will ALWAYS have the edge and ALWAYS win. This does not guarantee that i cannot create new bot accounts that bet against my players, bots betting on the result of the bet, having it already from the backend server, therefore winning all the time.
Your approach applies only to casinos where the house rules. Here, being a peer-to-peer casino, you can t prove that i know or i don t know the result of the game. There is are 2 games that, given the implementation, i can t do anything about. It s the Keno Frenzy and Stock Market Mania games. There are 2 states in these games (and every other game i built), break time and play time. During the break time you choose the tickets but the generation of random numbers has not taken place yet. When the random number generator initiates, no further bets can be placed (this applies for keno frenzy - this game does not accept bets during the random number generation period, therefore making me have no further knowledge of the underlying result). Stock market mania generates the numbers on the go, meaning that it does not generate a sequence for the underlying, it generates a new random number EVERY second, therefore making me, again, as a developer, no more knowledgeable than any other player. The only game where i CAN know the result is Rocket Crash BECAUSE i need an increasing sequence of numbers every 10-th of a second, therefore a randomly generated number every specified period would not do.
Don t trust what i m saying, look at the implementation i provided. Given the implementation, you can clearly see i did not build the games with bad intent, on the contrary, i tried my best to make games as random for the developer as they are for the players.