Bitcoin Forum

Economy => Gambling => Topic started by: btcdealer.nl on March 20, 2015, 12:48:53 AM



Title: Idea for a provably fair lottery
Post by: btcdealer.nl on March 20, 2015, 12:48:53 AM
Hello,

I have an idea to provide a provably fair lottery.

Lets say we want to draw a number between 001 and 100.

I send 1 CLAM to 100 addresses simultaneous with the addresses labeled from 001-100.

The first address that stakes is the winner! ;D


Title: Re: Idea for a provably fair lottery
Post by: Grumpster on March 20, 2015, 12:59:51 AM
It definitely could work as far as I know and it's actually not too bad of an idea, from where I'm sitting at least. :)


Title: Re: Idea for a provably fair lottery
Post by: diegocosta on March 20, 2015, 01:48:03 AM
nice idea but there will be alot of competition, there are probably tens of lotteries out there


Title: Re: Idea for a provably fair lottery
Post by: Mist on March 20, 2015, 02:20:17 AM
would have to be a higher clam amount unless you want to wait AWHILE. Not a bad idea though, this could be done with other staking coins.


Title: Re: Idea for a provably fair lottery
Post by: btcdealer.nl on March 20, 2015, 02:52:56 AM
would have to be a higher clam amount unless you want to wait AWHILE. Not a bad idea though, this could be done with other staking coins.

Yeah the amount was more of an example. with 1 clam for each address the first stake would be in about 3 days right? ;D


Title: Re: Idea for a provably fair lottery
Post by: diegocosta on March 20, 2015, 09:28:31 PM
wont the clams with the lower value note attached to them (1,2,3,4,5,6,7,8,9) be sent faster than those that take up more space?


Title: Re: Idea for a provably fair lottery
Post by: btcdealer.nl on March 21, 2015, 12:07:29 AM
wont the clams with the lower value note attached to them (1,2,3,4,5,6,7,8,9) be sent faster than those that take up more space?

maybe in someway this could be equalized?


Title: Re: Idea for a provably fair lottery
Post by: diegocosta on March 21, 2015, 12:49:23 AM
wont the clams with the lower value note attached to them (1,2,3,4,5,6,7,8,9) be sent faster than those that take up more space?

maybe in someway this could be equalized?

he could make sere all the bets have three numbers
examples......

001, 002, 045, 099, 100


Title: Re: Idea for a provably fair lottery
Post by: btcdealer.nl on March 21, 2015, 01:11:37 AM
wont the clams with the lower value note attached to them (1,2,3,4,5,6,7,8,9) be sent faster than those that take up more space?

maybe in someway this could be equalized?

he could make sere all the bets have three numbers
examples......

001, 002, 045, 099, 100

Yep i was thinking about that.

Maybe work it out and give it a try if people would like to have a little lottery  ;D

Anyone idea's to improve this?  :D


Title: Re: Idea for a provably fair lottery
Post by: dooglus on March 21, 2015, 02:06:13 AM
Hello,

I have an idea for a provide a provably fair lottery.

Lets say we want to draw a number between 1 and 100.

I send 0.1 CLAM to 100 addresses simultaneous with the addresses labeled from 1-100 ( all in 1 wallet).

The first address that stakes is the winner! ;D

It's not a bad idea, but it would need some changes I think.

As I understand it, only the person who owns an address' private key can tell whether an address is ready to stake. He publishes the block, and everyone can check that it's correct. But if he doesn't want to stake at that time, he can decide to not publish the block and nobody can tell that he deliberately withheld a block. So it's not really provably fair - the guy running the lottery can deliberately make you lose by withholding the block that stakes the coin at your address.

So to make it provably fair, each player will have to run their own wallet, and stake their own address. Maybe it works like this:

* everyone who wants to play sends 1 CLAM (a) to x111 (an address owned by the guy running the lottery) and 1 CLAM (b) to x222 (a new address in their own wallet - x222 will be different for each player) in the same transaction (*)
* everyone runs their wallet 24/7, trying to stake the coin they sent to x222
* the first one to stake wins

You could insist that the address only has that single output, or you could just say that only outputs created in the same transaction as a 1 CLAM deposit to x111 count.

There's no reason the entry fee (a) and the staking size (b) need to be the same as each other. The entry fee can be adjusted based on how big people want to gamble, and the staking size can be adjusted to vary how long the 'draw' is likely to take.

You could set a rule like "each person can pick their own entry fee, and the stake size has to be N times the entry size" (for some N) - that way I can effectively buy 10 tickets at once by sending 10 CLAM to the entry address (x111) and 10*N CLAM to my staking address (x222). Bigger outputs have bigger chances of staking.

(*) To make a transaction which sends to two different addresses at once, you click 'add recipient' in the bottom left of clam-qt's 'send' tab.

Another concern is that people will enter at different times, so their staking outputs will mature at different times, and we don't get a clean start to the race. To fix that, maybe we make the following changes:

* the lottery organiser decides a date or block number when the game will start running
* everyone who wants to play sends their entry fee plus their staking amount to the lottery organiser, and indicates which of their own addresses they want to use for the race
* when the time or block number comes, the lottery organiser sends everyone's staking amount to their staking address, all in a single transaction, so they all mature at the same time and we get a good clean start to the race
* you can watch just that one transaction to see which of the outputs stakes first
* whichever output stakes first gets all the entry fees (minus the organiser's cut)

Is that workable?

Edit: we still have the obvious problem that the lottery organiser might just decide to keep all the entry fees for himself. This doesn't give us the "smart contract" property of having the blockchain automatically pay out the winner for us. I doubt such a thing is possible using CLAM.


Title: Re: Idea for a provably fair lottery
Post by: btcdealer.nl on March 21, 2015, 03:05:15 AM
Hello,

I have an idea for a provide a provably fair lottery.

Lets say we want to draw a number between 1 and 100.

I send 0.1 CLAM to 100 addresses simultaneous with the addresses labeled from 1-100 ( all in 1 wallet).

The first address that stakes is the winner! ;D

It's not a bad idea, but it would need some changes I think.

As I understand it, only the person who owns an address' private key can tell whether an address is ready to stake. He publishes the block, and everyone can check that it's correct. But if he doesn't want to stake at that time, he can decide to not publish the block and nobody can tell that he deliberately withheld a block. So it's not really provably fair - the guy running the lottery can deliberately make you lose by withholding the block that stakes the coin at your address.

So to make it provably fair, each player will have to run their own wallet, and stake their own address. Maybe it works like this:

* everyone who wants to play sends 1 CLAM (a) to x111 (an address owned by the guy running the lottery) and 1 CLAM (b) to x222 (a new address in their own wallet - x222 will be different for each player) in the same transaction (*)
* everyone runs their wallet 24/7, trying to stake the coin they sent to x222
* the first one to stake wins

You could insist that the address only has that single output, or you could just say that only outputs created in the same transaction as a 1 CLAM deposit to x111 count.

There's no reason the entry fee (a) and the staking size (b) need to be the same as each other. The entry fee can be adjusted based on how big people want to gamble, and the staking size can be adjusted to vary how long the 'draw' is likely to take.

You could set a rule like "each person can pick their own entry fee, and the stake size has to be N times the entry size" (for some N) - that way I can effectively buy 10 tickets at once by sending 10 CLAM to the entry address (x111) and 10*N CLAM to my staking address (x222). Bigger outputs have bigger chances of staking.

(*) To make a transaction which sends to two different addresses at once, you click 'add recipient' in the bottom left of clam-qt's 'send' tab.

Another concern is that people will enter at different times, so their staking outputs will mature at different times, and we don't get a clean start to the race. To fix that, maybe we make the following changes:

* the lottery organiser decides a date or block number when the game will start running
* everyone who wants to play sends their entry fee plus their staking amount to the lottery organiser, and indicates which of their own addresses they want to use for the race
* when the time or block number comes, the lottery organiser sends everyone's staking amount to their staking address, all in a single transaction, so they all mature at the same time and we get a good clean start to the race
* you can watch just that one transaction to see which of the outputs stakes first
* whichever output stakes first gets all the entry fees (minus the organiser's cut)

Is that workable?

Edit: we still have the obvious problem that the lottery organiser might just decide to keep all the entry fees for himself. This doesn't give us the "smart contract" property of having the blockchain automatically pay out the winner for us. I doubt such a thing is possible using CLAM.

Wow you're really as amazing as they say! You almost worked it out completely thanks!  ;D

Indeed we still have the obvious problem that the organiser might decide to keep all the entry fees for himself.
Couldn't this obvious problem be solved by using one of these following things:

* Other currency for the entry fees with smart contract possibility's (BTC?).
* trusted escrow('s) from this forum hold(s) the entry fees.

Then again we still have the obvious problem that the organiser might decide to keep all the staking entry's for himself.. hmzz ???


Title: Re: Idea for a provably fair lottery
Post by: diegocosta on March 21, 2015, 10:25:11 AM
Hello,

I have an idea for a provide a provably fair lottery.

Lets say we want to draw a number between 1 and 100.

I send 0.1 CLAM to 100 addresses simultaneous with the addresses labeled from 1-100 ( all in 1 wallet).

The first address that stakes is the winner! ;D

It's not a bad idea, but it would need some changes I think.

As I understand it, only the person who owns an address' private key can tell whether an address is ready to stake. He publishes the block, and everyone can check that it's correct. But if he doesn't want to stake at that time, he can decide to not publish the block and nobody can tell that he deliberately withheld a block. So it's not really provably fair - the guy running the lottery can deliberately make you lose by withholding the block that stakes the coin at your address.

So to make it provably fair, each player will have to run their own wallet, and stake their own address. Maybe it works like this:

* everyone who wants to play sends 1 CLAM (a) to x111 (an address owned by the guy running the lottery) and 1 CLAM (b) to x222 (a new address in their own wallet - x222 will be different for each player) in the same transaction (*)
* everyone runs their wallet 24/7, trying to stake the coin they sent to x222
* the first one to stake wins

You could insist that the address only has that single output, or you could just say that only outputs created in the same transaction as a 1 CLAM deposit to x111 count.

There's no reason the entry fee (a) and the staking size (b) need to be the same as each other. The entry fee can be adjusted based on how big people want to gamble, and the staking size can be adjusted to vary how long the 'draw' is likely to take.

You could set a rule like "each person can pick their own entry fee, and the stake size has to be N times the entry size" (for some N) - that way I can effectively buy 10 tickets at once by sending 10 CLAM to the entry address (x111) and 10*N CLAM to my staking address (x222). Bigger outputs have bigger chances of staking.

(*) To make a transaction which sends to two different addresses at once, you click 'add recipient' in the bottom left of clam-qt's 'send' tab.

Another concern is that people will enter at different times, so their staking outputs will mature at different times, and we don't get a clean start to the race. To fix that, maybe we make the following changes:

* the lottery organiser decides a date or block number when the game will start running
* everyone who wants to play sends their entry fee plus their staking amount to the lottery organiser, and indicates which of their own addresses they want to use for the race
* when the time or block number comes, the lottery organiser sends everyone's staking amount to their staking address, all in a single transaction, so they all mature at the same time and we get a good clean start to the race
* you can watch just that one transaction to see which of the outputs stakes first
* whichever output stakes first gets all the entry fees (minus the organiser's cut)

Is that workable?

Edit: we still have the obvious problem that the lottery organiser might just decide to keep all the entry fees for himself. This doesn't give us the "smart contract" property of having the blockchain automatically pay out the winner for us. I doubt such a thing is possible using CLAM.

Wow you're really as amazing as they say! You almost worked it out completely thanks!  ;D

Indeed we still have the obvious problem that the organiser might decide to keep all the entry fees for himself.
Couldn't this obvious problem be solved by using one of these following things:

* Other currency for the entry fees with smart contract possibility's (BTC?).
* trusted escrow('s) from this forum hold(s) the entry fees.

Then again we still have the obvious problem that the organizer might decide to keep all the staking entry's for himself.. hmzz ???
you can play a trusted member to do it and plzzz, im more amazing than dooglus


Title: Re: Idea for a provably fair lottery
Post by: adaseb on March 21, 2015, 10:50:27 AM
Its not a bad idea but people would much rather just roll some dice and be done with it instatnely instead of waiting a week to see if they've won something.


Title: Re: Idea for a provably fair lottery
Post by: dooglus on March 21, 2015, 05:28:14 PM
Its not a bad idea but people would much rather just roll some dice and be done with it instatnely instead of waiting a week to see if they've won something.

Some people like suspense I guess.

With this scheme you get the sense of actively competing to win, too, since everyone's trying to stake their own coin.


Title: Re: Idea for a provably fair lottery
Post by: Mist on March 21, 2015, 08:48:06 PM
Its not a bad idea but people would much rather just roll some dice and be done with it instatnely instead of waiting a week to see if they've won something.

Some people like suspense I guess.

With this scheme you get the sense of actively competing to win, too, since everyone's trying to stake their own coin.
Yeah, I like this factor of it


Title: Re: Idea for a provably fair lottery
Post by: btcdealer.nl on April 18, 2015, 05:46:52 PM
Its not a bad idea but people would much rather just roll some dice and be done with it instatnely instead of waiting a week to see if they've won something.

Some people like suspense I guess.

With this scheme you get the sense of actively competing to win, too, since everyone's trying to stake their own coin.
Yeah, I like this factor of it


Well i gave it a shot and started a post to try the game.
If people want to join this Actively competing stake raffle check:
https://bitcointalk.org/index.php?topic=1029108.msg11127367#msg11127367

Thanks all for the improvements and responses!