Bitcoin Forum

Bitcoin => Project Development => Topic started by: isis on September 04, 2012, 02:20:10 PM



Title: [Announce] - OpenPay - Redesign & Lottery
Post by: isis on September 04, 2012, 02:20:10 PM
Hello Everyone,

I promised in my last post that there were exciting developments coming on the OpenPay front and here it is.
With the release of bitcoind 0.7 there is now native support in bitcoin for the raw transactions API.
This new API has resulted in a great deal of simplification of the overall design, making many of the original design choices for OpenPay moot.  Therefore we went back to the drawing board.

The new OpenPay will feature 3 primary components.
A merchant gateway.
A slightly modified bitcoind.
An exchange connector.

There will also be a GUI client for home use to handle enrollment and unenrollment of payment cards into the network.

All of that is being worked on right now, and since I am between contracts right now I have much more time to devote to the software development side of things.

Unfortunately, being between contracts also makes funds rather tight.  Instead of asking for donations, I've decided to start a daily lottery drawing.  A ticket costs 1 BTC per 7 days.  Your ticket # is your transaction ID.  You can send more than 1 BTC, doing so will extend your ticket's time in the game.  The winner will be randomly selected each night at midnight MST.  You have a chance of winning each day.  After the drawing, I will post the winning transaction # here.  If it becomes something significant I'll put up a website somewhere where the stats can be tracked.

The jackpot is 90% of receipts for the last 24 hour period.  OpenPay will keep the remaining 10% to fund ongoing development.
To participate in the lottery you simply send coins to 1AHJ89HwYrfP6okarzJeB38YUgikQHu9US

Enjoy!


Title: Re: [Announce] - OpenPay - Redesign & Lottery
Post by: jim618 on September 04, 2012, 08:55:18 PM
Great work!

For the lottery winner, I presume you will be sending the winnings back to the first address used in the transaction that sent you the BTC.

If so, then people should make sure they send you BTC from an address they control (ie not an Instawallet green address or similar).
To win but for the winnings to go to some generic sending address that I did not control would certainly ruin my day.  


Title: Re: [Announce] - OpenPay - Redesign & Lottery
Post by: jim618 on September 04, 2012, 09:16:19 PM
If you wanted to be provably fair you could do something like:

1) take the first two blocks that appear after midnight MST.
2) add the two nonces for the blocks.
3) list all the transactions that are valid tickets in the order they appeared on the blockchain. Say there are N of these.
4) do a modulo N on the total from step 2) to work out the winning ticket.

That way noone could accuse you of buying a ticket every day and simply saying 'I have won !'.
I know you would not do it but it is always good to be provably fair.

Miners could potentially game it by only broadcasting a block with just the right nonce - by adding two block nonces this makes it difficult (but not impossible). If anyone can think of a better stategy to pick the winner please post!


Title: Re: [Announce] - OpenPay - Redesign & Lottery
Post by: isis on September 05, 2012, 03:54:56 AM
That's actually a great idea.
What it does right now is poll for all unspent tx sent to the address.
Next it looks at the amount of each transaction and counts days per bitcoin to filter expired tickets out.
This cleaned list is then all loaded into an array and a random number is chosen between 1 and size of array + 1 (arrays are zero indexed).
The winner is the number chosen -1

It's a good point about sending money from an address that they control.


Title: Re: [Announce] - OpenPay - Redesign & Lottery
Post by: isis on September 06, 2012, 06:08:57 AM
So far there have been no players
http://blockchain.info/address/1AHJ89HwYrfP6okarzJeB38YUgikQHu9US



Title: Re: [Announce] - OpenPay - Redesign & Lottery
Post by: MaxSan on September 08, 2012, 11:40:40 PM
Not much of a gambler but this is one project i like to keep a close ear to its progress


Title: Re: [Announce] - OpenPay - Redesign & Lottery
Post by: isis on September 09, 2012, 11:41:28 PM
Not much of a gambler but this is one project i like to keep a close ear to its progress

Thanks!  I've been kinda of silent on the forums, but I've been discussing the design minutia in IRC.  We've got a much more scalable design now and I'm going to post details in the next little bit.  I've managed to successfully test several transactions using the new design and it's code base and they are validating correctly.  This was one of the major holdups before.

So thank you to everyone for the support!