create account

Gamble with STEEM! by pharesim

View this thread on: hive.blogpeakd.comecency.com
· @pharesim · (edited)
$879.87
Gamble with STEEM!
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.
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 12 others
👎  , ,
properties (23)
authorpharesim
permlinkgamble-with-steem
categorysteem
json_metadata{"tags":["steem","gambling","dice"]}
created2016-06-03 06:56:12
last_update2016-06-22 01:06:03
depth0
children13
last_payout2016-08-21 20:55:24
cashout_time1969-12-31 23:59:59
total_payout_value439.949 HBD
curator_payout_value439.919 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,122
author_reputation239,450,405,799,183
root_title"Gamble with STEEM!"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id22,327
net_rshares103,033,979,605,099
author_curate_reward""
vote details (79)
@admin2017 ·
Thank you !
👍  
👎  
properties (23)
authoradmin2017
permlinkre-pharesim-gamble-with-steem-20160729t102516900z
categorysteem
json_metadata{"tags":["steem"]}
created2016-07-29 10:25:21
last_update2016-07-29 10:25:21
depth1
children0
last_payout2016-08-21 20:55:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length11
author_reputation-1,237,358,002,856
root_title"Gamble with STEEM!"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id460,084
net_rshares25,705,525
author_curate_reward""
vote details (2)
@chitty ·
Nice.. lets do some betting!
properties (22)
authorchitty
permlinkre-pharesim-gamble-with-steem-20160628t115758123z
categorysteem
json_metadata{"tags":["steem"]}
created2016-06-28 11:57:57
last_update2016-06-28 11:57:57
depth1
children0
last_payout2016-08-21 20:55:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length28
author_reputation86,901,300,608,582
root_title"Gamble with STEEM!"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id45,905
net_rshares0
@kingscrown ·
$242.20
it was me :) for my idea i got 1USD and for implementing it you got 1k USD :)
not complaining but finding it funny :)
👍  , , , , , ,
properties (23)
authorkingscrown
permlinkre-pharesim-gamble-with-steem-20160603t151609772z
categorysteem
json_metadata{"tags":["steem"]}
created2016-06-03 15:16:12
last_update2016-06-03 15:16:12
depth1
children0
last_payout2016-08-21 20:55:24
cashout_time1969-12-31 23:59:59
total_payout_value121.098 HBD
curator_payout_value121.098 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length117
author_reputation2,115,810,356,349,282
root_title"Gamble with STEEM!"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id22,656
net_rshares53,099,639,182,571
author_curate_reward""
vote details (7)
@pfunk · (edited)
I tried but cli_wallet isn't liking the fact that there are quotes in the memo field. Are they necessary?

Edit: oh yeah I can just do it on Steemit duh.

    receive 2.000 STEEM from soupper0
    Congratulations, you won! Your bet: higher 51; Result: 94.86
👍  
properties (23)
authorpfunk
permlinkre-pharesim-gamble-with-steem-20160603t070408992z
categorysteem
json_metadata{"tags":["steem"]}
created2016-06-03 07:04:45
last_update2016-06-03 07:07:57
depth1
children1
last_payout2016-08-21 20:55:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length257
author_reputation221,632,045,904,452
root_title"Gamble with STEEM!"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id22,332
net_rshares471,494,357
author_curate_reward""
vote details (1)
@pharesim ·
Yes. You can use the GUI wallet here on steemit. When you like the cli_wallet better, use backslashes to escape the inner quotes: `"{\"type\":\"higher\",\"number\":50}"`
👍  
properties (23)
authorpharesim
permlinkre-pfunk-re-pharesim-gamble-with-steem-20160603t070727450z
categorysteem
json_metadata{"tags":["steem"]}
created2016-06-03 07:07:21
last_update2016-06-03 07:07:21
depth2
children0
last_payout2016-08-21 20:55:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length169
author_reputation239,450,405,799,183
root_title"Gamble with STEEM!"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id22,334
net_rshares471,494,357
author_curate_reward""
vote details (1)
@pharesim · (edited)
$11.83
I read up on house advantages, and 2% seems to be pretty much. 1% sounds a lot more reasonable.
👍  , , ,
properties (23)
authorpharesim
permlinkre-pharesim-gamble-with-steem-20160603t081025833z
categorysteem
json_metadata{"tags":["steem"]}
created2016-06-03 08:10:18
last_update2016-06-03 08:17:18
depth1
children3
last_payout2016-08-21 20:55:24
cashout_time1969-12-31 23:59:59
total_payout_value5.914 HBD
curator_payout_value5.915 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length95
author_reputation239,450,405,799,183
root_title"Gamble with STEEM!"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id22,384
net_rshares10,333,060,826,466
author_curate_reward""
vote details (4)
@pfunk ·
$4.16
2% isn't terribly unreasonable, and 0.1% might be asking for trouble. I hope you have a low max profit payout set.
👍  ,
properties (23)
authorpfunk
permlinkre-pharesim-re-pharesim-gamble-with-steem-20160603t081442639z
categorysteem
json_metadata{"tags":["steem"]}
created2016-06-03 08:15:21
last_update2016-06-03 08:15:21
depth2
children2
last_payout2016-08-21 20:55:24
cashout_time1969-12-31 23:59:59
total_payout_value2.078 HBD
curator_payout_value2.079 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length114
author_reputation221,632,045,904,452
root_title"Gamble with STEEM!"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id22,387
net_rshares5,487,254,976,455
author_curate_reward""
vote details (2)
@pharesim ·
I had no idea of all this. Thanks to you and @smooth we're now set with a max profit of 10 and an edge of 1%. Let's see if we can hold this.
👍  
properties (23)
authorpharesim
permlinkre-pfunk-re-pharesim-re-pharesim-gamble-with-steem-20160603t085227891z
categorysteem
json_metadata{"tags":["steem"],"users":["smooth"]}
created2016-06-03 08:52:21
last_update2016-06-03 08:52:21
depth3
children1
last_payout2016-08-21 20:55:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length140
author_reputation239,450,405,799,183
root_title"Gamble with STEEM!"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id22,408
net_rshares432,203,161
author_curate_reward""
vote details (1)
@pharesim ·
$4.22
First non-interactive GUI version (no betting yet) is working! 
![steemdice gui v1](https://ipfs.pics/ipfs/QmdpNktPr7ZHq6zah7t47kQHskyfLqaCGfXTZtKqKiGBke)
👍  , ,
properties (23)
authorpharesim
permlinkre-pharesim-gamble-with-steem-20160604t024911528z
categorysteem
json_metadata{"tags":["steem"],"image":["https://ipfs.pics/ipfs/QmdpNktPr7ZHq6zah7t47kQHskyfLqaCGfXTZtKqKiGBke"]}
created2016-06-04 02:49:03
last_update2016-06-04 02:49:03
depth1
children2
last_payout2016-08-21 20:55:24
cashout_time1969-12-31 23:59:59
total_payout_value2.110 HBD
curator_payout_value2.110 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length154
author_reputation239,450,405,799,183
root_title"Gamble with STEEM!"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id23,020
net_rshares5,539,102,581,567
author_curate_reward""
vote details (3)
@ackza ·
lol look at the current version! such an improvement!
![](https://steemitimages.com/DQmTT63zJ5BUEY1GNRALwMSnnx5oo96kKFNbASU7JK1oNrh/image.png)

https://pharesim.github.io/steemdice/
properties (22)
authorackza
permlinkre-pharesim-re-pharesim-gamble-with-steem-20180407t081045321z
categorysteem
json_metadata{"tags":["steem"],"image":["https://steemitimages.com/DQmTT63zJ5BUEY1GNRALwMSnnx5oo96kKFNbASU7JK1oNrh/image.png"],"links":["https://pharesim.github.io/steemdice/"],"app":"steemit/0.1"}
created2018-04-07 08:10:45
last_update2018-04-07 08:10:45
depth2
children0
last_payout2018-04-14 08:10:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length181
author_reputation288,209,716,474,019
root_title"Gamble with STEEM!"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id48,786,790
net_rshares0
@pharesim ·
Watch nothing happening live at http://pharesim.github.io/steemdice/
👍  
properties (23)
authorpharesim
permlinkre-pharesim-re-pharesim-gamble-with-steem-20160604t060222581z
categorysteem
json_metadata{"tags":["steem"]}
created2016-06-04 06:02:21
last_update2016-06-04 06:02:21
depth2
children0
last_payout2016-08-21 20:55:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length68
author_reputation239,450,405,799,183
root_title"Gamble with STEEM!"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id23,101
net_rshares510,785,554
author_curate_reward""
vote details (1)
@steempower ·
nice, needs to buy some liquid STEEM to test it out :)
👍  
properties (23)
authorsteempower
permlinkre-pharesim-gamble-with-steem-20160603t065945805z
categorysteem
json_metadata{"tags":["steem"]}
created2016-06-03 06:59:45
last_update2016-06-03 06:59:45
depth1
children0
last_payout2016-08-21 20:55:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length54
author_reputation258,723,926,062,198
root_title"Gamble with STEEM!"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id22,331
net_rshares14,893,105,791
author_curate_reward""
vote details (1)