Author

Topic: Idea for a provably fair lottery (Read 1271 times)

full member
Activity: 235
Merit: 250
April 18, 2015, 12:46:52 PM
#16
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://bitcointalksearch.org/topic/m.11127367

Thanks all for the improvements and responses!
sr. member
Activity: 434
Merit: 250
:)
March 21, 2015, 03:48:06 PM
#15
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
legendary
Activity: 2940
Merit: 1333
March 21, 2015, 12:28:14 PM
#14
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.
legendary
Activity: 3808
Merit: 1723
March 21, 2015, 05:50:27 AM
#13
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.
newbie
Activity: 42
Merit: 0
March 21, 2015, 05:25:11 AM
#12
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! Grin

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!  Grin

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 Huh
you can play a trusted member to do it and plzzz, im more amazing than dooglus
full member
Activity: 235
Merit: 250
March 20, 2015, 10:05:15 PM
#11
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! Grin

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!  Grin

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 Huh
legendary
Activity: 2940
Merit: 1333
March 20, 2015, 09:06:13 PM
#10
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! Grin

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.
full member
Activity: 235
Merit: 250
March 20, 2015, 08:11:37 PM
#9
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  Grin

Anyone idea's to improve this?  Cheesy
newbie
Activity: 42
Merit: 0
March 20, 2015, 07:49:23 PM
#8
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
full member
Activity: 235
Merit: 250
March 20, 2015, 07:07:29 PM
#7
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?
newbie
Activity: 42
Merit: 0
March 20, 2015, 04:28:31 PM
#6
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?
full member
Activity: 235
Merit: 250
March 19, 2015, 09:52:56 PM
#5
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? Grin
sr. member
Activity: 434
Merit: 250
:)
March 19, 2015, 09:20:17 PM
#4
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.
newbie
Activity: 42
Merit: 0
March 19, 2015, 08:48:03 PM
#3
nice idea but there will be alot of competition, there are probably tens of lotteries out there
full member
Activity: 210
Merit: 101
March 19, 2015, 07:59:51 PM
#2
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. Smiley
full member
Activity: 235
Merit: 250
March 19, 2015, 07:48:53 PM
#1
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! Grin
Jump to: