Pages:
Author

Topic: TossBits.com - toss a coin like game with variable payout. Provably fair - page 2. (Read 1639 times)

full member
Activity: 196
Merit: 100
I first read it incorrectly and assumed the batch hash was the hash of the next server seed, which is not the case.

Why did you take this approach instead of just publishing the hash of the next seed?
xyu
full member
Activity: 182
Merit: 100
do i have to make an account to use the test site?
Yep, but it doesn't check emails, so, you can use whatever email you want =)
You can also use testnet faucet to get the coins - http://testnet.mojocoin.com/
legendary
Activity: 1672
Merit: 1010
do i have to make an account to use the test site?
legendary
Activity: 1672
Merit: 1010
Looks interesting,  I'll give it a try
xyu
full member
Activity: 182
Merit: 100
clickable: TossBits.com
testnet for those who want to try it safely: http://testnet.tossbits.com/

Hi guys, I've been working on a new gambling site, it is like a coin toss game, where your chances are 50%. But unlike other sites, I've made payout variable, basically, when you lose, your wager goes to the bank, and when you win you get 50% of the bank.

Some other features:
  • Low house edge: 1%
  • Provably fair
  • Off the chain transactions
  • Realtime
  • Chat

Gameplay:
We have fixed size bets: from 0.0005 to 1 BTC, that's because we have a bank for each bet type. As I've mentioned payouts are not fixed and depend on the result of the previous bets, if you lose, or other players lose, their wager goes to the bank, rising the available payout. If someone wins they get 50% of the current bank, so in theory it is unlikely that bank can be emptied. What that means for you as a player? You can choose your own strategy, for instance you can watch bets in realtime and play only when the payout is significant enough for you, or you if you have enough coins in you balance you can play agains the bank - because all coins you lose go to the bank a series of wins can recover all loses, so you playing until you leave the bank with less coins than were there when you started

Provability:
All results are provably fair. We use random client and server seeds to generate a hash that is used to determine luck, server side seeds grouped into batches by 1024, and we calculate a hash for a batch, therefore guaranteeing that we cannot alter the server seed without altering entire batch. Client side seeds generated after each bet - it is all embedded right into html and is not minified, so you can inspect the code.
Here also the python script that can check results:
Code:
# -*- coding: utf-8 -*-
from __future__ import print_function

import requests
import sys

from hashlib import sha256

URL = 'http://tossbits.com/api'

bet_id = sys.argv[1]
bet = requests.get(URL + '/bet/' + bet_id).json()
rand_hash = sha256(bet['server_seed']+bet['client_seed']).hexdigest()
luck = bool(int(bin(int(rand_hash, 16))[-1]))

print('Luck: ', luck)

batch = requests.get(URL + '/batch/'+bet['batch']).json()
if batch.get('error'):
    print("couldn't verify batch, because it is not exhausted yet")
    exit(1)

acc = ''
for hash in batch['hashes']:
    acc += hash

batch_hash = sha256(acc).hexdigest()
assert batch_hash == bet['batch']
You need to install `requests` library first. To run: `python verifybet.py `, for example python verifybet.py 34


I would like if you guys give it a try
Any feedback?

Thanks!
Pages:
Jump to: