Author

Topic: [ETH ]*New Round Based Bet Game: Bet On Hash * (Read 674 times)

newbie
Activity: 26
Merit: 0
The game is still running and round 16 finished with 4 winners. Every winner was paid out 149% of their payment.
newbie
Activity: 26
Merit: 0

I reviewed the code, it is very pro written, clear and performant.
The owner can never scam you, everything is made to keep your investement like it should be.
The owner can change the number of players, disable the game, stop the round BUT all theses actions always perform a full refunding for all players before.
This is OK IMO.  Wink

Thanks for the review!
newbie
Activity: 26
Merit: 0
Already 2 Gamblers in round 16. Only 4 more needed to end this round ... Give it a try!
newbie
Activity: 26
Merit: 0
Just in case somebody does not know how to send a data byte together with Ether:

If you are using Geth or Ethereum Wallet (wich starts Geth in the background):
after typing
Code:
geth attach
in a command line, enter:
Code:
eth.sendTransaction({from: eth.accounts[0], to:'0x7753A9D834844cFDe5C211ec3912b49f0d8B8e11', value:web3.toWei(0.1, "ether"), gas:100000, data:"0x01"})
to send "0x01" and 0.1 Ether to address 0x7753A9D834844cFDe5C211ec3912b49f0d8B8e11.

Change "0x01" to "0x81" if you want to change your bet or change value and address if you want to risk more or less (see original post).

In the GUI of Ethereum Wallet (Mist) just click SEND and after entering the address and the amount click the ADD DATA button and enter 01 or 81 in the input field below the button.
newbie
Activity: 26
Merit: 0
Just added a new contract for those who want to play with more than 0.1 Ether.

To join send one byte data (0x01 or 0x81) with a bet amount of 1 ether to 0x0312855bb6e548578a36fa8de63b8f0d3d7d7dc2

In the best case you can win 4.95 Ether (almost 5 times of your invest)  Smiley

see original post or verified contract for more details.
newbie
Activity: 26
Merit: 0

However, I think I'm mistaken - transactions can't access the hash of the block they're in, since it's only computed after the transactions run. It'd still be trivial for a miner to game this, though, by only including the transaction if it causes them to win.

Theoretically may be. But I don't think it is really possible nor trivial in practice. There is not only one miner. And while the one tries to find a hash with and without his transaction other miners will already submitting new blocks. And btw. it would not be worth the amount he can win ;-).
newbie
Activity: 13
Merit: 0
Neat idea, but trivial to game: Anyone could write a contract that calls this one iff it would be the last player, and win every time.

That means you did not understand how it works (nor how contracts work). Not the last player wins! Read again ;-)

I think you're misunderstanding what I'm suggesting. Pseudocode for the contract would look something like this:
 - Read playersPerRound and players.length from the target contract (these variables are public).
 - If we wouldn't be the last player, return.
 - Otherwise, look at the first byte of the current block hash, and base our 'guess' on that. Submit that to the contract.

However, I think I'm mistaken - transactions can't access the hash of the block they're in, since it's only computed after the transactions run. It'd still be trivial for a miner to game this, though, by only including the transaction if it causes them to win.
newbie
Activity: 26
Merit: 0
Neat idea, but trivial to game: Anyone could write a contract that calls this one iff it would be the last player, and win every time.

That means you did not understand how it works (nor how contracts work). Not the last player wins! Read again ;-)
newbie
Activity: 13
Merit: 0
Neat idea, but trivial to game: Anyone could write a contract that calls this one iff it would be the last player, and win every time.
member
Activity: 70
Merit: 10
Did anybody checked the code? It's not a pyramid game! It's more like a Dice Game (with a 2 digit dice) or playing Red or Black on Roulette.


I reviewed the code, it is very pro written, clear and performant.
The owner can never scam you, everything is made to keep your investement like it should be.
The owner can change the number of players, disable the game, stop the round BUT all theses actions always perform a full refunding for all players before.
This is OK IMO.  Wink
newbie
Activity: 26
Merit: 0
Did anybody checked the code? It's not a pyramid game! It's more like a Dice Game (with a 2 digit dice) or playing Red or Black on Roulette.
newbie
Activity: 26
Merit: 0
it's a round based bet game (6 players)
you bet on the first byte of the 6th players block hash (unpredictable, 50% chance)

to join:
send one byte data (0x01 or 0x81) with a bet amount of 1 ether to 0x0312855bb6e548578a36fa8de63b8f0d3d7d7dc2
 - or -
send one byte data (0x01 or 0x81) with a bet amount of 0.1 ether (100 finney) to 0x7753a9d834844cfde5c211ec3912b49f0d8b8e11
 - or -
send one byte data (0x01 or 0x81) with a bet amount of 0.01 ether (10 finney) to 0x615d2c5155ea9841f2a926c3a4953d140d407c99

(click address to check the verified contract)

if your data byte is less than 0x80 you bet the 6th players block hash first byte is less than 0x80
if your data byte is greater than or equal 0x80 you bet the 6th players block hash first byte is greater than or equal 0x80

if you lose your bet your bet amount goes to the pool for winners

if you win your bet:
   * you will get back 100% of your payment
   * you will win a proportional part of the winner pool (win amount = winner pool / winners - 1%)

payout is triggered when a player starts the next round

additional rules:
each address can only play once per round
every additional payment during the same round will be paid back immediatly
every payment below the bet value is considered as a donation for the winner pool
every amount that is exceeding the bet value will be paid back
if nobody wins in a round, the paid amounts will raise the winner pool for the next round


how to send a data byte together with Ether:

If you are using Geth or Ethereum Wallet (wich starts Geth in the background):
after typing
Code:
geth attach
in a command line, enter:
Code:
eth.sendTransaction({from: eth.accounts[0], to:'0x7753A9D834844cFDe5C211ec3912b49f0d8B8e11', value:web3.toWei(0.1, "ether"), gas:100000, data:"0x01"})
to send "0x01" and 0.1 Ether to address 0x7753A9D834844cFDe5C211ec3912b49f0d8B8e11.

Change "0x01" to "0x81" if you want to change your bet or change value and address if you want to risk more or less (see original post).

In the GUI of Ethereum Wallet (Mist) just click SEND and after entering the address and the amount click the ADD DATA button and enter 01 or 81 in the input field below the button.
Jump to: