Bitcoin Forum
May 14, 2024, 01:00:22 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: Bit-lottery - Need a transparent idea  (Read 2143 times)
bit-lottery (OP)
Newbie
*
Offline Offline

Activity: 37
Merit: 0


View Profile WWW
August 28, 2014, 08:05:40 PM
 #1

Hello people,

I am launching this today : http://www.bit-lottery.com
Here is the thread for those interested : https://bitcointalk.org/index.php?topic=760481.0

I am a little bit stuck here, and i am not sure how to do it : I want the random pick of the ticket ID to be completly transparent. Basically, that the user know for sure that the ID that the server picked really is random, and is not just picking an address that i speicifed before or anything like that.

Would anyone have any idea how i could do that ?
I was thinking of using the price of BTC in $, using the last decimal number as the ticket ID, at the time of the pick. But it could become easy for some to know if they should play or not at the moment.
I also thought about using http://www.random.org/API but there again : how would the user know i really used it ?
So i am kind of stuck at this point, and i don t wish to develop half solutions to that specific issue.  I will offer 0.1 btc to the first one who can come with an unbreakable idea ( and something that is no rocket science to code too ) !

Thanks.
1715648422
Hero Member
*
Offline Offline

Posts: 1715648422

View Profile Personal Message (Offline)

Ignore
1715648422
Reply with quote  #2

1715648422
Report to moderator
You get merit points when someone likes your post enough to give you some. And for every 2 merit points you receive, you can send 1 merit point to someone else!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715648422
Hero Member
*
Offline Offline

Posts: 1715648422

View Profile Personal Message (Offline)

Ignore
1715648422
Reply with quote  #2

1715648422
Report to moderator
1715648422
Hero Member
*
Offline Offline

Posts: 1715648422

View Profile Personal Message (Offline)

Ignore
1715648422
Reply with quote  #2

1715648422
Report to moderator
1715648422
Hero Member
*
Offline Offline

Posts: 1715648422

View Profile Personal Message (Offline)

Ignore
1715648422
Reply with quote  #2

1715648422
Report to moderator
gordoh
Sr. Member
****
Offline Offline

Activity: 350
Merit: 250



View Profile
August 29, 2014, 06:27:20 AM
 #2

Why don't you use the UK lottery's numbers as your numbers. You make your draw the same date and time as the UK lottery, and then use the same numbers. That way it will be impossible for you to influence the numbers in any way. Im sure you could add a little widget that shows the lottery numbers in real time. It wont be that difficult to do.  Grin
bit-lottery (OP)
Newbie
*
Offline Offline

Activity: 37
Merit: 0


View Profile WWW
August 29, 2014, 11:49:28 AM
 #3

The lottery is not based on date but on numbers.
So when 10 tickets are bought, the system pick a winner who gets the pot for all tickets - 1 .
Same will go for the 1/50 and the 1/100 . When 50 or 100 tickets are bought, the system picks a winner.
cloverme
Legendary
*
Offline Offline

Activity: 1512
Merit: 1057


SpacePirate.io


View Profile WWW
August 29, 2014, 06:27:34 PM
 #4

I would base it off of something blockchain related and out of your control... Just an example here to give more ideas:

Since you list the transactions on your site, you can base something off the blockchain.  So let's say the 10th ticket transaction of your 10/10 lotto is in block 318117, the winner could be determined in the next unmined block 318118. An example is maybe the last integer in the hash of the block, so for 318118 the hash was 00000000000000001f1c023df24bece678182e21a73f493d8316d62ee78895ae, so the winner would be ticket #5.

Or something based of anything in the blockchain that is not predictable but fits your pool of tickets to pick a winner, the mod of transactions in the block, etc.

-C
bit-lottery (OP)
Newbie
*
Offline Offline

Activity: 37
Merit: 0


View Profile WWW
August 30, 2014, 08:19:05 PM
 #5

I would base it off of something blockchain related and out of your control... Just an example here to give more ideas:

Since you list the transactions on your site, you can base something off the blockchain.  So let's say the 10th ticket transaction of your 10/10 lotto is in block 318117, the winner could be determined in the next unmined block 318118. An example is maybe the last integer in the hash of the block, so for 318118 the hash was 00000000000000001f1c023df24bece678182e21a73f493d8316d62ee78895ae, so the winner would be ticket #5.

Or something based of anything in the blockchain that is not predictable but fits your pool of tickets to pick a winner, the mod of transactions in the block, etc.

-C


Alright, that seems like a good idea...
But ... let say i do that. I would then have to explain that on the website. Most won't understand that system... but also, those who will, will be able to decide if it's worth it to play or not. Like :  wait to get 9 tickets in, see if it is worth it to buy the last ticket not...  No ?
doof
Hero Member
*****
Offline Offline

Activity: 765
Merit: 503


View Profile WWW
August 31, 2014, 06:59:03 AM
 #6

I would base it off of something blockchain related and out of your control... Just an example here to give more ideas:

Since you list the transactions on your site, you can base something off the blockchain.  So let's say the 10th ticket transaction of your 10/10 lotto is in block 318117, the winner could be determined in the next unmined block 318118. An example is maybe the last integer in the hash of the block, so for 318118 the hash was 00000000000000001f1c023df24bece678182e21a73f493d8316d62ee78895ae, so the winner would be ticket #5.

Or something based of anything in the blockchain that is not predictable but fits your pool of tickets to pick a winner, the mod of transactions in the block, etc.

-C


Alright, that seems like a good idea...
But ... let say i do that. I would then have to explain that on the website. Most won't understand that system... but also, those who will, will be able to decide if it's worth it to play or not. Like :  wait to get 9 tickets in, see if it is worth it to buy the last ticket not...  No ?

You don't have to explain it to people that don't understand.  To them you say "picked a winner at random"
serje
Legendary
*
Offline Offline

Activity: 1232
Merit: 1002



View Profile
August 31, 2014, 07:04:27 AM
 #7

why don't you use the blockchain for the winner?

if you announce to draw winners 2014-08-31 07:00:00 you just have to use the hash of the block that was mined closer to the date of the drawing

for example this hash 00000000000000000a82584441886fba86bd4753c9def3158a2bd38dbe5bd893 witch belongs to block 318393 mined on     2014-08-31 06:55:27


or if a block is found before 07:04:33 you use that one Smiley

and the hash can be converted to a number or you can use the numbers in the hash Smiley

Space for rent if its still trending
PvP
Member
**
Offline Offline

Activity: 102
Merit: 10


View Profile
August 31, 2014, 08:37:56 AM
 #8

is random.org not good enough?
rz20
Legendary
*
Offline Offline

Activity: 1330
Merit: 1001


View Profile
August 31, 2014, 01:40:30 PM
 #9

is random.org not good enough?
You can't base a lottery on random.org if you want to make it legal. You can simply modify the source of the website and pick the number that you want. The number of the block system seems to be the most fair as nobody will be able to modify it. You can explain it in a verification tab or something as the gambling sites, I really don't see a problem there-
Miitch
Full Member
***
Offline Offline

Activity: 126
Merit: 100


View Profile
August 31, 2014, 02:05:07 PM
 #10

Another option would be to use the provably fair model. Pick a number in advance and create a SHA256 hash of that number. Everyone when they buy their ticket also gets the 'secret hash' along with their ticket number. When the winner is drawn you can reveal the initial number and people can run it through a SHA256 hasher and verify that it matches the 'secret hash' they were given before the draw.

Might that work? Or is it absolutely vital that the number isn't known in advance?

▇ ▇ ▇ ▇ ▇ ▇ ▇ ▇ ▇   COIN-SWEEPER
▇ ▇ ▇ ▇ ▇ ▇ ▇ ▇    Avoid Bombs Win BIG
▇ ▇ ▇ ▇ ▇ ▇ ▇ ▇   1% House Edge   ▇ ▇ ▇ ▇ ▇ ▇ ▇
PvP
Member
**
Offline Offline

Activity: 102
Merit: 10


View Profile
August 31, 2014, 04:06:40 PM
 #11

Another option would be to use the provably fair model. Pick a number in advance and create a SHA256 hash of that number. Everyone when they buy their ticket also gets the 'secret hash' along with their ticket number. When the winner is drawn you can reveal the initial number and people can run it through a SHA256 hasher and verify that it matches the 'secret hash' they were given before the draw.

Might that work? Or is it absolutely vital that the number isn't known in advance?

I am not an expert of the Provably Fair option, but a serious Provably Fair option should do the trick imho. and then random.org RNG should be fine or am I wrong?
cloverme
Legendary
*
Offline Offline

Activity: 1512
Merit: 1057


SpacePirate.io


View Profile WWW
August 31, 2014, 05:02:00 PM
 #12

Provably fair is only semi effective (search reddit) and random.org might not be too bad, but it's not fool proof either and subject to future collusion because it's run by people at some level. Suppose bit-lottery got big and you had multi-million dollar jackpots, our friend here could have his friend offer to buy random.org for "educational purposes"  for $1 million and then collude on the back end for bit-lottery to win 10 million, etc. Or just spend a little time and money and start a competitor to random.org and make it legit for a year then collude with bit-lottery later on.

I think the best option would be something completely out of the control of the bit-lottery and beyond influence or collusion, like a blockhain or multiple blockchains to avoid the 51% stuff (say bitcoin and litecoin blockchains).
serje
Legendary
*
Offline Offline

Activity: 1232
Merit: 1002



View Profile
August 31, 2014, 08:36:34 PM
 #13

Provably fair is only semi effective (search reddit) and random.org might not be too bad, but it's not fool proof either and subject to future collusion because it's run by people at some level. Suppose bit-lottery got big and you had multi-million dollar jackpots, our friend here could have his friend offer to buy random.org for "educational purposes"  for $1 million and then collude on the back end for bit-lottery to win 10 million, etc. Or just spend a little time and money and start a competitor to random.org and make it legit for a year then collude with bit-lottery later on.

I think the best option would be something completely out of the control of the bit-lottery and beyond influence or collusion, like a blockhain or multiple blockchains to avoid the 51% stuff (say bitcoin and litecoin blockchains).

Hahahha

OK i'm paranoid, I admit it .... but you sir are way ahead of me .... who the fuck would do a 51% on bitcoin to win a lottery??? if you do that you have all the bitcoins you wnat you don't need the jackpot Tongue

Space for rent if its still trending
cloverme
Legendary
*
Offline Offline

Activity: 1512
Merit: 1057


SpacePirate.io


View Profile WWW
September 01, 2014, 02:46:52 AM
 #14

lol I don't deny there's a nice collection of tin foil hats somewhere...Saved me from getting Gox'd though   Grin
Nobitcoin
Legendary
*
Offline Offline

Activity: 966
Merit: 1000


In holiday we trust


View Profile
September 01, 2014, 03:34:40 PM
 #15

How about you take it from a dice site the roll of the dice at the time will be random
bit-lottery (OP)
Newbie
*
Offline Offline

Activity: 37
Merit: 0


View Profile WWW
September 04, 2014, 01:41:13 PM
 #16

Alright people, Thanks a lot for your contributions !

So, i think , by reading you all, the very best is to base that on the blockchain block hash somehow like you said. This way, everyone can easily verify the random pick.  "Cloverme" solution is the best i can think of right now : Base the winner on the next block hash found :
Quote
so for 318118 the hash was 00000000000000001f1c023df24bece678182e21a73f493d8316d62ee78895ae, so the winner would be ticket #5.

Although, i have question. I am not good enough with bitcoin internal systems, so what i would like to know is :
What if i use the last ticket bought TXID instead of the next hash block.
Like that : i am user 10... i get a ticket, send the payment  : the website gets the payment, and the txid. And pick the winner with the last integer from the last txid ? Basically... i guess the question is: is there anyway for user 10 to know in advance what the txid will be ?

The reason i would prefer to base it on the txid, is that this way i have no lag : As soon as i get 10 tickets in, i can pick a winner, instead of waiting for the next block.

PS : Cloverme, gimme your btc address, you get the 0.1 btc. 
PS 2 : random.org is not free :-( If i wish to create a draw and keep the results online on their website, i have to pay for it, and the minimum price is 3.75 $. Actually, i think i am gonna make a website like random.org, payable in bitcoin, for a much lower fee th... That will be for another project !


Ditto
Sr. Member
****
Offline Offline

Activity: 330
Merit: 250


View Profile
September 05, 2014, 12:20:30 PM
 #17

is there anyway for user 10 to know in advance what the txid will be ?
Yes, that's pretty simple. You just need to repeatedly generate the transaction until you have the txid you want. Then, discard the rest and only broadcast that one.
bit-lottery (OP)
Newbie
*
Offline Offline

Activity: 37
Merit: 0


View Profile WWW
September 05, 2014, 12:53:07 PM
 #18

is there anyway for user 10 to know in advance what the txid will be ?
Yes, that's pretty simple. You just need to repeatedly generate the transaction until you have the txid you want. Then, discard the rest and only broadcast that one.

Alright... lets go with the block hash.

Although, same question here : There is no way for anyone to know in advance what the next block hash will be ? right ?
bit-lottery (OP)
Newbie
*
Offline Offline

Activity: 37
Merit: 0


View Profile WWW
September 05, 2014, 03:04:13 PM
 #19

I just modified the system to test the pick based on the next block hash found by the network.
I need testers now :-)
I will pay for your ticket, please read here if interested :
https://bitcointalk.org/index.php?topic=760481.0
Dabs
Legendary
*
Offline Offline

Activity: 3416
Merit: 1912


The Concierge of Crypto


View Profile
September 26, 2014, 04:10:45 PM
 #20

You might want to look at how I ran my lotto last year. Provably Fair. No one can cheat it, not even me.

Pages: [1] 2 »  All
  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!