Bitcoin Forum
May 24, 2024, 03:05:13 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Idea for a provably fair lottery  (Read 1247 times)
btcdealer.nl (OP)
Full Member
***
Offline Offline

Activity: 235
Merit: 250



View Profile
March 20, 2015, 12:48:53 AM
Last edit: March 21, 2015, 09:45:24 PM by btcdealer.nl
 #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
Grumpster
Full Member
***
Offline Offline

Activity: 210
Merit: 100


View Profile
March 20, 2015, 12:59:51 AM
 #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
diegocosta
Newbie
*
Offline Offline

Activity: 42
Merit: 0


View Profile
March 20, 2015, 01:48:03 AM
 #3

nice idea but there will be alot of competition, there are probably tens of lotteries out there
Mist
Sr. Member
****
Offline Offline

Activity: 434
Merit: 250

:)


View Profile
March 20, 2015, 02:20:17 AM
 #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.
btcdealer.nl (OP)
Full Member
***
Offline Offline

Activity: 235
Merit: 250



View Profile
March 20, 2015, 02:52:56 AM
 #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
diegocosta
Newbie
*
Offline Offline

Activity: 42
Merit: 0


View Profile
March 20, 2015, 09: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?
btcdealer.nl (OP)
Full Member
***
Offline Offline

Activity: 235
Merit: 250



View Profile
March 21, 2015, 12:07:29 AM
 #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?
diegocosta
Newbie
*
Offline Offline

Activity: 42
Merit: 0


View Profile
March 21, 2015, 12:49:23 AM
 #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
btcdealer.nl (OP)
Full Member
***
Offline Offline

Activity: 235
Merit: 250



View Profile
March 21, 2015, 01:11:37 AM
 #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
dooglus
Legendary
*
Offline Offline

Activity: 2940
Merit: 1330



View Profile
March 21, 2015, 02:06:13 AM
 #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.

Just-Dice                 ██             
          ██████████         
      ██████████████████     
  ██████████████████████████ 
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
    ██████████████████████   
        ██████████████       
            ██████           
   Play or Invest                 ██             
          ██████████         
      ██████████████████     
  ██████████████████████████ 
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
    ██████████████████████   
        ██████████████       
            ██████           
   1% House Edge
btcdealer.nl (OP)
Full Member
***
Offline Offline

Activity: 235
Merit: 250



View Profile
March 21, 2015, 03:05:15 AM
 #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
diegocosta
Newbie
*
Offline Offline

Activity: 42
Merit: 0


View Profile
March 21, 2015, 10: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
adaseb
Legendary
*
Offline Offline

Activity: 3766
Merit: 1718



View Profile
March 21, 2015, 10: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.
dooglus
Legendary
*
Offline Offline

Activity: 2940
Merit: 1330



View Profile
March 21, 2015, 05: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.

Just-Dice                 ██             
          ██████████         
      ██████████████████     
  ██████████████████████████ 
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
    ██████████████████████   
        ██████████████       
            ██████           
   Play or Invest                 ██             
          ██████████         
      ██████████████████     
  ██████████████████████████ 
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
    ██████████████████████   
        ██████████████       
            ██████           
   1% House Edge
Mist
Sr. Member
****
Offline Offline

Activity: 434
Merit: 250

:)


View Profile
March 21, 2015, 08: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
btcdealer.nl (OP)
Full Member
***
Offline Offline

Activity: 235
Merit: 250



View Profile
April 18, 2015, 05: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://bitcointalk.org/index.php?topic=1029108.msg11127367#msg11127367

Thanks all for the improvements and responses!
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!