This past week I've been working on a Bitcoin game. The site is still beta, but should function somewhat normally. You'll have to forgive the design since I'm kind of a novice when it comes to web design, this is actually an off-the shelf template which I threw out all of the existing PHP code and built upon it.

Here's how the game works.

The game has 'rounds', each round has a jackpot (for example, 1 Bitcoin). There are then ten tickets. Once all of the tickets are purchased, the game randomly selects a winner and awards them the jackpot. Players can purchase more than one ticket to increase their odds (however, purchasing all of the tickets costs you more than the jackpot).

Right now, the game creates a new round when there are no active rounds. I’ll eventually set it up to where you can view the past few rounds to see who won them, perhaps even a stats page for each user.

Players always have at least a 1 in 10 chance of winning the round. If people enjoy the game and use it, I intend to make much larger jackpots and different kinds of games.

Registration just requires a username and an email. A randomly generated password is emailed to you for security reasons, I have not yet implemented the function to change your password, or to retrieve your password. So make sure to put your password in a safe place.

The payments are handled by Paysius, so if there are any known issues with this payment processor that I'm not aware of, please let me know. I'm quite impressed with how it works so I figured it'd be better for me to use that, rather than to re-invent the wheel.

A single unique Bitcoin address is generated on registration to handle payments for the user, I don’t see the point of regenerating new addresses for each user every login for this application, but if there is a reason to I’d love to hear it.

Is there anything that prevents you from buying tickets yourself and then picking yourself as the winner? If not, you may want to set something up that is verifiable so you can show you aren't just picking a winner and that it truly is random.

Is there anything that prevents you from buying tickets yourself and then picking yourself as the winner? If not, you may want to set something up that is verifiable so you can show you aren't just picking a winner and that it truly is random.

I think I'd have more to gain by running a legitimate game, rather than another scam. But I would like to resolve this issue if I can.

The winner is selected by the ticket number, and I calculate it the following way:

Code:

srand((double)microtime()*1234567);$Winner = rand(1,10);

Are there any trusted third parties where I can obtain a random number from, something that you guys can track?

I have considered making it so you can view a players win history, their ticket purchases, which ticket they purchased and for which round, along with any withdrawals. I could provide the transaction id when they withdraw Bitcoins, so that you know Bitcoins are being legitimately withdrawn.

I have also considered doing away with the username altogether, and making it just a Bitcoin address. Right now when tickets are purchased, it shows the username of the owner. So you can tell if a single person owns most of the tickets.

Once people are satisfied with the random number generation or you modify the random number generation I will shift you to the lotteries section.The site looks nice and clean - good work and good luck

I'm going to be changing the random number generator to use random data from Hotbits in the seed (as well as changing it to use mt_srand/mt_rand). The data from Hotbits will be in addition to microtime() when seeding.

Once people are satisfied with the random number generation or you modify the random number generation I will shift you to the lotteries section.The site looks nice and clean - good work and good luck

I'm going to be changing the random number generator to use random data from Hotbits in the seed (as well as changing it to use mt_srand/mt_rand). The data from Hotbits will be in addition to microtime() when seeding.

Please bare with me here, I'm not a programmer so I don't understand all of this completely but...

You could use a RNG similar to what they are using at bitjack21.com, in there case (a game of blackjack) the PLAYER inputs a 128-bit number, the server uses a hardware RNG and creates a 2nd 128-bit string, and then uses another sequence to shuffle the cards.

So essentially, the player's 128-bit string are the actual cards being used in the deck - combined with the server's 128-bit string and shuffler. Therefore the number the player inputs actually determines the order of the deck! The reason you can't cheat is because their server creates the shuffle order using a hardware RNG.

So, to keep things fair you could employ a similar script where each player (or ticket purchased) could input their OWN string of numbers - then after all 10 tickets have been purchased your server would implement some type of formula based on each players string to create the number 1-10. You could even use the same analogy of blackjack where you are essentially picking a "card" A-2-3-4...10 which therefore determines the winner.

Again, I'm not a programmer and not too sure how hard this would be to implement. However, after each round you could display each player's string and therefore allow the players to verify that their string was used to choose the winner...

Again, I'm not a programmer and not too sure how hard this would be to implement. However, after each round you could display each player's string and therefore allow the players to verify that their string was used to choose the winner...

Hope that helps! Let me know what you think!

It sounds to me like I could accomplish something quite similar by exposing the seed that was used during a particular round. But the thing is there is no guarantee that you can replicate the number generated from that seed on a different system. If I'm mistaken and someone can in-fact replicate the numbers on another system, I'd be happy to expose the seeds used for each round.

I have updated the random number generator to use data from Hotbits. Every hour or so it will request a fresh data from Hotbits, this data is then used in addition to microtime() when generating a seed.