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.
author | pharesim |
---|---|
permlink | gamble-with-steem |
category | steem |
json_metadata | {"tags":["steem","gambling","dice"]} |
created | 2016-06-03 06:56:12 |
last_update | 2016-06-22 01:06:03 |
depth | 0 |
children | 13 |
last_payout | 2016-08-21 20:55:24 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 439.949 HBD |
curator_payout_value | 439.919 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 1,122 |
author_reputation | 239,450,405,799,183 |
root_title | "Gamble with STEEM!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 22,327 |
net_rshares | 103,033,979,605,099 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
dantheman | 0 | 19,011,297,190,101 | 100% | ||
fminerten1 | 0 | 39,307,194,250 | 100% | ||
itsascam | 0 | 13,377,761,631,600 | 100% | ||
smooth | 0 | 27,967,275,272,517 | 100% | ||
steemroller | 0 | 2,139,158,994,000 | 100% | ||
steemed | 0 | 13,110,789,943,528 | 100% | ||
xeldal | 0 | 3,024,124,099,125 | 100% | ||
pharesim | 0 | 5,482,398,551,660 | 100% | ||
samupaha | 0 | 1,324,545,842,984 | 100% | ||
fuzzyvest | 0 | 4,835,388,079,856 | 100% | ||
silver | 0 | 2,427,987,189,253 | 100% | ||
silversteem | 0 | 2,467,043,956,838 | 100% | ||
turtle | 0 | 5,814,192,819 | 100% | ||
rossco99 | 0 | 1,879,920,364,920 | 100% | ||
complexring | 0 | 3,161,441,294,310 | 100% | ||
steemychicken1 | 0 | 970,880,262,817 | 100% | ||
lovejoy | 0 | 173,329,837,348 | 100% | ||
joseph | 0 | 537,880,199,344 | 100% | ||
aizensou | 0 | 5,193,578,600 | 100% | ||
jackie | 0 | 112,550,575 | 100% | ||
steempower | 0 | 57,424,136,749 | 100% | ||
officialfuzzy | 0 | 4,299,203,403 | 100% | ||
pfunk | 0 | 72,567,359,681 | 100% | ||
pheonike | 0 | 116,453,595,566 | 100% | ||
proctologic | 0 | 14,893,105,791 | 100% | ||
idol | 0 | 5,817,302,072 | 100% | ||
anon | 0 | 12,005,387,982 | 100% | ||
tuck-fheman | 0 | 113,126,155,569 | 100% | ||
chainreaction | 0 | 114,130,955,440 | 100% | ||
jsc | 0 | 1,211,282,462 | 100% | ||
hcf27 | 0 | 471,494,357 | 100% | ||
steemrollin | 0 | 1,188,249,057 | 100% | ||
ash | 0 | 8,196,857,546 | 100% | ||
chitty | 0 | 5,480,899,858 | 100% | ||
linouxis9 | 0 | 3,347,247,714 | 100% | ||
unosuke | 0 | 43,368,033,227 | 100% | ||
tonyson | 0 | 591,744,095 | 100% | ||
pstrident | 0 | 898,294,633 | 100% | ||
gregory-f | 0 | 557,999,756 | 100% | ||
tshering-tamang | 0 | 543,195,744 | 100% | ||
chryspano | 0 | 296,130,591,445 | 100% | ||
mostar | 0 | 10,152,683,971 | 100% | ||
adsactly | 0 | 499,401,121 | 100% | ||
juanlibertad | 0 | 12,214,647,203 | 100% | ||
vato | 0 | 130,560,389,849 | 100% | ||
cryptorune | 0 | 457,709,839 | 100% | ||
africa | 0 | 482,276,415 | 100% | ||
spaninv | 0 | 4,037,842,108 | 100% | ||
jerome-colley | 0 | 315,921,912 | 100% | ||
john-kimmel | 0 | 6,835,821,166 | 100% | ||
avarice | 0 | 433,160,924 | 100% | ||
murh | 0 | 1,448,537,048 | 33.01% | ||
viet-ngo | 0 | 322,555,871 | 100% | ||
dmitry | 0 | 417,861,518 | 100% | ||
b4bb4r-5h3r | 0 | 129,579,084 | 100% | ||
nphacker | 0 | 46,422,295,952 | 100% | ||
tinfoilfedora | 0 | 38,810,217 | 100% | ||
ranko-k | 0 | 371,889,352 | 100% | ||
wonko | 0 | 676,233,568 | 100% | ||
marc-fa-schiwo | 0 | 370,299,477 | 100% | ||
quakenul | 0 | 370,487,770 | 100% | ||
justtryme90 | 0 | 2,312,414,496 | 100% | ||
vivit | 0 | -259,396,144 | -100% | ||
aaron-brodie | 0 | 319,770,046 | 100% | ||
timur-yusupov | 0 | -182,279,401 | -100% | ||
jholdsworthy | 0 | 246,516,799 | 100% | ||
nicholasparr | 0 | 95,197,802 | 100% | ||
jillfeint | 0 | 336,082,777 | 100% | ||
bitlord | 0 | 9,351,825 | 100% | ||
odyssey28 | 0 | -15,566,731 | -100% | ||
vitz81 | 0 | 114,395,129 | 100% | ||
admin2017 | 0 | 30,583,658 | 100% | ||
rubenalexander | 0 | 60,811,886 | 100% | ||
puffin | 0 | 0 | 100% | ||
svetlanaart | 0 | 0 | 100% | ||
sandra16 | 0 | 0 | 100% | ||
ackza | 0 | 0 | 5% | ||
dnjsgkr11 | 0 | 0 | 100% | ||
mattjack | 0 | 0 | 100% |
author | admin2017 |
---|---|
permlink | re-pharesim-gamble-with-steem-20160729t102516900z |
category | steem |
json_metadata | {"tags":["steem"]} |
created | 2016-07-29 10:25:21 |
last_update | 2016-07-29 10:25:21 |
depth | 1 |
children | 0 |
last_payout | 2016-08-21 20:55:24 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 11 |
author_reputation | -1,237,358,002,856 |
root_title | "Gamble with STEEM!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 460,084 |
net_rshares | 25,705,525 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
cheetah09 | 0 | -4,878,133 | -20% | ||
admin2017 | 0 | 30,583,658 | 100% |
Nice.. lets do some betting!
author | chitty |
---|---|
permlink | re-pharesim-gamble-with-steem-20160628t115758123z |
category | steem |
json_metadata | {"tags":["steem"]} |
created | 2016-06-28 11:57:57 |
last_update | 2016-06-28 11:57:57 |
depth | 1 |
children | 0 |
last_payout | 2016-08-21 20:55:24 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 28 |
author_reputation | 86,901,300,608,582 |
root_title | "Gamble with STEEM!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 45,905 |
net_rshares | 0 |
it was me :) for my idea i got 1USD and for implementing it you got 1k USD :) not complaining but finding it funny :)
author | kingscrown |
---|---|
permlink | re-pharesim-gamble-with-steem-20160603t151609772z |
category | steem |
json_metadata | {"tags":["steem"]} |
created | 2016-06-03 15:16:12 |
last_update | 2016-06-03 15:16:12 |
depth | 1 |
children | 0 |
last_payout | 2016-08-21 20:55:24 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 121.098 HBD |
curator_payout_value | 121.098 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 117 |
author_reputation | 2,115,810,356,349,282 |
root_title | "Gamble with STEEM!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 22,656 |
net_rshares | 53,099,639,182,571 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
dantheman | 0 | 18,631,179,878,595 | 100% | ||
smooth | 0 | 28,578,630,730,366 | 100% | ||
pharesim | 0 | 5,575,583,273,277 | 100% | ||
chitty | 0 | 11,683,040,118 | 100% | ||
chryspano | 0 | 302,053,203,274 | 100% | ||
kingscrown | 0 | 509,056,941 | 100% | ||
pashecf | 0 | 0 | 100% |
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
author | pfunk |
---|---|
permlink | re-pharesim-gamble-with-steem-20160603t070408992z |
category | steem |
json_metadata | {"tags":["steem"]} |
created | 2016-06-03 07:04:45 |
last_update | 2016-06-03 07:07:57 |
depth | 1 |
children | 1 |
last_payout | 2016-08-21 20:55:24 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 257 |
author_reputation | 221,632,045,904,452 |
root_title | "Gamble with STEEM!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 22,332 |
net_rshares | 471,494,357 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
hcf27 | 0 | 471,494,357 | 100% |
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}"`
author | pharesim |
---|---|
permlink | re-pfunk-re-pharesim-gamble-with-steem-20160603t070727450z |
category | steem |
json_metadata | {"tags":["steem"]} |
created | 2016-06-03 07:07:21 |
last_update | 2016-06-03 07:07:21 |
depth | 2 |
children | 0 |
last_payout | 2016-08-21 20:55:24 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 169 |
author_reputation | 239,450,405,799,183 |
root_title | "Gamble with STEEM!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 22,334 |
net_rshares | 471,494,357 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
hcf27 | 0 | 471,494,357 | 100% |
I read up on house advantages, and 2% seems to be pretty much. 1% sounds a lot more reasonable.
author | pharesim |
---|---|
permlink | re-pharesim-gamble-with-steem-20160603t081025833z |
category | steem |
json_metadata | {"tags":["steem"]} |
created | 2016-06-03 08:10:18 |
last_update | 2016-06-03 08:17:18 |
depth | 1 |
children | 3 |
last_payout | 2016-08-21 20:55:24 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 5.914 HBD |
curator_payout_value | 5.915 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 95 |
author_reputation | 239,450,405,799,183 |
root_title | "Gamble with STEEM!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 22,384 |
net_rshares | 10,333,060,826,466 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
pharesim | 0 | 5,485,235,155,467 | 100% | ||
fuzzyvest | 0 | 4,835,388,079,856 | 100% | ||
anon | 0 | 12,005,387,982 | 100% | ||
hcf27 | 0 | 432,203,161 | 100% |
2% isn't terribly unreasonable, and 0.1% might be asking for trouble. I hope you have a low max profit payout set.
author | pfunk |
---|---|
permlink | re-pharesim-re-pharesim-gamble-with-steem-20160603t081442639z |
category | steem |
json_metadata | {"tags":["steem"]} |
created | 2016-06-03 08:15:21 |
last_update | 2016-06-03 08:15:21 |
depth | 2 |
children | 2 |
last_payout | 2016-08-21 20:55:24 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 2.078 HBD |
curator_payout_value | 2.079 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 114 |
author_reputation | 221,632,045,904,452 |
root_title | "Gamble with STEEM!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 22,387 |
net_rshares | 5,487,254,976,455 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
pharesim | 0 | 5,486,822,773,294 | 100% | ||
hcf27 | 0 | 432,203,161 | 100% |
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.
author | pharesim |
---|---|
permlink | re-pfunk-re-pharesim-re-pharesim-gamble-with-steem-20160603t085227891z |
category | steem |
json_metadata | {"tags":["steem"],"users":["smooth"]} |
created | 2016-06-03 08:52:21 |
last_update | 2016-06-03 08:52:21 |
depth | 3 |
children | 1 |
last_payout | 2016-08-21 20:55:24 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 140 |
author_reputation | 239,450,405,799,183 |
root_title | "Gamble with STEEM!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 22,408 |
net_rshares | 432,203,161 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
hcf27 | 0 | 432,203,161 | 100% |
First non-interactive GUI version (no betting yet) is working! 
author | pharesim |
---|---|
permlink | re-pharesim-gamble-with-steem-20160604t024911528z |
category | steem |
json_metadata | {"tags":["steem"],"image":["https://ipfs.pics/ipfs/QmdpNktPr7ZHq6zah7t47kQHskyfLqaCGfXTZtKqKiGBke"]} |
created | 2016-06-04 02:49:03 |
last_update | 2016-06-04 02:49:03 |
depth | 1 |
children | 2 |
last_payout | 2016-08-21 20:55:24 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 2.110 HBD |
curator_payout_value | 2.110 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 154 |
author_reputation | 239,450,405,799,183 |
root_title | "Gamble with STEEM!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 23,020 |
net_rshares | 5,539,102,581,567 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
pharesim | 0 | 5,526,869,464,699 | 100% | ||
hcf27 | 0 | 550,076,750 | 100% | ||
chitty | 0 | 11,683,040,118 | 100% |
lol look at the current version! such an improvement!  https://pharesim.github.io/steemdice/
author | ackza |
---|---|
permlink | re-pharesim-re-pharesim-gamble-with-steem-20180407t081045321z |
category | steem |
json_metadata | {"tags":["steem"],"image":["https://steemitimages.com/DQmTT63zJ5BUEY1GNRALwMSnnx5oo96kKFNbASU7JK1oNrh/image.png"],"links":["https://pharesim.github.io/steemdice/"],"app":"steemit/0.1"} |
created | 2018-04-07 08:10:45 |
last_update | 2018-04-07 08:10:45 |
depth | 2 |
children | 0 |
last_payout | 2018-04-14 08:10:45 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 181 |
author_reputation | 288,209,716,474,019 |
root_title | "Gamble with STEEM!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 48,786,790 |
net_rshares | 0 |
Watch nothing happening live at http://pharesim.github.io/steemdice/
author | pharesim |
---|---|
permlink | re-pharesim-re-pharesim-gamble-with-steem-20160604t060222581z |
category | steem |
json_metadata | {"tags":["steem"]} |
created | 2016-06-04 06:02:21 |
last_update | 2016-06-04 06:02:21 |
depth | 2 |
children | 0 |
last_payout | 2016-08-21 20:55:24 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 68 |
author_reputation | 239,450,405,799,183 |
root_title | "Gamble with STEEM!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 23,101 |
net_rshares | 510,785,554 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
hcf27 | 0 | 510,785,554 | 100% |
nice, needs to buy some liquid STEEM to test it out :)
author | steempower |
---|---|
permlink | re-pharesim-gamble-with-steem-20160603t065945805z |
category | steem |
json_metadata | {"tags":["steem"]} |
created | 2016-06-03 06:59:45 |
last_update | 2016-06-03 06:59:45 |
depth | 1 |
children | 0 |
last_payout | 2016-08-21 20:55:24 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 54 |
author_reputation | 258,723,926,062,198 |
root_title | "Gamble with STEEM!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 22,331 |
net_rshares | 14,893,105,791 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
proctologic | 0 | 14,893,105,791 | 100% |