Bitcoin Forum

Bitcoin => Project Development => Topic started by: Hayati on October 24, 2016, 04:45:57 PM



Title: Lottery Game
Post by: Hayati on October 24, 2016, 04:45:57 PM
I want to create a lottery game but do not have enough knowledge to create or implement a deposit/withdrawal or provably fair system.

Would you be willing to participate in the game if there is a hashed winning number and all deposit are held in escrow?

The escrow would have to be a member of this forum and sign a message with the deposit addresses stating he owns them and only he has access.

There will be 3 games, each one has a prize of 1 BTC.

#1 Entry: 0.0001, Players: 10,000
#2 Entry: 0.001, Players: 1,000
#3 Entry: 0.01, Players: 100


Title: Re: Lottery Game
Post by: MartinL on October 24, 2016, 05:24:46 PM
Merely proving that the game result was predetermined is not sufficient in a pool-backed game like a lottery, unfortunately. The problem is that the game operator knows the result ahead of time and could participate in the lottery himself with the winning ticket.

A simple solution would be to choose a block some time in the future and use its hash as the game result. That way players can be certain that the operator isn't (unfairly) partaking in the game. It is not completely provably fair as a big miner could still cheat, but it is probably sufficient for a small game.


Title: Re: Lottery Game
Post by: Hayati on October 24, 2016, 05:27:39 PM
Merely proving that the game result was predetermined is not sufficient in a pool-backed game like a lottery, unfortunately. The problem is that the game operator knows the result ahead of time and could participate in the lottery himself with the winning ticket.

A simple solution would be to choose a block some time in the future and use its hash as the game result. That way players can be certain that the operator isn't (unfairly) partaking in the game. It is not completely provably fair as a big miner could still cheat, but it is probably sufficient for a small game.

Thank you for your comment. How would this work though, I mean what tool do I use and how? Which block do I choose in the future also?


Title: Re: Lottery Game
Post by: achow101 on October 24, 2016, 06:09:38 PM
Thank you for your comment. How would this work though, I mean what tool do I use and how? Which block do I choose in the future also?
Your lottery has to have an end time, so you would do something like choose the 6th block after the end time and take the first 4 bytes and use that as your winning number.


Title: Re: Lottery Game
Post by: Kakmakr on October 25, 2016, 06:38:46 AM
Merely proving that the game result was predetermined is not sufficient in a pool-backed game like a lottery, unfortunately. The problem is that the game operator knows the result ahead of time and could participate in the lottery himself with the winning ticket.

A simple solution would be to choose a block some time in the future and use its hash as the game result. That way players can be certain that the operator isn't (unfairly) partaking in the game. It is not completely provably fair as a big miner could still cheat, but it is probably sufficient for a small game.

The problem with that is, small lotteries grow bigger and 1BTC is still enough money for bigger miners to cheat. There have been a lottery on this forum, based on the blocks in the Blockchain and the miners did cheat. I cannot find it now, but it was pretty big and the operator was a well known user in the community.

The Millionairmakers concept on Reddit seems to work, if you want to try and get a hold of those guys. Go to : https://www.reddit.com/r/millionairemakers/


Title: Re: Lottery Game
Post by: MartinL on October 25, 2016, 07:18:08 AM
The problem with that is, small lotteries grow bigger and 1BTC is still enough money for bigger miners to cheat. There have been a lottery on this forum, based on the blocks in the Blockchain and the miners did cheat. I cannot find it now, but it was pretty big and the operator was a well known user in the community.

The Millionairmakers concept on Reddit seems to work, if you want to try and get a hold of those guys. Go to : https://www.reddit.com/r/millionairemakers/

Unfortunately, the MillionaireMakers system (https://www.reddit.com/r/millionairemakers/comments/2ournt/explanation_of_our_new_drawing_system_inspired_by/) suffers from a different problem: A big miner can withhold all blocks that do not result in him winning the drawing, unfairly increasing the chance that a winning block is eventually found.

The now defunct PevPot.com (https://bitcointalk.org/index.php?topic=1243970.msg12951724#msg12951724) is an example of a system that solves this problem. It does not use the hash of the deciding block directly but instead applies a very slow (think 30+ minutes) key stretching function to it and uses its result to determine the winner. This prevents a big miner from even knowing whether any blocks he finds would result in him winning the draw until it is likely too late to submit that block. The key stretching function can be made even slower to provide even more certainty, though I do not believe it is necessary.