Gamble with STEEM!

in #steem8 years ago (edited)

Someone asked for a dice game on steem, and I figured that may be a good training to get to know the apis better.

A beta version is done, I dare you to test it!

You probably know the drill: select a number between 0 and 100 and bet on a higher or lower result. Every block rolls a dice. The last 5 characters of the block hash the transaction is in gets converted to decimal, if it's >999,999 the next block is taken (and so on). The resulting integer x gives the result against which your number is checked: x%(10000)/100
The amount you get when you guessed right is sent * (100/(100-number OR 0+number)) minus the house edge, which is set to 1% for now. The limit for one game is a theoretical winning of 10 Steem, when your bet exceeds that it'll get returned on the spot.

I will create a frontend later. When you're brave enough, send a bit of Steem to the account steemdice1 with a memo formatted like this:
{"type":"higher","number":23.6}
or
{"type":"lower","number":75}

Don't gamble high amounts, I only filled the account with 100 STEEM for the tests. If something goes wrong I won't take any blame.

Sort:  

it was me :) for my idea i got 1USD and for implementing it you got 1k USD :)
not complaining but finding it funny :)

I read up on house advantages, and 2% seems to be pretty much. 1% sounds a lot more reasonable.

First non-interactive GUI version (no betting yet) is working!
steemdice gui v1

lol look at the current version! such an improvement!

https://pharesim.github.io/steemdice/

nice, needs to buy some liquid STEEM to test it out :)

Nice.. lets do some betting!

Coin Marketplace

STEEM 0.18
TRX 0.14
JST 0.029
BTC 57173.66
ETH 3067.89
USDT 1.00
SBD 2.39