Author

Topic: How does Satoshi Dice allow for instant transactions? (Read 2279 times)

legendary
Activity: 1310
Merit: 1000
Satoshi dice is only instant for cheap bets.
You bet 1 btc you're waiting like 8 minutes
sr. member
Activity: 476
Merit: 250
Okay so 0 confirms = not safe unless you are Satoshi so I wont worry with that, I guess my site cant be instant but I'll have to look into building user accounts so people dont have to pay per game they can buy 5/10 goes and use them whenever...

Which API do people suggest using I've been looking at this one
https://github.com/blockchain/receive_payment_php_demo which looks like it would do the job with a bit of editing, is there one that people would suggest over it due to ease of use/personal preference?
full member
Activity: 147
Merit: 100


The point is: their "use the output in the input" technique prevents you from double spending winning bets... but, of course, what you really want to do is double spend the *losing* bets!


Ah... makes sense. Didn't think about it that way. Figured whatever you were doing to trigger the doubles-spend would have to be done before you even got a confirmation of a win. But yea, that does leave room for shenanigans.
member
Activity: 74
Merit: 14
"The SatoshiDice Bitcoin game operates with zero confirmations, meaning the time it takes for you to send a transaction and receive your winnings is near-instant. Bets are evaluated as soon as the client picks up the broadcast. This is safe because it always builds the answering transaction with the output of your bet transaction. This means a blockchain that does not contain your bet cannot contain the site's answer."

The risk SatoshiDice is taking is that you might be employing this strategy:

* If I win, I let the transactions confirm and collect my winnings
* If I lose, I very quickly double-spend the coins I had used in my bet, paying a sufficiently high transaction fee that this transaction is more likely than the original transaction to be included in a block.

This way, I capture my wins and can cancel some (most?) of my losses.

Follow this strategy sufficiently often and it would be net positive over time.

I imagine SD have algorithms that look for this behaviour and cut you off pretty quickly if you try it.

The point is: their "use the output in the input" technique prevents you from double spending winning bets... but, of course, what you really want to do is double spend the *losing* bets!


[Edited - got output and input the wrong way round]
full member
Activity: 147
Merit: 100
"The SatoshiDice Bitcoin game operates with zero confirmations, meaning the time it takes for you to send a transaction and receive your winnings is near-instant. Bets are evaluated as soon as the client picks up the broadcast. This is safe because it always builds the answering transaction with the output of your bet transaction. This means a blockchain that does not contain your bet cannot contain the site's answer."
legendary
Activity: 1512
Merit: 1036
0 confirmations are inherently untrustable, SatoshiDice has already learned that through successful double-spends which reclaim gambling bet losses. Very few bets are currently notified of win/loss status before being included in the blockchain - SatoshiDice uses a proprietary formula to determine for themselves what zero-confirmation transactions they think are trustable.
legendary
Activity: 1862
Merit: 1011
Reverse engineer from time to time
It's not impossible dude, but he(SatoshiDICE) has already accumulated enough Bitcoins to replenish anything he loses.
sr. member
Activity: 476
Merit: 250
I have made a Bitcoin game which I will want to release.. at some point which will take Bitcoin as payment and allow players to win a prize, like all the best casino games..

But i'd like it to be instant theres not a lot of point having a game which you have to wait 10 minutes each time to play I need a way to make it instant like Satoshi Dice and other similar sites

I understand Satoshi Dice runs on 0 confirmations, is this a safe way to run a game, surely people can double spend their money before the transaction has been confirmed?

I dont really understand how it works so could someone please explain how Satoshi Dice works securely?

I will also need a bit of advice on setting up and IPN so my server knows when a payment has gone through

Cheers Luke
Jump to: