Pages:
Author

Topic: Satoshi Dice -- Statistical Analysis - page 81. (Read 192889 times)

legendary
Activity: 1428
Merit: 1093
Core Armory Developer
May 10, 2012, 05:38:44 PM
#11
I thought all reward transactions included the wager transaction as an input.  Thus, if someone invalidated the wager by double-spending, they'd also invalidate the reward transaction.  And thus it would be pointless.

But if I can double spend (e.g., Finney attack) to invalidate only my losing wagers, did I really lose?

See:
 - https://bitcointalksearch.org/topic/m.882919

It seems I'm a little late to that conversation.  But it seems to me that the most basic attack for an arbitrary individual is simply trying to broadcast competing transactions at the same time.  But if there's any chance for it to succeed, it has to be done right away before you know if you've won.  Thus, you'd invalidate half of your losers and winners.  Other attacks, while possible, are generally reserved to a select few people who have > 1% of mining power, and to bets that are significantly over the maximum bet rate right now and would not be worth it.

On the other hand, I could see that the time delay could allow SatoshiDice to queue up a few transactions, and rearrange their ordering to try to maximize the number of losing bets made.  They have pre-scripted, verifiable secrets, but there's no way to prove the order in which they received certain transactions.  If this were the case, it would be reflected in the stats...

Btw, I love the SatoshiDice concept.  I really like the transparency of it, too.  It's a very elegant, open setup that gives me confidence they are legit.  But you don't know for sure until you do some hard number crunching Smiley

P.S. -- I just updated the table.  About 35k bets total as of midday May 10.  And the stats looks fairly consistent with expectations...

legendary
Activity: 2506
Merit: 1010
May 10, 2012, 05:28:55 AM
#10
I thought all reward transactions included the wager transaction as an input.  Thus, if someone invalidated the wager by double-spending, they'd also invalidate the reward transaction.  And thus it would be pointless.

But if I can double spend (e.g., Finney attack) to invalidate only my losing wagers, did I really lose?

See:
 - https://bitcointalksearch.org/topic/m.882919
legendary
Activity: 1428
Merit: 1093
Core Armory Developer
May 09, 2012, 07:39:54 PM
#9
a quick basic question: would it be possible for any third party to alter these statistics if he was generating 1diceXXX vanity addresses and sending random transactions around?

My script uses the list of 24 addresses from satoshidice.com.  I do not track all addresses that start with "1dice", only the ones from that site.  So that's not an issue.
legendary
Activity: 1428
Merit: 1093
Core Armory Developer
May 09, 2012, 07:00:29 PM
#8
But any transfer within the accepted range is a wager, and thus gets played and the return transaction created.   I can''t think of anything further that this third party could do (or why) to mess with the site.   (well, the Satoshi Dice site does describe other attack vectors, but they are precise and require double spending using Finney attack or other methods.)

I thought all reward transactions included the wager transaction as an input.  Thus, if someone invalidated the wager by double-spending, they'd also invalidate the reward transaction.  And thus it would be pointless.
legendary
Activity: 2506
Merit: 1010
May 09, 2012, 06:29:38 PM
#7
a quick basic question: would it be possible for any third party to alter these statistics if he was generating 1diceXXX vanity addresses and sending random transactions around?

There are 24 specific 1diceXXX vanity addresses that SatoshiDice generated for their service.

Anyone can create their own 1diceXXX address as well, but that doesn't have any impact on the statistics for those 24.

There is one attack method I'm aware off ... send wagers that are too low (below the minimum) or too high (exceed the maximum) and thus the site sends a refund by returning the payment (and pays the transaction fee, mind you).  The service has ways to deal with that if it becomes a problem (deduct the fee before sending the refund, for example).

The other problem is the dust-like wagers.  The minimums are small enough that the site loses money on the smallest wagers due to transaction fees for the return payment.  That too can be adjusted should it become a problem.

But any transfer within the accepted range is a wager, and thus gets played and the return transaction created.   I can''t think of anything further that this third party could do (or why) to mess with the site.   (well, the Satoshi Dice site does describe other attack vectors, but they are precise and require double spending using Finney attack or other methods.)
legendary
Activity: 1246
Merit: 1016
Strength in numbers
May 09, 2012, 06:14:02 PM
#6
Easier access to the blockchain like this for reporting purposes will be very useful.  Thank you for doing this!

Once I fill it up a little more (with localized statistics and confidence bounds), I might modify the version of Armory I'm running to leverage the already-loaded blockchain.  That way, I can recalculate all the stats every 5 min and update a plot somewhere...

Why?  I don't know...  because I'm a statistician and I can.  Smiley

I guess I spent of lot of months online playing poker, and spent time on the 2+2 forums doing similar analysis to try to identify players or phenomenon that were suspicious.  I guess it's one way to keep the gambling sites honest...

Do you already have an account at Seals? The only thing easier for me to donate than bitcons is Seals chips!
hero member
Activity: 668
Merit: 501
May 09, 2012, 06:13:20 PM
#5
a quick basic question: would it be possible for any third party to alter these statistics if he was generating 1diceXXX vanity addresses and sending random transactions around?
sr. member
Activity: 438
Merit: 291
May 09, 2012, 06:02:40 PM
#4
So how many bets a day are they running at?

I thought they started around the 27th April, so based on the 30k you found that is 18 bets (so 36 transactions) a block!

So this one site is responsible for the jump in transactions:
http://blockchain.info/charts/n-transactions-per-block

And I guess the jump in fees:
http://blockchain.info/charts/transaction-fees?timespan=60days&showDataPoints=false&daysAverageString=1&show_header=true&scale=0&address=

legendary
Activity: 1428
Merit: 1093
Core Armory Developer
May 09, 2012, 02:54:24 PM
#3
Easier access to the blockchain like this for reporting purposes will be very useful.  Thank you for doing this!

Once I fill it up a little more (with localized statistics and confidence bounds), I might modify the version of Armory I'm running to leverage the already-loaded blockchain.  That way, I can recalculate all the stats every 5 min and update a plot somewhere...

Why?  I don't know...  because I'm a statistician and I can.  Smiley

I guess I spent of lot of months online playing poker, and spent time on the 2+2 forums doing similar analysis to try to identify players or phenomenon that were suspicious.  I guess it's one way to keep the gambling sites honest...
legendary
Activity: 2506
Merit: 1010
May 09, 2012, 02:03:00 PM
#2
Easier access to the blockchain like this for reporting purposes will be very useful.  Thank you for doing this!
legendary
Activity: 1428
Merit: 1093
Core Armory Developer
May 09, 2012, 01:34:57 AM
#1
Here's the latest output:

Quote

Results: 2012-Jun-11 05:49pm

   Address   Target   Should Win |    #Bets |       Win        |       Lose       |      Refunds      | Accounted-for
----------------------------------------------------------------------------------------------------------------------
 1dice1e6p        1      0.00002 |     3964 |      0 (0.00000) |   3810 (1.00000) |    153 (0.04016) |    (1.000)
 1dice1Qf4        2      0.00003 |      231 |      0 (0.00000) |    192 (1.00000) |     39 (0.20312) |    (1.000)
 1dice2pxm        4      0.00006 |      722 |      0 (0.00000) |    699 (1.00000) |     23 (0.03290) |    (1.000)
 1dice2vQo        8      0.00012 |      274 |      0 (0.00000) |    238 (1.00000) |     31 (0.13025) |    (0.982)
 1dice2WmR       16      0.00024 |      208 |      0 (0.00000) |    187 (1.00000) |     21 (0.11230) |    (1.000)
 1dice2xkj       32      0.00049 |      266 |      0 (0.00000) |    256 (1.00000) |     10 (0.03906) |    (1.000)
 1dice2zdo       64      0.00098 |      587 |      0 (0.00000) |    575 (1.00000) |     12 (0.02087) |    (1.000)
 1dice37Ee      128      0.00195 |     1477 |      0 (0.00000) |   1447 (1.00000) |     24 (0.01659) |    (0.996)
 1dice3jkp      256      0.00391 |      665 |      3 (0.00462) |    647 (0.99538) |     11 (0.01692) |    (0.994)
 1dice4J1m      512      0.00781 |     1018 |      7 (0.00694) |   1001 (0.99306) |      3 (0.00298) |    (0.993)
 1dice5wwE     1000      0.01526 |     1479 |     20 (0.01360) |   1451 (0.98640) |      1 (0.00068) |    (0.995)
 1dice61SN     1500      0.02289 |     1294 |     30 (0.02331) |   1257 (0.97669) |      3 (0.00233) |    (0.997)
 1dice6DPt     2000      0.03052 |     1042 |     31 (0.02998) |   1003 (0.97002) |      1 (0.00097) |    (0.993)
 1dice6gJg     3000      0.04578 |     1531 |     76 (0.04990) |   1447 (0.95010) |      5 (0.00328) |    (0.998)
 1dice6GV5     4000      0.06104 |     1034 |     65 (0.06341) |    960 (0.93659) |      2 (0.00195) |    (0.993)
 1dice6wBx     6000      0.09155 |     2644 |    235 (0.08912) |   2402 (0.91088) |      2 (0.00076) |    (0.998)
 1dice6YgE     8000      0.12207 |     2679 |    302 (0.11341) |   2361 (0.88659) |      0 (0.00000) |    (0.994)
 1dice7EYz    12000      0.18311 |     8531 |   1608 (0.18869) |   6914 (0.81131) |      2 (0.00023) |    (0.999)
 1dice7fUk    16000      0.24414 |    18771 |   4537 (0.24193) |  14216 (0.75807) |      3 (0.00016) |    (0.999)
 1dice7W2A    24000      0.36621 |    12379 |   4585 (0.37119) |   7767 (0.62881) |     21 (0.00170) |    (1.000)
 1dice8EMZ    32000      0.48828 |   152129 |  73941 (0.48665) |  77998 (0.51335) |     93 (0.00061) |    (0.999)
 1dice97EC    32768      0.50000 |    84005 |  41997 (0.50029) |  41948 (0.49971) |     30 (0.00036) |    (1.000)
 1dice9wcM    48000      0.73242 |    50569 |  37147 (0.73577) |  13340 (0.26423) |     18 (0.00036) |    (0.999)
 1dice9wVt    64000      0.97656 |     3421 |   3265 (0.97842) |     72 (0.02158) |     76 (0.02277) |    (0.998)
----------------------------------------------------------------------------------------------------------------------
                                 |   350920 |

----------------------------------------------------------------------------------------------------------------------
Total Bets Made:                350920
Cumulative Wagers:             146956.50238462 BTC
Cumulative Rewards:            147354.43403819 BTC
Cumulative Fees Paid:             176.23022500 BTC
Cumulative Unreturned:            121.09935596 BTC
----
SD Profit on Completed Bets :    -695.26123453 BTC
----
Since Satoshi Dice started, there have been:
Blockchain Tx:  1073735  :  SatoshiDice Tx: 690349  (64.3%)
Blockchain MB:  453.9  :  SatoshiDice Tx: 275.3  (60.7%)



I grab satoshidice.com (via urllib.urlopen('http://satoshidice.com')) and pull out all 24 addresses and current odds, etc.   Then, I scan the blockchain starting at block 175k, collecting all bets made to any of the 24 "1dice" addresses, and then look for transactions that spend the wager transaction (because Satoshi dice always spends the wager transaction to send rewards, which helps protect against double-spends).  

All bets are recorded as Win, Lose, or Refund.  If a user sends more than the maximum bet, it will be refunded.  That is a non-negligible number of the bets made, especially the 65000x bets.

The percentages under "win" and "lose" are only for the subset of win/lose bets, i.e.  win/(win+lose) and lose/(win+lose).  Refunds are not counted except to fill int the "accounted-for" field which simply identifies how many bets there are in the blockchain that could be associated with reward/return payments.

The script is using armoryengine.py to scan the blockchain for SatoshiDice bets and rewards, and then compute statistics.  The exact code is at the bottom of sample_armory_code.py in the BitcoinArmory project.  If you want to try running it yourself, you're going to have to check out the project and compile the CppBlockUtils library yourself.  It's really not hard in Linux... it's really hard in Windows...
Pages:
Jump to: