Pages:
Author

Topic: Worldwide bitcoin lottery (Read 1649 times)

member
Activity: 112
Merit: 10
Power The world for FREE!
January 21, 2016, 05:28:27 AM
#36
I always support ideas of expanding bitcoin services, but i'm not sure you will have profits with bitcoin lottery site without great deal of
advertising, since there are already sites that offer bitcoin lottery. In regards to running a honest service, you should obtain a valid licence
on bases of which you can run legitimate operation. Looking forward on development of this.
you are so right. Because if certain ads have the support you get relief funds for the gifts you give. But it doesn't matter if you already have the funds for prizes. But the advertising is very important to support the lottery site that you will manage. And the most important thing is you have to get the valid license and have an honest service, so that all customers are not upset with you. I'll wait for the next developments, hopefully can be resolved
hero member
Activity: 1005
Merit: 500
January 21, 2016, 05:19:48 AM
#35
All of gambling sites are centralized  has inherent weakness potential been scammer  or lacking security! So many ppl are always stepping away new gambling sites! What I want to say is that there are one block chain P2P lotto called VPN coin! If you are interested, have a look here https://bitcointalksearch.org/topic/m.11344199
member
Activity: 100
Merit: 10
January 18, 2016, 10:12:26 AM
#34
Yes, I feel your point and I wish project of big bitcoin lottery was successful as well. As you know scams in bitcoin world are rather frequent and with such big sum of money you have to convince people that you as the lottery creator/manager/owner won't run away with the jackpot. 5000 BTC is overwhelming money and can bend the will of almost any man. In Short we need PERFECT way of keeping money of participants safe.

I completely agree, as this was also part of my 2 initial questions.
2. Securing the bitcoins
This is where I really hope to get some input from some of the users in here. (The more sceptic, the better)
How should I do to proff to participants, that price money are secured and intact?
First of all I do not like the idea of storing all that bitcoin in an online wallet, since these can be hacked.
Second I do not like to use any "escrow services" as this is just moving the risk of fraud from 1 place to another.
I hope someone can suggest a complete transparent setup where participants at any time can verify that the prize pool is intact and I way where bitcoins can only be paid to winners.
And off course cannot be hacked.
Is this possible ?

I will put company with gambling license behind, but would really like to provide real proff, if any have some good suggestions.
legendary
Activity: 1862
Merit: 1004
January 18, 2016, 09:57:21 AM
#33
From my experience I can tell you that bitcoin gamblers prefer direct gambling over 'passive'  and that is main reason why bitcoin lotteries are not popular enough,
and instead we have multitude of Dice, Slots, Black Jack and other popular casino games. I never seen any lottery site being even remotely popular as some Dice sites.
You would have some seriously great system and huge budget for advertising for you to success with your lottery project.
Yes, I agree. But what I am really missing is gambling with life altering potential wins, which in the intension here. All I have seen so far is where you can win some fairly small prizes. I think the largest prize I have seen is around 120 BTC. So my hope is that a provably fair system offering 5000 BTC as main prize would get some attention. I want this to be alternative to all the state lotteries out there.

Yes, I feel your point and I wish project of big bitcoin lottery was successful as well. As you know scams in bitcoin world are rather frequent and with such big sum of money you have to convince people that you as the lottery creator/manager/owner won't run away with the jackpot. 5000 BTC is overwhelming money and can bend the will of almost any man. In Short we need PERFECT way of keeping money of participants safe.
member
Activity: 100
Merit: 10
January 18, 2016, 09:35:27 AM
#32
your lottery is offering a 5000 BTC win? or did I understand something wrong?

Yes, this is the intention.

So it will work as follows:

You purchase a ticket of 0.01 BTC to enter into level 1 of the lottery.
Once 10 tickets are sold, then they will grouped into a batch (level 1 batch).
Here the first draw will happen, and the prize here is (20% of ticket costs) 0.02 BTC to the winning ticket. The winning ticket will also enter into a level 2 batch.

So when 100 tickets are sold, then 10 level 1 winners have been found and their will be 10 tickets in the level 2 draw. (Which for example could be 15% of ticket costs, 100 x 0,01 = 0.150 BTC)
The winner of the level 2 draw receives this prize and enters automatically into level 3 draw.

and so on ...

At level 7 (final level), then the prize will be 5000 BTC. Off course you need to be lucky to win this. But chances are still much better than state lotteries.
legendary
Activity: 1176
Merit: 1001
The most Professional Cryptocurrency Casino
January 18, 2016, 09:21:21 AM
#31
my eye balls want to jump, when i see the prize, did you really will paid to the winner or you just want try scam us ?sorry no offense, because i see based on ticket cost is really high and for this point is very suspicaz
legendary
Activity: 1974
Merit: 1014
All Games incl Racer and Lottery game are Closed
January 18, 2016, 08:09:47 AM
#30
From my experience I can tell you that bitcoin gamblers prefer direct gambling over 'passive'  and that is main reason why bitcoin lotteries are not popular enough,
and instead we have multitude of Dice, Slots, Black Jack and other popular casino games. I never seen any lottery site being even remotely popular as some Dice sites.
You would have some seriously great system and huge budget for advertising for you to success with your lottery project.
Yes, I agree. But what I am really missing is gambling with life altering potential wins, which in the intension here. All I have seen so far is where you can win some fairly small prizes. I think the largest prize I have seen is around 120 BTC. So my hope is that a provably fair system offering 5000 BTC as main prize would get some attention. I want this to be alternative to all the state lotteries out there.

your lottery is offering a 5000 BTC win? or did I understand something wrong?
member
Activity: 100
Merit: 10
January 18, 2016, 08:04:43 AM
#29
From my experience I can tell you that bitcoin gamblers prefer direct gambling over 'passive'  and that is main reason why bitcoin lotteries are not popular enough,
and instead we have multitude of Dice, Slots, Black Jack and other popular casino games. I never seen any lottery site being even remotely popular as some Dice sites.
You would have some seriously great system and huge budget for advertising for you to success with your lottery project.
Yes, I agree. But what I am really missing is gambling with life altering potential wins, which in the intension here. All I have seen so far is where you can win some fairly small prizes. I think the largest prize I have seen is around 120 BTC. So my hope is that a provably fair system offering 5000 BTC as main prize would get some attention. I want this to be alternative to all the state lotteries out there.
legendary
Activity: 1862
Merit: 1004
January 18, 2016, 07:33:12 AM
#28
From my experience I can tell you that bitcoin gamblers prefer direct gambling over 'passive'  and that is main reason why bitcoin lotteries are not popular enough,
and instead we have multitude of Dice, Slots, Black Jack and other popular casino games. I never seen any lottery site being even remotely popular as some Dice sites.
You would have some seriously great system and huge budget for advertising for you to success with your lottery project.
member
Activity: 100
Merit: 10
January 18, 2016, 07:18:46 AM
#27
Just use their order in the Bitcoin blockchain. No need for timestamps. Sort by block number first, and position within block second. Nobody can dispute that ordering. You can get the ordered list of transactions within a block:
I agree, this can be done. I would however still need to get final timestamp of when "batch" completed. (If I want to stick with https://beacon.nist.gov/ and select random beacon from there)
Can blockchain timestamp here be trusted for that? (https://blockchain.info/tx-index/b6f6991d03df0e2e04dafffcd6bc418aac66049e2cd74b80f14ac86db1e3f0da?format=json)

The 2nd option is better, but if you can somehow make it that the external source can't cheat either, that would be best. That's what pevpot's 5 billion iterations is about - preventing the miner from knowing how his block affects the result.
I also agree very much with this.
legendary
Activity: 1988
Merit: 1317
Get your game girl
January 18, 2016, 06:06:06 AM
#26
1. The algorithm for selecting the winner in each should be a random algorithm based only on the bitcoin addresses participating.
I believe that it will very important, that this algorithm is public, so everyone can test that the draw is not tampered with in any way. But also must be so complex that nobody can predict any outcomes.
This part I think I have already covered with an algorithm that I have worked on and tested over the past couple of months.

Hey are you writing the algorithm from scratch ? I can test the efficiency of the algorithm also MTTF (Mean Time To Failure),just so you can check how reliable it is.I can do this for free.Pm me,just in case.
member
Activity: 100
Merit: 10
January 18, 2016, 06:02:29 AM
#25
I always support ideas of expanding bitcoin services, but i'm not sure you will have profits with bitcoin lottery site without great deal of
advertising, since there are already sites that offer bitcoin lottery. In regards to running a honest service, you should obtain a valid licence
on bases of which you can run legitimate operation. Looking forward on development of this.

I agree, advertising is needed.
I already have existing company with gambling license i Curacao, which I also believe is necessary for trust.
member
Activity: 100
Merit: 10
January 18, 2016, 05:49:18 AM
#24
1 ticket cost 0.01 and the winning prize is 5BTC for every 10 bets? do you mean that you will not earn a profit from it?

I will make profit from this.
The intetion so far is to put 80% of ticket price into prize pool. 10% reserved for affiliates and 2% reserved for charity of some sort. This leaves 8% gross profit.
This will be sustainable in the long run for development costs, gambling license costs, support etc.
legendary
Activity: 1722
Merit: 1000
Satoshi is rolling in his grave. #bitcoin
January 15, 2016, 05:56:44 PM
#23
I always support ideas of expanding bitcoin services, but i'm not sure you will have profits with bitcoin lottery site without great deal of
advertising, since there are already sites that offer bitcoin lottery. In regards to running a honest service, you should obtain a valid licence
on bases of which you can run legitimate operation. Looking forward on development of this.
hero member
Activity: 952
Merit: 503
January 15, 2016, 05:34:50 PM
#22
1 ticket cost 0.01 and the winning prize is 5BTC for every 10 bets? do you mean that you will not earn a profit from it?
legendary
Activity: 2940
Merit: 1333
January 15, 2016, 03:48:02 PM
#21
Question however is, since many point to pevpot, which use provably fair on their site. But there is also some point of trust https://www.pevpot.com/provably-fair to get the “blockHash”. So is this then provably fair?
I am fighting in my head a bit with this term.

I would call pevpot provably fair, because the only "trusted source" of randomness is coming from the guy who mines a particular block, and he *cannot know* the effect of his blockhash on the result of the lottery until an hour or two after he has committed to it.

The only problem here is that I am assuming that hardware doesn't exist that is capable of running a chain of a five billion pbkdf2 operations end to end in less than an hour.

blockcypher.com is used to put the ticket into it’s correct position order by time. So in a lottery batch (block) there are 10 tickets. How would they get their position (0 to 9) if not by at timestamp or some sorting algorithm?

Just use their order in the Bitcoin blockchain. No need for timestamps. Sort by block number first, and position within block second. Nobody can dispute that ordering. You can get the ordered list of transactions within a block:

Code:
$ bitcoin-cli getblock $(bitcoin-cli getblockhash 393457) | head -n 15
{
  "hash": "000000000000000006479b1d342159d8602976ad70880d44efbd78ad4aa90aee",
  "confirmations": 1,
  "size": 999832,
  "height": 393457,
  "version": 4,
  "merkleroot": "b53786c6435be31943cd2928469c5448966e05932c957d8f4b6444a14c55ddc5",
  "tx": [
    "f4605008afcbe1cd2a5e3a615ae8b62224a7e8b1e40541a043512892f783eaeb",
    "47fe1f5519389f5bc28b00245da528a843f0c071b2fdf7e5ef95ea00e674c9d7",
    "89d7a09abaa992c7bf66b975aec85657105227a392c45b5d2d9000044f278eac",
    "9a0f81ac609c9211c97a41d1219c693902685ca78022be60ba716e715f0072cb",
    "4c02830cdc86ae9e7cb7f1d1098244b11268e79c0ca2536743c02db4ce17f482",
    "d666cdcb0c1969fe7e936071c6ae7f18b11b375a8d29a17fd2ec863b7a0a6c75",
    "398a46ca9dc6a996f9deb937289ae6c885b017823bef58bb33e46efe673326fc",

Since it seems like one has to choose between 100% provably fair and not use any external sources. (As I read your reply then any form of external source, then it is not provably fair)

It seems to me that it is OK to use an external source so long as that external source commits to its decision before it could know the effect of its decision. For example, at Just-Dice I could use random.org to pick the server seeds and it wouldn't matter because at the time of server seed selection I know neither the client seed nor how the player is going to play.

What system would you prefer:
A provably fair system (where you cannot remove the organiser option to be dishonest)?
Or
A system based on random beacon from some source? (Must rely on external source to be fair, but organiser cannot cheat)

I don't think the first option is viable. Nobody will play a lottery where the operator can cheat undetectably.

The 2nd option is better, but if you can somehow make it that the external source can't cheat either, that would be best. That's what pevpot's 5 billion iterations is about - preventing the miner from knowing how his block affects the result.
VTC
member
Activity: 84
Merit: 14
January 15, 2016, 11:31:03 AM
#20
The sources in your example rely on trust.  You need to trust they won't change the data, that their website is up and running, and that they have a complete history of the data (hard drives fail and maybe they didn't make a backup)

The best external source is the blockchain since it's public and unchangeable.  For example, Pevpot uses a blockhash as the external source, and about 2 hours worth of hashing iterations on it.  The blockchain is public and no miner has enough incentive (or power) to undo 2 hours worth of blocks.  

You should look at
https://www.pevpot.com/provably-fair
https://www.pevpot.com/verify
as it is superior to your method.
member
Activity: 100
Merit: 10
January 15, 2016, 06:03:07 AM
#19
Proof and trust are incompatible
I see and I agree thinking about this. But would that not actually mean, that the use of any random beacon would mean, that it cannot be considered provably fair? This would always rely on some data input from somewhere and no matter whether everybody in the world knows that I (the organizer) would not have any control over this, then it could still be argued that the data source could be dishonest.

On the other hand making something provably fair would (in this case) need some “secret token” or similar as previously mentioned, which then will be public after the draw and user could check this against the hash string they got when purchasing the ticket. But this leaves organizer with edge if he was dishonest as he knows all the factors.
This is a headache.

Question however is, since many point to pevpot, which use provably fair on their site. But there is also some point of trust https://www.pevpot.com/provably-fair to get the “blockHash”. So is this then provably fair?
I am fighting in my head a bit with this term.

It's hard to follow. I think it could use some proofreading and possibly renumbering. What is a "lottery block" exactly?
Yes, this could surely need some explanation, which I will try to do.
Every time 10 lottery tickets are sold, then a draw will happen between these 10 tickets for 20% percent of the combined ticket value. This is what I call a block (in this case a level 1 block).
Let’s say a ticket cost 10 mBTC, then the prize pool in this draw is 20 mBTC.
The winner of a level 1 block will automatically enter into a level 2 block.

A level 2 block is created, when 10 x 10 = 100 tickets are sold (10 level 1 blocks). The 10 winners of their level 1 block will enter into a level 2 block (Which now also holds 10 tickets). Here the prize pool will be 15% of the combined ticket value. (100 x 10 x 15% = 150 mBTC). The winner of a level 2 block draw will automatically enter into a level 3 block.
Level 3 block is created and draw is made when 10 x 10 x 10 = 1000 tickets are sold and so on….
I hope this explains the system a bit better and why I use “lottery block”. Maybe it would be better and more correct to call it a batch instead.

It sounds as if we don't have to trust blockcypher.com at all, because the random beacon has the final say in who wins. In fact why do we even need to use blockcypher.com? What do we lose by simply using the random beacon at block_time + 10 minutes alone to pick the winning ticket? Hash the beacon, divide by 10, and the remainder is the winner. What does simplifying the draw to such an extent take away? I think your currently described system is entirely dependent on the government beacon to decide the winner, so why bother with all the extra complication? If the beacon site is cheating, they can make any ticket win under either system, and if they aren't then both systems are equally "fair".
Or did I miss something?
blockcypher.com is used to put the ticket into it’s correct position order by time. So in a lottery batch (block) there are 10 tickets. How would they get their position (0 to 9) if not by at timestamp or some sorting algorithm?
I could rely on when I receive payment internally, but then some API service for receiving money could be down and the participant who should have had position 6, then gets position 8. And then after the draw this person calculates that if he had been in position 6, then he would have won.
So blockcypher.com is for ordering tickets. Also the lastest timestamp in the batch is also used to determine which random beacon to get from government site. One could argue, that organiser could tamper with timestamps internally to get the random beacon that serves his purpose. Am I right ?

I think you need to specify which version of mt_rand you're using. Its output changes depending on the version of PHP. Better would be to use something more standard so we don't have to install PHP to verify results.
Yes, if this is used off course version is needed as I know it has changed during versions. This might be something completely different on live version as long as it produce identical result of identical seeds.

Question:
Since it seems like one has to choose between 100% provably fair and not use any external sources. (As I read your reply then any form of external source, then it is not provably fair)
What system would you prefer:
A provably fair system (where you cannot remove the organiser option to be dishonest)?
Or
A system based on random beacon from some source? (Must rely on external source to be fair, but organiser cannot cheat)
legendary
Activity: 2940
Merit: 1333
January 15, 2016, 03:44:27 AM
#18
So an updated algorithm and flow:

1. Points of trust
In order to make something provably fair we need one or more points of trust.
For this lottery algorithm the following 2 places are used:
- blockcypher.com
- https://beacon.nist.gov

I think you are missing the point. Proof and trust are incompatible. We prove the game is fair so that you don't have to trust anyone.

I can tell you that Pythagoras' Theorem is true and show you it stated in a trustworthy publication, or I can prove it to you. Once I have proved it to you, you know it is true even if you don't trust the publication that stated it. Proof removes the need for trust.

blockcypher.com is used to determine the receiving time of payment for a ticket
https://beacon.nist.gov is used to select a random beacon

I would say that you have two holes in your proof. Either one of those two entities could be dishonest - you cannot prove that they aren't.

2. Lottery blocks
We referring to a "lottery block", then I refer to a draw with 10 participants.

2. The flow

It's hard to follow. I think it could use some proofreading and possibly renumbering. What is a "lottery block" exactly?

The seed is a combination of the bitcoin addresses in the ordered ticket_info_array and a random beacon found at https://beacon.nist.gov. The timestamp used for calling their API will be lottery block lock time + 10 minutes. Since these random beacon are calculated each minute, then this ensures that no one knows this until after the lottery block is locked. See calculateSeed() as getRandomBeacon() for reference.

I think you need to specify which version of mt_rand you're using. Its output changes depending on the version of PHP. Better would be to use something more standard so we don't have to install PHP to verify results.

It sounds as if we don't have to trust blockcypher.com at all, because the random beacon has the final say in who wins. In fact why do we even need to use blockcypher.com? What do we lose by simply using the random beacon at block_time + 10 minutes alone to pick the winning ticket? Hash the beacon, divide by 10, and the remainder is the winner. What does simplifying the draw to such an extent take away? I think your currently described system is entirely dependent on the government beacon to decide the winner, so why bother with all the extra complication? If the beacon site is cheating, they can make any ticket win under either system, and if they aren't then both systems are equally "fair".

Or did I miss something?
member
Activity: 100
Merit: 10
January 14, 2016, 08:55:56 AM
#17
So an updated algorithm and flow:

1. Points of trust
In order to make something provably fair we need one or more points of trust.
For this lottery algorithm the following 2 places are used:
- blockcypher.com
- https://beacon.nist.gov

blockcypher.com is used to determine the receiving time of payment for a ticket
https://beacon.nist.gov is used to select a random beacon

2. Lottery blocks
We referring to a "lottery block", then I refer to a draw with 10 participants.

2. The flow
2.1 - Buying the ticket
A participant will buy a ticket by sending a fixed amount to a certain bitcoin address
Upon receiving this payment, then users bitcoin address will appear public in the lottery block.

2.2 Completing the lottery block
When payment is received for 10 tickets, then the lottery block is considered complete and a proces will start to determine the various tickets postions in the block as well as "lottery block lock time".
At this time the ticket information will look something like this

$ticket_info_arr = array(
   0   => array('address' => '149PWxjK2Qhk8dstLM1dj1xjK3vMFAqYAQ'),
   1   => array('address' => '1DSWekGtets5FGEDM9sMn8FriRwF5oRoKv'),
   ...
   9   => array('address' => '12jhjtTgCiobesqqXvFuZbePqVKppbyw8Q')
);


2.2.1 - Adding information to tickets
For each of the tickets purchased a call will be made to the API of blockcypher.com to dertermine the their timestamp. (See function getTimeTicketReceivedfor reference)
Tickets are now ordered according to their timestamp from blockcypher.com (in case of equal timestamp down to the millisecond, then algorithm is used to sort, see ticketArraySorter() for reference)

Once this information is collected, then it will all be display public and the draw will start approximately 10 minutes later.

2.2.2 - Get lottery block lock time
The "lottery block lock time" which later will be used to dertermine the url to call for the random beacon is found as the latest timestamp of any transaction in the lottery block.

3. The draw
The draw is based on mt_rand with a seed.

3.1 - Getting the seed
The seed is a combination of the bitcoin addresses in the ordered ticket_info_array and a random beacon found at https://beacon.nist.gov. The timestamp used for calling their API will be lottery block lock time + 10 minutes. Since these random beacon are calculated each minute, then this ensures that no one knows this until after the lottery block is locked. See calculateSeed() as getRandomBeacon() for reference.

So with this approach I belive it will be provably fair.

Here are the functionality:


function getSortedTicketInfoArray($ticket_info_arr) {
   
   foreach ($ticket_info_arr as $key => $ticket_info) {
      $ticket_info_arr[$key]['received'] = getTimeTicketReceived($ticket_info['tx_hash']);
   }
   
   usort($ticket_info_arr, 'ticketArraySorter');
}

function ticketArraySorter($a, $b) {
   $date_time_a = new DateTime($a['received']);
   $date_time_b = new DateTime($b['received']);
   
   if($date_time_a->getTimestamp() == $date_time_b->getTimestamp()) {
      
      if($date_time_a->format('u') == $date_time_b->format('u')) {
         
         $sorter_a = crc32($a['tx_hash']);
         $sorter_b = crc32($b['tx_hash']);
         
         if($sorter_a == $sorter_b) {
            
            $append = 0;
            
            while ($sorter_a == $sorter_b) {
               $sorter_a = crc32($a['tx_hash'].''.$append);
               
               $append++;
            }
         }
         
         return $sorter_a > $sorter_b ? 1 : -1;
         
      } else {
         return $date_time_a->format('u') > $date_time_b->format('u') ? 1 : -1;
      }
      
   } else {
      return $date_time_a->getTimestamp() > $date_time_b->getTimestamp() ? 1 : -1;
   }
}


function getTimeTicketReceived($tx_hash) {
   $url   = 'http://api.blockcypher.com/v1/btc/main/txs/'.$tx_hash;
   $json   = file_get_contents($url);
   $data   = json_decode($json);
   return $data->received;
}

function drawWinner($ticket_info_arr){
   
   $lottery_block_lock_time = getMaxTimeFromTicketInfoArray($ticket_info_arr);
   
   $random_beacon = getRandomBeacon($lottery_block_lock_time);
   
   $seed = calculateSeed($ticket_info_arr, $random_beacon);
   
   mt_srand($seed);
   
   $idx = mt_rand(0, count($address_arr) - 1);
   
   return $address_arr[$idx];
}

function getRandomBeacon($lottery_block_lock_time) {
   $timestamp   = strtotime($lottery_block_lock_time) + 60 * 10;
   
   if($timestamp > time() - 60) {
      return false;
   }
   
   $url      = 'https://beacon.nist.gov/rest/record/'.$timestamp;
   $sxe      = simplexml_load_file($url);
   
   return (string) $sxe->outputValue;
}

function getMaxTimeFromTicketInfoArray($ticket_info_arr) {
   
   $time = null;
   
   foreach ($ticket_info_arr as $ticket) {
      if(is_null($time) || $ticket['time'] > $time) {
         $time = $ticket['time'];
      }
   }
   return $time;
}

function calculateSeed($ticket_info_arr, $random_beacon){
   
   $hashed_addresses = '';
   
   foreach ($ticket_info_arr as $ticket_info){
      $hashed_addresses .= hash_hmac('sha256', $ticket_info->address, $random_beacon);
   }
   
   return crc32($hashed_addresses);
}


- So all secret token and salt is removed.
- Organisers should not be able to gain any advantage.
- Timestamps rely on 3rd party source.

Please feel free to give any comments.









Pages:
Jump to: