News for hackers. Stuff that matters.
Re:Show HN: Anonymous Bitcoin Lottery by benjoffe on Wednesday April 17, 2013 @01:13PM (#5565644)
> Currently the lottery has a 25% cut of the total amount in the lottery. This is used to pay for development, server costs and maintainence. Eventually, my goal is to decrease the fee to as small as possible to allow for the largest winning. This will take place when the development stops (meaning there are no features to be added) and/or the lotteries take place more often.

I find this to be backwards, you are effectively punishing your early adopters. It seems to make much more sense to make the cut lower (or zero) now, and increase it later when you have more users.

Re:Show HN: Anonymous Bitcoin Lottery by Prefinem on Wednesday April 17, 2013 @01:29PM (#5565756)
I like your idea. I will cut the fees to something like 1% to pay for the transaction fees
Re:Show HN: Anonymous Bitcoin Lottery by jswift on Wednesday April 17, 2013 @01:50PM (#5565888)
It's a good idea but any cut above this will make the lottery very expensive. National lotteries can pay out 50% because they have a monopoly and the remainder usually goes towards a community project.
Re:Show HN: Anonymous Bitcoin Lottery by Prefinem on Wednesday April 17, 2013 @01:53PM (#5565899)
I will probably increase fees (nothing to exorbitant) to covers costs if this takes off. I don't think it will require to much to run unless it becomes insanely popular. At that time, I will open up more lotteries for different payout ranges to make it more beneficial for costs.
Re:Show HN: Anonymous Bitcoin Lottery by sterlingross on Wednesday April 17, 2013 @02:06PM (#5565993)
Just a note, your site now says there is a 1% cut on one page [about] and a 25% cut on another page [how it works].
Re:Show HN: Anonymous Bitcoin Lottery by Prefinem on Wednesday April 17, 2013 @02:09PM (#5566016)
Thanks, fixed
Re:Show HN: Anonymous Bitcoin Lottery by jaredandrews on Wednesday April 17, 2013 @02:40PM (#5566201)
I noticed you have changed your fee. The example in how it works still reflects the old rate. Just letting you know. Nice project BTW I'll give it a shot next time I get some BTC.
Re:Show HN: Anonymous Bitcoin Lottery by Prefinem on Wednesday April 17, 2013 @02:46PM (#5566243)
Thanks, fixed.
Re:Show HN: Anonymous Bitcoin Lottery by TheTaytay on Wednesday April 17, 2013 @02:06PM (#5565996)
You probably haven't updated it yet, but on one page it says 1%, and on the other it says 25%.
Re:Show HN: Anonymous Bitcoin Lottery by Prefinem on Wednesday April 17, 2013 @02:12PM (#5566032)
Fixed, Thanks
Re:Show HN: Anonymous Bitcoin Lottery by shloime on Wednesday April 17, 2013 @01:35PM (#5565794)
Good call.
Re:Show HN: Anonymous Bitcoin Lottery by Prefinem on Wednesday April 17, 2013 @01:47PM (#5565871)
Thanks
Re:Show HN: Anonymous Bitcoin Lottery by jimrandomh on Wednesday April 17, 2013 @02:24PM (#5566096)
And the winner is... Anonymous Coward 961! Who is absolutely not the operator's secret alter-identity! Now if you'll excuse me, this yacht won't buy itself.

I don't know whether this is actually a scam, but you need to put a considerable amount of work to make into making it not look like one. As it is, I see: disposable identity, Bitcoin, and a straightforward opportunity to steal without getting caught.

Re:Show HN: Anonymous Bitcoin Lottery by Prefinem on Wednesday April 17, 2013 @02:27PM (#5566115)
Of course, you could just watch who the payment is made out to and verify if the owner is the winner. I could show the selection method of the winner and show that it is a random generator that grabs the winner. Either way, its still a gamble. If you don't trust the site (or me) then you won't trust any of the code I post to show the random selection of the user.
Re:Show HN: Anonymous Bitcoin Lottery by mcherm on Wednesday April 17, 2013 @02:33PM (#5566150)
Re:Show HN: Anonymous Bitcoin Lottery by Prefinem on Wednesday April 17, 2013 @02:39PM (#5566199)
Replied to the one below in more detail, problem still relies on you believing that I am using the code I show to make the calculation.
Re:Show HN: Anonymous Bitcoin Lottery by Prefinem on Wednesday April 17, 2013 @04:56PM (#5567180)
I have implemented a system that adds verification. You can read about it here: https://www.btc-l.com/about#verification
Re:Show HN: Anonymous Bitcoin Lottery by jimrandomh on Thursday April 18, 2013 @01:26PM (#5571862)
This is progress, but it doesn't look done yet - you need to explain how someone would perform the verification, and why prior knowledge of the seed won't let someone manipulate the results by placing strategic bets.
Re:Show HN: Anonymous Bitcoin Lottery by olalonde on Wednesday April 17, 2013 @12:45PM (#5565466)
There are already at least hundreds of bitcoin lotteries and casinos, most of which are probably scams (see bitcointalk.org forums). How do you plan to differentiate?
Re:Show HN: Anonymous Bitcoin Lottery by jff on Wednesday April 17, 2013 @01:13PM (#5565647)
Why differentiate? Scams are apparently more profitable, or else these bitcoin lotteries would be running legit instead.
Re:Show HN: Anonymous Bitcoin Lottery by pampa on Wednesday April 17, 2013 @01:40PM (#5565834)
there is one problem. you usually cant run a lottery, unless you are government, or a government affiliated company
Re:Show HN: Anonymous Bitcoin Lottery by blaabjerg on Wednesday April 17, 2013 @02:13PM (#5566035)
That's a rather theoretical problem, isn't it?
Re:Show HN: Anonymous Bitcoin Lottery by mcherm on Wednesday April 17, 2013 @02:34PM (#5566163)
No, it's LEGAL problem. Another profitable enterprise is to take up drug smuggling -- it pays fairly well (so I am told) but being illegal is a bit of a problem for most people.
Re:Show HN: Anonymous Bitcoin Lottery by Prefinem on Wednesday April 17, 2013 @01:30PM (#5565763)
I have seen a lot of different one while I was researching, but most all seemed scam-ish. I honestly wanted one that wasn't a scam.

As far as different, I am not sure other than actually doing what the site says it will do.

Re:Show HN: Anonymous Bitcoin Lottery by iaw on Wednesday April 17, 2013 @12:53PM (#5565504)
I've been working on a BTC Raffle site also although I'm targeting lower fees and plan on making it provably fair.

Good job.

Re:Show HN: Anonymous Bitcoin Lottery by Prefinem on Wednesday April 17, 2013 @01:35PM (#5565795)
I have dropped the fees to help early adopters. If you are interested in how this works, send me an email: [email protected]
Re:Show HN: Anonymous Bitcoin Lottery by tocomment on Wednesday April 17, 2013 @12:17PM (#5565305)
I'd say to add some more instructions, especially on the play page. E.g., "send X bitcoins to this address to play in this game", etc.

Also on the front have a live "paid out today" widget.

Re:Show HN: Anonymous Bitcoin Lottery by tocomment on Wednesday April 17, 2013 @01:03PM (#5565577)
Actually under the paid out today number you could have a little hyper link that says "verify" and links to the blockchain showing the actual payouts. It might give you some legitimacy.
Re:Show HN: Anonymous Bitcoin Lottery by Prefinem on Wednesday April 17, 2013 @01:36PM (#5565800)
Thanks for catching this.
Re:Show HN: Anonymous Bitcoin Lottery by IanCal on Wednesday April 17, 2013 @02:35PM (#5566167)
Please check the legal implications of this. I know that you can't run a lottery in the UK unless you're a charity.
Re:Show HN: Anonymous Bitcoin Lottery by shocks on Wednesday April 17, 2013 @01:30PM (#5565762)
You should make this provably fair...
Re:Show HN: Anonymous Bitcoin Lottery by grimtrigger on Wednesday April 17, 2013 @01:42PM (#5565844)
Re:Show HN: Anonymous Bitcoin Lottery by Prefinem on Wednesday April 17, 2013 @01:45PM (#5565860)
If I could prove the fairness (paying out to the winner) without compromising anything, I would. If you know of a way, I would be more than willing to do so.
Re:Show HN: Anonymous Bitcoin Lottery by mcherm on Wednesday April 17, 2013 @02:32PM (#5566144)
Here is a simple algorithm that gives you the basic ideas. A different bitcoin wallet is set up for each day's lottery. The total number of bitcoins received can be seen in the blockchain. A source of entropy is chosen which can easily be verified but cannot be controlled or predicted before a date after the cutoff for that day's lottery, for instance, use the NYSE stock market closing price. A hash of that is divided by the number of bitcoins received in the lottery (plus an overhead for the small percentage that funds running the lottery) to determine the winner.

Anyone entering can confirm that that their contribution was a certain percentage of the total funds received and that they had that same percentage of the chance for winning: even if the operator of the lottery wanted to be malicious they couldn't do so without making it obvious to anyone who checked.

There are some additional details that would matter, if you wanted to implement this seriously you may contact me separately for a discussion of some of those details.

Re:Show HN: Anonymous Bitcoin Lottery by Prefinem on Wednesday April 17, 2013 @02:39PM (#5566195)
I already have some of this implemented but, picking a random winner based off of an outside source (provable by providing the algorithm) is only trust worthy if you trust the author posting the correct algorithm. You would still have to trust that I was using the code I said I was using.

I may be understanding you wrong, and if I am please let me know. I would love to make this 100% fullproof and trustworthy.

Re:Show HN: Anonymous Bitcoin Lottery by mcherm on Thursday April 18, 2013 @07:44AM (#5569984)
Publish the algorithm. Anyone who wants to check can run it themselves!

For this to work, ALL of the data needed to run the algorithm and determine the winner must be data that is outside the control of the contest organizer (or published before the contest begins) and publicly available. The algorithm I described should meet this criteria.

Assume you have published (before the contest starts) that the lottery itself takes a 1% cut, and that all funds should be deposited to a particular Bitcoin wallet. Anyone who is suspicious of you (or just very careful) can inspect the blockchain to see the total number of bitcoins received before the contest cutoff time (call it "N"). They can find the closing price of the NYSE and run it through the hash function to find the random input (call it "R"). Then they can perform "X = (N mod R)" and count through the transactions until they find the one that added the "X'th" bitcoin to the wallet. If that was their transaction then they know to expect to receive "0.99*N" bitcoins. Like I said before, for rigorous use, the algorithm needs some details and a little improvement, but this demonstrates the existence of algorithms that allow any participant in the lottery can verify that the lottery is fair.

Re:Show HN: Anonymous Bitcoin Lottery by slig on Wednesday April 17, 2013 @02:30PM (#5566131)
I'm not an expert, but the way satoshidice.com does verification seems legit.

Anyone here can verify that?

Re:Show HN: Anonymous Bitcoin Lottery by v-1971 on Wednesday April 17, 2013 @04:01PM (#5566750)
Here is an alternate algorithm, based on mcherm's suggestion. Choose a publicly available number, such as NYSE closing price, that is not revealed until after the lottery closes. The hash of this is the target. The exact format of what is hashed is announced in advance.

All purchasers' bitcoin addresses are posted publicly, in the order they come in. They are salted with the ticket number, i.e. mybitcoinaddress-001 represents the first ticket I bought. All of these addresses (including salt) are hashed. The one that is closest to the target is the winner. Closeness can be measured as integers (absolute value) with ties possible but extremely unlikely.

Re:Show HN: Anonymous Bitcoin Lottery by tzs on Wednesday April 17, 2013 @03:49PM (#5566664)
I'm curious--how many here would work on this kind of project? I'd love to from an engineering point of view. It would be quite fun.

However, I suspect it will be a net detriment to its typical user, and don't see any real benefits to counteract that, so would have trouble working on such a thing due to the moral issues. People who like to gamble and are able to do so responsibly already have plenty of easy outlets in which to indulge their hobby. It seems to me that this service will disproportionally attract people who have a gambling problem, and I'd feel quite troubled helping with that.

Re:Show HN: Anonymous Bitcoin Lottery by Prefinem on Wednesday April 17, 2013 @03:55PM (#5566712)
Just to send out an update on the site. Fixed quite a few issues today. Thanks for the help everyone. One of the big things was changing the fee to 1% to help pay any transaction fees and make sure early adopters win almost all of the lottery. Another was the incorrect display of # of tickets purchased and amount of bitcoin in the pool. This has been fixed with no loss of data and there is now more bitcoin showing up in the pool.
Re:Show HN: Anonymous Bitcoin Lottery by TheTaytay on Wednesday April 17, 2013 @02:08PM (#5566005)
I couldn't figure out how long the current lottery was going to run. I didn't see what the target # of tickets sold was for this first round, so I didn't know what the estimated date of the first drawing was.
Re:Show HN: Anonymous Bitcoin Lottery by Prefinem on Wednesday April 17, 2013 @02:10PM (#5566019)
The target is 1BTC in the pool, I have posted under the lottery table when a winner will be selected.
Re:Show HN: Anonymous Bitcoin Lottery by seanalltogether on Wednesday April 17, 2013 @01:04PM (#5565586)
On your lottery page, I initially thought the addresses listed in the grid were the ones to send bitcoins to. You should really consider laying out that page differently to avoid confusion.
Re:Show HN: Anonymous Bitcoin Lottery by Prefinem on Wednesday April 17, 2013 @01:34PM (#5565787)
I would love to hear suggestions.
Re:Show HN: Anonymous Bitcoin Lottery by seanalltogether on Wednesday April 17, 2013 @02:16PM (#5566051)
The problem I think is that the bitcoin address to send money to looks like its part of the table header description. So you naturally gloss over it and focus your attention on the table data.
Re:Show HN: Anonymous Bitcoin Lottery by Prefinem on Wednesday April 17, 2013 @02:22PM (#5566080)
I have given it some whitespace and put a true header on the table.
Re:Show HN: Anonymous Bitcoin Lottery by tocomment on Wednesday April 17, 2013 @11:57AM (#5565155)
Really cool! Can you give a rough sketch of the aritechure?

Are you using an API for do you code right to the bitcoin protocol?

Re:Show HN: Anonymous Bitcoin Lottery by Prefinem on Wednesday April 17, 2013 @12:00PM (#5565178)
I run bitcoind --daemon and use the bitcoin API through JSON RPC. So, the website connects to the server and pretty much has complete access.
Re:Show HN: Anonymous Bitcoin Lottery by nbdbvcrea on Wednesday April 17, 2013 @02:31PM (#5566134)
I like SatoshiDice more.

It's "provably trustworthy" and you can adjust price multiplier from 1.004x to 64000.000x.

Re:Show HN: Anonymous Bitcoin Lottery by tptacek on Wednesday April 17, 2013 @01:29PM (#5565760)
How poetic.
Re:Show HN: Anonymous Bitcoin Lottery by crntaylor on Wednesday April 17, 2013 @01:33PM (#5565782)
The implementation is really simple. Buy 1 BTC at current prices. Wait a year. Now your 1 BTC is either worth 1000x as much (with low probability) or nothing (with high probability). Instant lottery!