My open source dice game created for ftc is probably used by vertdice.com :)
-
Slavco, your game is well done, thanks for releasing it open source. Although it’s very unsafe to pay out when an incoming transaction hasn’t even been included in a block. It’s good to have at least 1 confirmation. We have talked about this with [url=http://pxc.altdice.net/]Altcoin Dice[/url] before.
-
Yup there is always a tiny chance of double spending when loose roll is played ( few scenarios: spam transaction, without transaction fee, transaction maleability and all of them will be possible if you have an access to the huge miner ), but that’s the risk of instant / 0 confirmations blockchain games :)
-
A possible work-around is to use an incoming transaction as a source (or one of the sources) for a payout. If the original transaction disappears, the payout disappears as well.
-
That’s exactly what is done in the game and how 0 confirmation game should work :) ( I have added transaction malleability protection and no one else could resist against mentioned double spend techniques when we talk about 0 confirmations )
-
Please note that double spend is used against looses not wins and in that way on every successful loose => double spend attacker is playing with odds 2 and probability 75%.
More detailed:
-
roll
-
loose ( roll tx as input of the loose tx )
-
both unconfirmed
-
attacker knows he loose and starts double spend ( few different techniques very rare, but possible ). Transaction malleability protection is real, possible, simple and is implemented in the code.
That’s it, no one can defend itself by this rare double spends when running 0 confirmation blockchain game.
-
-
How hard would it be to change it to require single / multi confirms rather than zero?
my guess was it would be something to do with this?
$transactions = $ftc->listsinceblock($ftc->getblockhash($blockcount-50));
-
The idea is to speed up gaming but if you want to use only txes with X+ confirmations then yes, every transaction from $transactions hold info how confirmations it has => put simple condition and there you go you can process plays that were confirmed X times :)
-
Slavco, if you’re interested in a good talk and development support, welcome to [url=https://cryptocointalk.com/topic/5267-bittylicious/#entry49023]our forum[/url]. We are all into game development and always appreciate good ideas :)
-
I have read the points you write about it in the forum.
Basically I can’t run by my self a gambling portal because it’s illegal in my country and that’s why I have put some demo source code for the blockchain based game online and maybe some day I receive order for bigger project.
With given source, good server architecture & configuration and good monitoring software you can run quite busy ( satoshidice clone ) gaming portal. Now visualization of the plays is trivial (server push the play outcome and client side animates it… )
​Is it needed development? Yes. Is it complex? Depends.
In case you have some questions fell free to put them here ( too lazy to open another account ) :)
-
In fact, I’m not really interested in creation of a direct competitor to Altcoin Dice as I’m very pleased with our partnership. On the other hand, there are many kinds of online games which can be developed with crypto. Many good projects got started by pure enthusiasm and turned into big businesses later. Crypto is no exception.
You needn’t run a gambling site if you don’t want to or if it’s illegal where you live. We have a team to manage this. We also have a development forum where we discuss project internals. Of course, if you’re lazy enough not to sign up for a forum account, there is nothing I can do :)