Bitcoin Forum
April 25, 2024, 10:56:49 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: EtherShuffle  (Read 94 times)
shuffler (OP)
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
April 18, 2018, 07:41:29 AM
 #1

So this is sort of altcoin related as it is Ethereum-based. Is that okay?

To tell you the truth, I don't gamble. I do program though, I liked the concept of Satoshi dice but I thought the odds weren't as favorable as I'd like. So I created EtherShuffle.

Instead of a single win per bet think multiple players in a single shuffle. The players are what gets shuffled. The order in which you join a game doesn't matter, what does matter is the order after the players are shuffled (the players are shuffled cryptographically fairly).

All but one player wins:
  • The first player gets 150% of what they put in...
  • The second player gets 125% of what they put in...
  • The third player gets 112.5% of what they put in...
  • The fourth player gets 106.25% of what they put in...
  • The fifth player loses : (

A list of players is represented by an array ([0, 1, 2, 3, 4]). This array is shuffled and a hashed using a secret and stored in EtherShuffle's smart contract. Once a shuffle has enough players the order is revealed by saving the result and secret (for the single shuffle game) to the blockchain.

To play one simply sends 0.1 ETH (100 finneys) to the contract (with 180000 for a gas limit). The contract automatically adds the sender to a game (creating a new one if necessary). Once the game is complete a contract observer (a little service I wrote) sends the winnings from the contract back to the winning players.

Here's the mainnet contract address: 0x6d69fcb28c9fcc9e9d39e3608190b24f4df295e7

https://etherscan.io/address/0x6d69fcb28c9fcc9e9d39e3608190b24f4df295e7

Feel free to test it out on Ropsten too, here: 0x466743bf20452def9c3234dac64d784c022bd6d2

https://ropsten.etherscan.io/address/0x466743bf20452def9c3234dac64d784c022bd6d2
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!