Author

Topic: New Game: Let your coins run! (Read 1197 times)

member
Activity: 111
Merit: 10
June 14, 2013, 10:36:09 AM
#16
There is a new history page now with the last 20 races.

Check it out! It's fun!
member
Activity: 111
Merit: 10
June 11, 2013, 11:06:43 AM
#15
I'm not so sure about the timereceived and blocktime of the transaction...
You can see both timestamps in the transaction details on blockchain.info.

However, according to your logic, the laziness of the coins can be manipulated by the players. If I want my coin to be the fastest, all I need to do is include a larger than normal transaction fee, and my coin won't be as "lazy" as the others since it will get into a block immediately.

You're right that it's now not only a matter of luck and players can try to make their coins less lazy. It just makes the game more interesting.

With a larger than normal transaction fee, your transaction might be prefered and included in the next block, but you will never know when exactly this block will be found. The difference between the time when you click the send button and the time when your transaction gets into a block is what the coin make speedy or lazy. You never know if someone else is paying the same fee but just a few seconds later than you. Even someone who pays standard tx fee can have more luck. And nobody will pay more tx fee than he can win.

Anyway it is still a matter of good luck to find the right time to send a coin.

Try it and have fun!
legendary
Activity: 3416
Merit: 1912
The Concierge of Crypto
June 09, 2013, 09:30:30 AM
#14
I'm not so sure about the timereceived and blocktime of the transaction, but that is an improvement. However, according to your logic, the laziness of the coins can be manipulated by the players. If I want my coin to be the fastest, all I need to do is include a larger than normal transaction fee, and my coin won't be as "lazy" as the others since it will get into a block immediately.

The "standard" procedure is for game sites to use the actual transaction hash itself, hashed against a secret you know. That still leaves the possibility of a "server" coin being used to win the race, or you playing your own game and you know the outcome, so therefore you can make your own coin win the race.
member
Activity: 111
Merit: 10
June 08, 2013, 12:08:21 PM
#13
Thanks again for your statement. I agree that provably fairness is important.

I like to keep things simple, so that not only mathematicians or developers can verify the fairness of the game. I had an idea last night and changed the game so that it is now provably fair in my eyes.

I removed the random number generator. Instead the speed of a coin is calculated by using the timereceived and blocktime of the transaction. That are two factors from an external source, and nobody can predict them. All information to verify the fairness is in the blockchain.

Also changed the FAQ to explain the new procedure.
legendary
Activity: 3416
Merit: 1912
The Concierge of Crypto
June 07, 2013, 09:31:25 PM
#12
Thank you very much for the statement and the link. I will see what I can change to make it more "provably".
Until then please just believe me (and the code) that my intention is not to trick anybody.

That's the problem. It's not about you personally. It's about "the unknown" and you just happen to be part of it. Just like I was. In this bitcoin world, provable fairness is now a requirement, or no one is going to play the games. (or most people won't).

Get your random numbers from somewhere that publishes it and maintains a record, or generate your own and hash them with SHA-256

An example would be:
secret = RgIzrY9dGD8NBcxb1cDzeywgl1YJNj7jnccdZTvpkVlSws97ep6efb9IW6p9IITC
sha256 result = ec1399de44e7b3cb62773f28de0b631a5fc7b7bd22c16e08537ba97d4d118899

Where you can publish the hash before the game. And then use the secret to determine the fastest coin runner. Then after the game, you also publish the secret. Then people can verify that you used that same secret to compute the winner, and also that you didn't change the secret during the course of the game.

But you need another part (from an external source), something that you can't control or know. Otherwise you can play your own game and let your own coin run the fastest.

You have to be able to prove that you can't do that.

Once you satisfy those two minimum requirements, people may then play your game. The question of if they will actually play it is another matter, as I've seen some perfectly good websites have no players at all despite being provably fair.

The other part that can't be proven with math or code is trust, and that's going to be much harder to "prove". You or your website have to earn it, slowly, over time.

You can make it quicker by posting your complete dox, but I doubt you'll do that.
member
Activity: 111
Merit: 10
June 07, 2013, 04:30:48 AM
#11
Thank you very much for the statement and the link. I will see what I can change to make it more "provably".
Until then please just believe me (and the code) that my intention is not to trick anybody.
sr. member
Activity: 293
Merit: 250
June 05, 2013, 05:48:05 PM
#10
ok, we can see that your code is fair, but it isn't provably fair. Provably fairness allow the users to verify that the results wasn't manipulated by you. A simple example of provably fairness is the site https://www.satoshi-karoshi.com/. When you choose the free play for example, before you start playing, it shows you the sha1 hash of the string containing the positions of the bombs in order, so, when a user loses,  he can verify that the results wasn't manipulated by the server and that he was just unlucky.

More details at:
https://bitcointalksearch.org/topic/a-guide-to-how-provably-fair-works-161236
member
Activity: 111
Merit: 10
June 05, 2013, 05:03:45 PM
#9
By saying "a" random number generator, I assume you coded it yourself. If so, can we have a look at the code so we can see if it's provably fair or not. Because self-made codes are easily adjustable and can be exploited for your own good.

I use the php shuffle function to shuffle the payout plan.
Then the values are assigned to the 10 addresses of a race.

Here is the code snippet:
Code:
	$bcPool = $pool->numBets * $pool->betAmnt;
$bcPayout = $bcPool - $bcPool * $housePct / 100.0;

$winPct = array(18,16,14,12,11,9,8,6,4,2);
shuffle($winPct);

$sql = "SELECT * FROM bets WHERE poolID = $pool->poolID ";
$resB = mysql_query($sql);
while($bet = mysql_fetch_object($resB)) {
$pctWin = array_shift($winPct);
$bcWin = ($pctWin * $bcPayout) / 100.0;
$sql = "UPDATE bets SET pctWin = $pctWin, bcWin = $bcWin WHERE betID = $bet->betID";
$resS = mysql_query($sql);     
}

Yes, it's such simple.  Smiley

Ok it's not exectly the way I described it in the FAQ but the result is the same.


KSV
sr. member
Activity: 398
Merit: 250
SVERIGES VIRTUELLA VALUTAVÄXLING
June 05, 2013, 01:29:05 PM
#8
its like bunny run . . .
sr. member
Activity: 1463
Merit: 265
Pepemo.vip
June 05, 2013, 12:51:43 PM
#7
Quote
How is the winner calculated?
Technically spoken: A two-dimensional array is filled with ten sender addresses in one column and percent values of a fixed payout plan in the other column. Then the first column is being shuffled by a random number generator. At the end, every of the ten addresses has a randomly generated payout value, which is visualized by the coin-speed.

By saying "a" random number generator, I assume you coded it yourself. If so, can we have a look at the code so we can see if it's provably fair or not. Because self-made codes are easily adjustable and can be exploited for your own good.
full member
Activity: 196
Merit: 100
June 05, 2013, 12:33:02 PM
#6
I could not find anything on how the winner is being calculated.
Answer added to the FAQ.

I still don't get it, sorry. So you just shuffle the array in a way that is completely controllable by you?
member
Activity: 111
Merit: 10
June 05, 2013, 11:21:57 AM
#5
I could not find anything on how the winner is being calculated.
Answer added to the FAQ.
full member
Activity: 196
Merit: 100
June 04, 2013, 06:09:09 PM
#4
Btw: Whom should the system prefer? It's totally anonymous.

Your own bets. I could not find anything on how the winner is being calculated.
member
Activity: 111
Merit: 10
June 04, 2013, 04:58:13 PM
#3
doesnt seem provably fair to me, from all I know you could be picking out one specific coin and make that one win the game over and over
Every coin runs only once. So it can't win over and over again.
Which of the 10 coins in a race will win the biggest part depends on a random number driven array shuffling routine.
It is as fair as any other famous dice game.  Wink
Btw: Whom should the system prefer? It's totally anonymous.
sr. member
Activity: 1463
Merit: 265
Pepemo.vip
June 04, 2013, 01:57:25 PM
#2
doesnt seem provably fair to me, from all I know you could be picking out one specific coin and make that one win the game over and over
member
Activity: 111
Merit: 10
June 04, 2013, 11:03:33 AM
#1
It's a bitcoin racing game. Ten players take part in a race. Every player spends a small amount in a pot. It is the coin that will run for him. The player with the fastest coin wins the biggest part of the pot. The player with the slowest coin still wins a small part of the pot.

See more at http://coinrun.bits2win.com/

Try it an have fun!
Jump to: