Bitcoin Forum
November 12, 2024, 06:02:22 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 [13] 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 »
  Print  
Author Topic: Peerbet.org - Play without house edge!  (Read 106638 times)
Camello_AR
Newbie
*
Offline Offline

Activity: 43
Merit: 0



View Profile
March 23, 2013, 10:35:39 PM
 #241

The spanish one have a lot of errors (looking fast). Appears to be automatic translate like Google Trans
smooth
Legendary
*
Offline Offline

Activity: 2968
Merit: 1198



View Profile
March 23, 2013, 11:22:12 PM
 #242

You realize the code in the first post produces slightly biased draws for ticket counts that aren't a power of two, right?

giantdragon (OP)
Legendary
*
Offline Offline

Activity: 1582
Merit: 1002



View Profile
March 24, 2013, 01:31:44 AM
 #243

You realize the code in the first post produces slightly biased draws for ticket counts that aren't a power of two, right?
Someone already told me 2-3 month ago about this flaw and I have increased base to 28 bits, which makes skewness statistically insignificant.
Could you offer better algorithm?
giantdragon (OP)
Legendary
*
Offline Offline

Activity: 1582
Merit: 1002



View Profile
March 24, 2013, 01:34:17 AM
 #244

The spanish one have a lot of errors (looking fast). Appears to be automatic translate like Google Trans
Please correct this translation.
giantdragon (OP)
Legendary
*
Offline Offline

Activity: 1582
Merit: 1002



View Profile
March 24, 2013, 01:54:57 AM
 #245

My previous post seems to have gotten swallowed in the noise... Any interest in a Hebrew translation?
We don't have much Hebrew users, however you can start if you want!
smooth
Legendary
*
Offline Offline

Activity: 2968
Merit: 1198



View Profile
March 24, 2013, 08:38:48 AM
 #246

Could you offer better algorithm?
The standard method is to discard the inputs that lead to a biased draw. If this happens, you could wait for the next block to pay off the raffle.  It is very unlikely to happen in practice so as a practical matter, you can certainly ignore it, but people tend to get a little heated about "unfair" gambling sites.

I think the top answer here is correct, but I didn't examine it that carefully: http://stackoverflow.com/questions/11758809/what-is-the-optimal-algorithm-for-generating-an-unbiased-random-integer-within-a

AdriKGB
Newbie
*
Offline Offline

Activity: 18
Merit: 0


View Profile
March 24, 2013, 10:45:02 AM
 #247

I can translate to Czech language.
Are you interested?
OK, start!

I can translate to spanish. Let me know if you need it. I am native spanish.
Someone already have made website's Spanish localization. Hovewer strings.xml for Android app is still missing.

Shocked /me proud to be Italian... well Italian-American
Lets try.

Hi,

I have reviewed the spanish translation of the xml for android and it is very poor (google translator for sure).

As agreed I have corrected it (I am sending it by PM together with and excel sheet indicating the changes).

I am waiting for the 0,1BTC in Peerbet; My account is AdriKGB.

If you need more help please let me know.
samurajj
Newbie
*
Offline Offline

Activity: 26
Merit: 0


View Profile
March 24, 2013, 12:53:54 PM
 #248

I finished czech translation and uploaded it here: http://www.megafileupload.com/en/file/405155/locale-zip.html
I expect 0.1 BTC at 1JohN3jM5gFjGdAxkxnSai758fnYFhFvFB
Thanks.
giantdragon (OP)
Legendary
*
Offline Offline

Activity: 1582
Merit: 1002



View Profile
March 24, 2013, 04:37:19 PM
 #249

The standard method is to discard the inputs that lead to a biased draw. If this happens, you could wait for the next block to pay off the raffle.
Discarding blocks can let users to think that Peerbet operator tries to play against its users (i.e. buy first ticket in the 50/50 raffle and discard all blocks until admin's ticket is winning), therefore it is not acceptable solution.
28-bit base number is large enough to produce high-quality random numbers with statistically insignificant skewness (it is even impossible to detect in stats software like Statistica).

It is very unlikely to happen in practice so as a practical matter, you can certainly ignore it, but people tend to get a little heated about "unfair" gambling sites.
This can be unfair in "play against house" casino games where this skewness can be used to increase house edge, however gives no advantage to the P2P gambling site operator.
giantdragon (OP)
Legendary
*
Offline Offline

Activity: 1582
Merit: 1002



View Profile
March 24, 2013, 04:41:20 PM
 #250

I finished czech translation and uploaded it here: http://www.megafileupload.com/en/file/405155/locale-zip.html
Thank you!
Write your Peerbet username.
samurajj
Newbie
*
Offline Offline

Activity: 26
Merit: 0


View Profile
March 24, 2013, 05:21:25 PM
 #251

my username: samurajj
smooth
Legendary
*
Offline Offline

Activity: 2968
Merit: 1198



View Profile
March 24, 2013, 08:41:34 PM
 #252

Discarding blocks can let users to think that Peerbet operator tries to play against its users

You misunderstand.  The discarding is entirely deterministic based on the formula.  There is no way for the administrator to exploit that.  i.e. still provably fair.


giantdragon (OP)
Legendary
*
Offline Offline

Activity: 1582
Merit: 1002



View Profile
March 24, 2013, 10:18:58 PM
 #253

You misunderstand.  The discarding is entirely deterministic based on the formula.  There is no way for the administrator to exploit that.  i.e. still provably fair.
You are right, but some users may incorrectly understand why some blocks being rejected and just stop playing. Suggest another algorithm without this disadvantage.

BTW, I still don't understand why change of algorithm is necessary when skewness does not (statistically significant) affect fairness of the game?
smooth
Legendary
*
Offline Offline

Activity: 2968
Merit: 1198



View Profile
March 25, 2013, 05:35:34 AM
 #254

You are right, but some users may incorrectly understand why some blocks being rejected and just stop playing. Suggest another algorithm without this disadvantage.

BTW, I still don't understand why change of algorithm is necessary when skewness does not (statistically significant) affect fairness of the game?
Your statements are contradictory here.  If the bias is very small (which it is), then blocks won't be skipped very often and users won't have anything to be upset about.  It's not going to happen very often, if ever.  But as things stand now you can't (honestly) say that your game is "fair."   You can say that the bias is "small" and users might be okay with that, or they might not.

But anyway, another algorithm would be to increment the nonce and generate a new hash.   Again, you do this deterministically only when the first hash falls in the bad range.
giantdragon (OP)
Legendary
*
Offline Offline

Activity: 1582
Merit: 1002



View Profile
March 25, 2013, 05:53:11 AM
Last edit: March 25, 2013, 06:04:06 AM by giantdragon
 #255

But anyway, another algorithm would be to increment the nonce and generate a new hash.   Again, you do this deterministically only when the first hash falls in the bad range.
Suggest working PHP version of the algorithm with nonce increment and I will update Peerbet scripts.
smooth
Legendary
*
Offline Offline

Activity: 2968
Merit: 1198



View Profile
March 25, 2013, 07:19:29 AM
 #256

But anyway, another algorithm would be to increment the nonce and generate a new hash.   Again, you do this deterministically only when the first hash falls in the bad range.
Suggest working PHP version of the algorithm with nonce increment and I will update Peerbet scripts.

I'm not a PHP coder.

If you don't want to do it, don't do it.  I was just giving feedback based the incorrect algorithm you posted on the forum.

samurajj
Newbie
*
Offline Offline

Activity: 26
Merit: 0


View Profile
March 25, 2013, 09:54:50 AM
 #257

Hi, I made a few security tests on your site. I didn't find any SQL injection vulnerability, but I found out a way to do XSS attack. Is there any bounty for that? Wink
giantdragon (OP)
Legendary
*
Offline Offline

Activity: 1582
Merit: 1002



View Profile
March 25, 2013, 03:44:38 PM
 #258

Hi, I made a few security tests on your site. I didn't find any SQL injection vulnerability, but I found out a way to do XSS attack. Is there any bounty for that? Wink
I can add some credits to play on your Peerbet account.
giantdragon (OP)
Legendary
*
Offline Offline

Activity: 1582
Merit: 1002



View Profile
March 25, 2013, 03:53:09 PM
 #259

If you don't want to do it, don't do it.  I was just giving feedback based the incorrect algorithm you posted on the forum.
I never said that I don't want to change the algorithm. I just thought: because you wrote about this flaw, you could also suggest how to correct it.
giantdragon (OP)
Legendary
*
Offline Offline

Activity: 1582
Merit: 1002



View Profile
March 25, 2013, 05:58:51 PM
Last edit: March 25, 2013, 06:13:02 PM by giantdragon
 #260

I have implemented new random algorithm that solves bias flaw. Please ensure that it is correct.

Code:
function getWinningTicket($nonce, $blockHash, $ticketsTotal)
{
$randMax = 268435455;
$remainder = $randMax % $ticketsTotal;
$output = -1;

do {
$hash = hash('sha256', $nonce . $blockHash);
$randHex = substr($hash, strlen($hash) - 7, 7);
$x = base_convert($randHex, 16, 10);

$output = $x % $ticketsTotal;
$nonce .= '0';
}
while($x >= ($randMax - $remainder));

return $output + 1;
}
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 [13] 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 »
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!