Pages:
Author

Topic: Satoshi Dice -- Statistical Analysis - page 78. (Read 192896 times)

sr. member
Activity: 438
Merit: 291
June 25, 2012, 04:31:26 PM
#71
Only defence to premined blocks seems to be to ensure payout is never more that 50BTC then there is no point withholding the blocks when you do win.
legendary
Activity: 2506
Merit: 1010
June 25, 2012, 04:27:15 PM
#70
More likely is that they could double-spend their losing bets using pre-mined blocks, and only let their winning bets confirm.

How about the potential that there are multiple wagers with the same transaction hash?  That would appear in the results.

 - https://bitcointalksearch.org/topic/m.883119
legendary
Activity: 2940
Merit: 1333
June 25, 2012, 03:46:02 PM
#69
Even with millions of bets there should be no way to reverse-engineer the secret from the HMAC operation, especially knowing only the last two bytes.  (is the full output of HMAC(secret,TxID) shown?)

sha256(secret) has been published for all the secrets that will be used in the next 10 years, and the full output of HMAC is shown.  See this 'recent bet':

Quote
Secret and Transaction Hash

Verify that the hmac sha512 with secret and transaction_id hash to the bet hash
hmac_sha512(hidden,69468dfc1a10bc9ae98d6913a715436eb1bd795bf023ea2aa0ff1d5f07f22b97) -> 1695547cca9f140b91a127664c43369d8ec9a70cc3c509d2c25f179a4d4c8dc3
legendary
Activity: 1428
Merit: 1093
Core Armory Developer
June 25, 2012, 03:10:31 PM
#68
My guess is that someone found a vulnerability
how likely is it someone could brute-force the daily secret hashed and published in advance?

In a perfect world, the methodology is secure, and this would be extremely difficult.   Even with millions of bets there should be no way to reverse-engineer the secret from the HMAC operation, especially knowing only the last two bytes.  (is the full output of HMAC(secret,TxID) shown?)

It's my understanding that there has not been a lot of confirmed double-spend [attempts].  I could be wrong though.

But the world isn't perfect.  The machine holding the secrets and doing the calculations must be connected to the internet.  Maybe someone found a way to get the server to leak information.  I'm sure interested peoples have isolated a "direct" connection to this node, and even if they don't "hack" it, may be able to get useful information out of communicating with it.
legendary
Activity: 2940
Merit: 1333
June 25, 2012, 03:04:00 PM
#67
My guess is that someone found a vulnerability
how likely is it someone could brute-force the daily secret hashed and published in advance?

Not very.  More likely is that they could double-spend their losing bets using pre-mined blocks, and only let their winning bets confirm.

If I control a lot of hashpower, I make sure that every block I mine contains a spend to myself.  Each time I find a block, I double-spend that transaction in the form of a "less than 512" bet at SatoshiDice.  I wait a few seconds to see if I win.  99% of the time I'll lose, but if I win, I throw away the block I mined and let my winning bet confirm, otherwise I submit it to the network as normal, causing the lost bet to never be confirmed.  By waiting to see if I win the bet, I risk my block being orphaned, but my expected win is enough to cover that risk so long I can bet high enough at SatoshiDice.

Is there any flaw in that system?  Have any steps been taken to stop it happening today?
hero member
Activity: 668
Merit: 501
June 25, 2012, 02:55:27 PM
#66
My guess is that someone found a vulnerability
how likely is it someone could brute-force the daily secret hashed and published in advance?
donator
Activity: 532
Merit: 501
We have cookies
June 25, 2012, 02:20:30 PM
#65
This satoshidice guy is pretty unlucky.
Depends on what his goal is.
legendary
Activity: 1428
Merit: 1093
Core Armory Developer
June 25, 2012, 02:19:52 PM
#64
My guess is that someone found a vulnerability and exploited it for 1000 blocks, and is waiting for the site to "refill" before doing it again.  The sequence of losses is just way too extreme over that 182k-184k region to be luck, unless it's based mostly on long-shot bets.  But from the previous postings, there haven't been a ton of long-shot bets..

Or the vulnerability was found and fixed.  I'm not really sure.  But as an attacker, it might be more beneficial to let the site recover and skim money instead.  So you get the benefits of running a gambling website without actually having to run one!
legendary
Activity: 2940
Merit: 1333
June 25, 2012, 01:05:14 PM
#63
Here's the same thing but with dates instead of block numbers on the X axis:

legendary
Activity: 2940
Merit: 1333
June 25, 2012, 11:53:40 AM
#62
This satoshidice guy is pretty unlucky.

Here's a graph of how the profit for the site has been at the end of each block since it started.  I don't know if it's bad luck, or if someone is cheating.



There was a reasonably big loss overnight.  Someone bet 5 BTC twice in the same transaction: 5 BTC on "under 1500" and another 5 BTC on "under 6000".  Both bets won.  This seems like a good way of partially evading the low maximum bet limits, since the same random number will be chosen for all bets in a single transaction.
sr. member
Activity: 438
Merit: 291
June 25, 2012, 11:53:19 AM
#61
Or someone is managing to roll back zero-conf losing transactions!
legendary
Activity: 1414
Merit: 1000
HODL OR DIE
June 25, 2012, 10:28:36 AM
#60
This satoshidice guy is pretty unlucky.
legendary
Activity: 2506
Merit: 1010
June 24, 2012, 05:58:27 PM
#59
I just noticed that the script that generates the statistics doesn't know that you can send 0.0054321 BTC to an address to set the payout address for your winnings.

Good catch!
legendary
Activity: 2940
Merit: 1333
June 24, 2012, 05:23:10 PM
#58
I just noticed that the script that generates the statistics doesn't know that you can send 0.0054321 BTC to an address to set the payout address for your winnings.  Around 10,000 bets have used this feature.

Making the script aware of this rule changes the output as follows.  Note that the 'Unreturned' amount is now much smaller.  The script was previously considering all bets which had their payout address set manually to be "unreturned".

Quote

   before                                                          after

Total Bets Made:                556967                          Total Bets Made:                556967                          
Cumulative Wagers:             199763.41276824 BTC              Cumulative Wagers:             199763.41276824 BTC              
Cumulative Rewards:            197018.24357055 BTC              Cumulative Rewards:            199551.66924577 BTC              
Cumulative Fees Paid:             275.21005000 BTC              Cumulative Fees Paid:             280.25147500 BTC              
Cumulative Unreturned:           2650.14069182 BTC              Cumulative Unreturned:             65.21685976 BTC
----                                                            ----                                                            
SD Profit on Completed Bets :    -180.18154413 BTC              SD Profit on Completed Bets :    -133.72481229 BTC
----                                                            ----                                                            
Since Satoshi Dice started, there have been:                    Since Satoshi Dice started, there have been:                    
Blockchain Tx:  1551815  :  SatoshiDice Tx: 1033193  (66.6%)    Blockchain Tx:  1551815  :  SatoshiDice Tx: 1043244  (67.2%)    
Blockchain MB:  660.2  :  SatoshiDice Tx: 419.3  (63.5%)        Blockchain MB:  660.2  :  SatoshiDice Tx: 423.4  (64.1%)        
newbie
Activity: 15
Merit: 0
June 23, 2012, 03:42:30 PM
#57
I would think the space required is pretty much in proportion to the number of transactions, but I could count that too.  Unfortunately running the analysis seems to have messed up by blkindex somehow, so I'm held up while that regenerates.

What I wanted to find out was whether the number of outstanding transaction outputs was still increasing rapidly. If you plot a rolling average of the  increase in the number of outstanding outputs per new transaction, it peaked at nearly 1 last September, dropped to 0.25 around January, grew to 0.4 in April and has slowly declined back to 0.25 again.

It's difficult to make sense of, but unless that ratio goes into a steady decline, it means that the number of outstanding balances to track is increasing rapidly along with the number of historical transactions.  As I say, the data doesn't really show yet whether that's the case or not.  We're adding 20,000 to the number of unspent transaction outputs each week lately, but a year ago, when transaction volume was much lower, we were adding 50,000 a week.  If by some mechanism a node is storing only the unspent outputs, figure 70-80 bytes each, that would need 120MB, growing at 1.5MB / week.  Meanwhile the blockchain is growing by 100MB / week (that's a rough estimate, I'll try to get real numbers tomorrow).
legendary
Activity: 2128
Merit: 1073
June 23, 2012, 11:54:37 AM
#56
It's relevant to the various threads on scaling & blockchain efficiency.
Yes it is. It would be more relevant if you added two more columns TxBytes and TxBytesLeft. Those fields shouldn't simply count the transactions but the space required to store them. This will more driectly relate to the discussion in other threads.
newbie
Activity: 15
Merit: 0
June 23, 2012, 09:40:52 AM
#55
Don't know if this is of interest to anyone -- growth in the block chain from the beginning of the year:

Block#    Date        Tx          TxLeft      Outputs    OutputsLeft
160651    2012-01-05  2141909     537489      4958838        1265195
161701    2012-01-11  2184208     530150      5058211        1256418
162751    2012-01-18  2231239     535105      5167264        1265877
163801    2012-01-25  2277606     544932      5275969        1281789
164851    2012-02-01  2322666     551070      5383353        1296623
165901    2012-02-08  2370911     560104      5497425        1314422
166951    2012-02-15  2430945     570340      5638086        1335083
168001    2012-02-22  2479948     581100      5754867        1355583
169051    2012-02-29  2524194     589006      5866066        1375399
170101    2012-03-07  2573735     597328      5992463        1395833
171151    2012-03-14  2615923     603458      6103448        1410601
172201    2012-03-21  2661845     613033      6217395        1431445
173251    2012-03-28  2706242     624443      6328060        1452971
174301    2012-04-04  2756117     633395      6449913        1471912
175351    2012-04-12  2809748     642169      6579808        1487912
176401    2012-04-20  2872153     650236      6729451        1505063
177451    2012-04-27  2929045     658588      6866321        1521086
178501    2012-05-04  2991166     668820      7014679        1541885
179551    2012-05-10  3087103     676173      7233590        1559496
180601    2012-05-18  3239737     684265      7569078        1576859
181651    2012-05-26  3469896     698220      8067651        1606888
182701    2012-06-02  3654532     708385      8474595        1629500
183751    2012-06-09  3877115     718799      8956077        1648213
184801    2012-06-16  4179254     738515      9623716        1678629
185851    2012-06-23  4407499     758333     10153165        1714365

To clarify: the last four columns are the number of transactions, the number with still unspent outputs, the number of transaction outputs, and the number of transaction outputs still unspent.  I hope it's accurate, the numbers look sane to me, and the code was fairly simple, but I could quite possibly have made a stupid mistake.

It's relevant to the various threads on scaling & blockchain efficiency.
legendary
Activity: 2940
Merit: 1333
June 22, 2012, 08:51:23 PM
#54
Thanks dooglus.  I've been super busy and I accidentally deleted my most-recent updates to that script, and didn't feel like reimplementing it.  I've been too busy trying to get out the next version of Armory.

You got the interpretation right:  looks like SD is taking a really long time to process bets so there's a lot of unreturned bets piling up.

I've not checked, but maybe it's not that they're not processing them, but that miners can't/won't keep up?  Either way it would show up the same on the blockchain I think.
legendary
Activity: 1428
Merit: 1093
Core Armory Developer
June 22, 2012, 08:42:22 PM
#53
Thanks dooglus.  I've been super busy and I accidentally deleted my most-recent updates to that script, and didn't feel like reimplementing it.  I've been too busy trying to get out the next version of Armory.

You got the interpretation right:  looks like SD is taking a really long time to process bets so there's a lot of unreturned bets piling up.
legendary
Activity: 2940
Merit: 1333
June 22, 2012, 04:17:56 PM
#52
It looks like the 'Unreturned' amount needs to come out of the profits, meaning the site is still 200 BTC down.  This explains the increase in the house edge, I guess.

Here's how I think the picture really looks:

Quote

Total Bets Made:                543412
Cumulative Wagers:             195424.98368132 BTC
Cumulative Rewards:            193333.06261702 BTC
Cumulative Fees Paid:             269.38745000 BTC
Cumulative Unreturned:           2038.08327919 BTC
----
SD Profit on Completed Bets :    -215.54966489 BTC
----
Since Satoshi Dice started, there have been:
Blockchain Tx:  1509892  :  SatoshiDice Tx: 1010485  (66.9%)
Blockchain MB:  641.5  :  SatoshiDice Tx: 409.8  (63.9%)

Pages:
Jump to: