Bitcoin Forum
September 24, 2022, 07:31:08 PM *
News: Latest Bitcoin Core release: 23.0 [Torrent]
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Project Development / Distributed Prediction Market on: June 04, 2013, 11:34:13 PM
I find Prediction Markets extremely interesting tools for information aggregation and forecasting. With Intrade now folded, I am really missing a good source of information, and I think a decent prediction market for Bitcoin would attract a lot of positive attention (how many journalists quoted Intrade during the presidential campaign?) and provide plenty of useful information.

[Please, don't make me explain once again what is wrong with the parimutuel BetsOfBitcoin and BitBet model!]

After coding several working examples of a Bitcoin prediction market (launch ready!), I realize that I do not have the time to operate it [even though it could probably be quite lucrative].

That is why I have been thinking a lot lately about how to take myself out of the whole equation, and I have come up with a design for distributed prediction markets. The idea is pretty simple and I have coded up the basic foundation - now I thought it would be time to throw the idea out there and see what the response is like, and get ideas of how it can be improved.

The basic idea is simple, let me illustrate with an example:
Alice wants to create a prediction market for a [binary] question with outcomes Q=0 or Q=1. She then creates 18 bitcoin addresses, and announces: if you believe there is a 10% chance Q=1 send bitcoins to ADDRESS1, if you believe there is a 10% chance Q=0 send bitcoins to ADDRESS2, etc. A simple trade matching engine matches transactions with each other when their prices (probabilities) intersect as they appear in the blockchain. Furthermore, all participants can verify the transactions, trades and see which transactions are unmatched because it is in all in the blockchain for everyone to see - as long as all the participants have agreed on how the transactions will be matched. So everybody can see and verify the trades and the order book. When the outcome is determined, the matched trades can be paid out by Alice, who controls the addresses, and the unmatched orders can be returned [all to their originating address].

It is pretty foolproof, but it has some drawbacks: (1) trades/updating book happens in blocks every ten minutes (2) not always a good idea to return funds to senders address, etc.

The code I have written so far is simply to monitor the blockchain, match trades and hold the order book. It is not quite ready to be distributed yet, it's very rudimentary.

Depending on the feedback here, I may release it pretty soon.

Any suggestions, questions or comments? Would anybody consider using such a distributed prediction market?

[If you want to see it happen faster, help me justify spending more time on it: 1LCxFUwBWchSf9nRnNNSRGDEygm5iv52p1]
2  Economy / Digital goods / [WTS] Bitcoin Betting Exchange/Prediction Market - Site to earn Bitcoins! on: April 29, 2013, 08:20:09 PM
I would like to offer a complete and fully functional Bitcoin Betting Exchange/Prediction Market for sale.

Intrade is gone, Bitcoin rules, but parimutuel sucks
Since InTrade has disappeared, I think Bitcoin has a huge opportunity to show the way in peer-to-peer betting. The problem is that the current model dominating on bitcoin sites (parimutuel betting) is unfit for serious betting. What is needed is a proper Betting Exchange!

A betting exchange is a peer-to-peer platform for betting: instead of betting against the house, the users bet amongst each other. A betting exchange is much more flexible than existing bitcoin betting sites in that it allows multiple outcomes and also allows the users to bet at the odds they like.

The site operator earns money on charging a small commission on winnings, rather than being a counterparty to the bets like a traditional bookmaker.

It is a well-established and popular form of betting: check out and for successful non-bitcoin examples.

The bets that can be made on the site can be anything from sports to politics to financial bets - it all works the same.

Advantages of Betting Exchanges
  • Peer-to-peer betting gives great odds and no "house edge"
  • Users set their own odds
  • Allows betting for or against each outcome
  • Enables users to trade and arbitrage
  • Bets are between users, site operator has no risk

The Advantages of Using Bitcoin for a Betting Exchange
  • Simple: no signup, registration or login needed to bet means low barriers
  • Security: no personal information, credit card numbers or bank details are needed
  • Accessible: open to a worldwide audience
  • Users can be as anonymous as they like
  • No frozen assets
  • Instant payouts
  • Low fees
  • All customer funds sent directly to an offline wallet

Great idea, but why sell if it's already finished???
I believe the site could be a great success if run by the right person (I would in fact be a big customers myself). It would enter the void left by the Intrade shutdown, and help show the world the power of Bitcoin. I expect it would also generate a handsome profit through commissions taken off the winnings. It has been developed after the model of Betfair and Betdaq (links above) - which are reputable and highly successful (non-Bitcoin) betting platforms. The exchange I have developed essentially clones their functionality, but brings in the power of Bitcoin.

I have developed the site/software myself over the course of one year, with the intention of running it myself. However, am am now looking to sell because I realize I simply do not have the time to operate such a site.

I prefer to sell to a trusted community member who understands the concept well and has (access to) the necessary technical expertise to run the betting exchange.

Technical Info
Built on Lighttpd + + Twitter Bootstrap + mySQL. Users funds stored entirely in cold wallet. Fully functional, very polished and well-tested. Some rebranding probably necessary, but essentially ready to launch.

Yes. Demo is available, please PM me!

Negotiable. Escrow encouraged.

Please feel free to ask any questions, either in this thread or by PM.

Edit: Forgot to say that it also allows user-created events, and will share the commission between the event creator and the site owner.
3  Bitcoin / Press / 2013-03-26 Slashdot Poll: Re: Bitcoin, I most strongly agree with the following on: March 26, 2013, 09:53:50 PM
4  Bitcoin / Press / 2013-03-24 - Will Legitimacy Spoil Bitcoin? on: March 25, 2013, 12:27:07 PM
Surprised nobody has posted this yet:

Seems like the tone in the comments is slowly improving, and there are in fact quite a few good comments.
5  Bitcoin / Press / 2013-03-19 Daily Chart: A Bit Expensive on: March 20, 2013, 10:58:32 AM
6  Bitcoin / Press / 2013-02-12 BBC News - Bitcoin virtual currency can now be used to pay for pizza on: February 12, 2013, 02:07:59 PM

Bitcoins first appeared in 2009 and are closely linked to the global network of computers that supports the currency and its users. Many people generate or "mine" the coins by participating in that network and a growing number of web stores and online firms accept bitcoins as payment.

They have become a very widely used alternative payments system and one bitcoin is currently worth about 17 ($26).

Also linked to from the BBC News front page
7  Economy / Goods / [WTS] Bitcoin Betting Exchange Software on: October 15, 2012, 07:54:50 PM
I wrote the software for running a bitcoin-based betting exchange, similar to Betfair of Betdaq, only leveraging the strengths of bitcoin. Sort of like a mediated P2P betting exchange where the site operator acts as the escrow (and naturally makes his commission from the winnings). In the hands of the right person, I believe it could turn a handsome profit - and that's why I created it. Operator takes no risk, only matches bets from the users with each other and decides the outcome of the event when it has been determined.

However, after some consideration, I have decided to sell it instead of running it myself, both because of potential future legal issues and because I don't have the time for it.

It is written to have extremely low barriers to participating, inspired by the SatoshiDice-style, where you just send bitcoin to a given address to place your bet. The user navigates the site, finds the odds that correspond to backing/laying a given selection in a given event and simply sends bitcoin to the corresponding address. A daemon running in the background picks up the transaction from the bitcoin network and enters the bet into the books or matches it with other bets that have come in earlier.

It was opened for live testing in onionland for half a week in September and experienced no problems.

  • Lightweight - written in Python (
  • Twitter Bootstrap HTML+CSS
  • Postgresql backend
  • Daemon that listens for and registers incoming payments immediately
  • Tested in .onion

It is in a simple and crude form, and would require some technical knowledge to operate.

Accepting offers either in this thread or by PM, please specify the terms of your offer. Let me know if you have any questions!

PS: For those asking "how is this different from betsofbitcoin": it allows players to choose their own odds, guarantees those odds when they are matched (not like betsofbitcoin which has some strange time-discounting), and it allows trading and arbitrage with sites such as betfair and betdaq. Anything I forgot?
8  Bitcoin / Project Development / Blockchain security tracking/colored coins/smart contracts - short python script on: October 10, 2012, 03:26:56 PM
There are now many threads about "colored coins", "smart contracts" and otherwise tracking specific coins through the blockchain.

I have created a simple command-line Python program to handle tracking of "colored coins", "smart contracts" or "blockchain securities" in the blockchain.

There are other approaches, and the one I have taken is very simple, but it is a working solution (primitively duct-taped and glued together). I also have not read gone into the details of the other approaches, so it is probably safe to say that the method I have created is completely incompatible with the other methods (which are probably much smarter too).

But it is a live and implemented solution, which gives it an advantage over others. It is short, easy to modify and fun to play with. It might be useful for some adventurous security issuers who are looking for a solution now that GLBSE is shutting down.

Full source:

Update Oct 15:

The source code has been updated, the new version includes functions to pay dividends to holders of the colored coins.

Also, it has been tested more thoroughly, and I have created a 12-step usage example that shows the current capabilities of the script.

Update Oct 18:

The source code has been updated, the new version includes the functions to include a transaction fee from an (uncolored!) address in your standard/satoshi-client wallet when transferring assets so that the transaction is more likely to confirm more quickly (command-line option -w <fee>, where <fee> is the fee you want to pay in BTC, e.g. -w 0.005 for half a bitcent).

Also, the tracking of colored coins is now also believed to be compatible with other approaches for "order-based" tracking, such as the one used in killerstorm's modified Satoshi client (however, I still want to build up a bunch of test-cases to see if the clients interpret all the cases in the same way).

Next, I think it is time to create ample test-cases, and tidy up the code - it has turned into a bit of a spaghetti-ball.

Usage example:

1. First run config setup:
$ python
Configuration file bitpaint.conf not found. Creating one...
bitcoind rpc host (default:
bitcoind rpc port (default: 8332):
bitcoind rpc username (default: <blank>): ********
bitcoind rpc password (default: <blank>): ********

2. Create address:
$ python -n
Address added: 1AEn3U5MhedXYRbpxLKmkL4r5Kz1XkdZA

3. Transfer the colored coins to the address (sent 0.01 BTC to the address above using Satoshi client). Make a note of (1) the Transaction ID: 630bccacd6f4401fde53822af3f011daa47ec1bedd1702bf7d0be4391948f49b, (2) the output that was sent to the address above: 1.

4. "Paint" the output of the transaction, call the painted coins "BITFAIR-SHARES":
$ python -p BITFAIR-SHARES:630bccacd6f4401fde53822af3f011daa47ec1bedd1702bf7d0be4391948f49b:1

5. Show the ownership info of the painted coins "BITFAIR-SHARES", the output is the owner address, the amount the address owns, and the transaction output which assigned ownership to that address, then a line with a total at the bottom:
$ python -o BITFAIR-SHARES
1AEn3U5MhedXYRbpxLKmkL4r5Kz1XkdZA 0.01 630bccacd6f4401fde53822af3f011daa47ec1bedd1702bf7d0be4391948f49b:1
** Total BITFAIR-SHARES: 0.010000 **

6. Create three new addresses (could be done by another user, for example the buyer of the security - the buyers should also run the command in step 4 to initiate the coin tracking), and create a transaction that transfers 0.006 to the first address (represents 60% of "outstanding shares"), 0.003 to the second (represents 30% of "outstanding shares) and 0.001 to the third (represents 10% of "outstanding shares"):
$ python -n
Address added: 1KbDEaZ99YJYaT62emhFwabFoqQ6LYdJg9
$ python -n
Address added: 1DAHyXPNJjqLGFNqHhavrukWZ6XkY8Kj21
$ python -n
Address added: 1Mhx4LMjbmN6KJ9B5BkdZ5zVWQP64F5TJC
$ python -f 1AEn3U5MhedXYRbpxLKmkL4r5Kz1XkdZA:630bccacd6f4401fde53822af3f011daa47ec1bedd1702bf7d0be4391948f49b:1 -t 1KbDEaZ99YJYaT62emhFwabFoqQ6LYdJg9:0.006,1DAHyXPNJjqLGFNqHhavrukWZ6XkY8Kj21:0.003,1Mhx4LMjbmN6KJ9B5BkdZ5zVWQP64F5TJC:0.001 -w 0.005

7. The result of the former step is a hex-encoded raw transaction. Because it contains no transaction fees, the standard satoshi client will refuse to send it. However, the resulting hex-encoded raw transaction can be broadcast on the network using PS: At the moment, you cannot be sure that the transaction will be included in a block, since it contains no transaction fee (i.e. compensation to the miners). I am currently working on a solution to this.

8. Update list of BITFAIR-SHARES holders, and show it:
$ python -u BITFAIR-SHARES
$ python -o BITFAIR-SHARES
1DAHyXPNJjqLGFNqHhavrukWZ6XkY8Kj21 0.003 d8e8dc799be1b552f29f8cbd2df24a1fcb9c2a9f4a43c9b4444b9dc329bbd17d:0
1Mhx4LMjbmN6KJ9B5BkdZ5zVWQP64F5TJC 0.001 d8e8dc799be1b552f29f8cbd2df24a1fcb9c2a9f4a43c9b4444b9dc329bbd17d:1
1KbDEaZ99YJYaT62emhFwabFoqQ6LYdJg9 0.006 d8e8dc799be1b552f29f8cbd2df24a1fcb9c2a9f4a43c9b4444b9dc329bbd17d:2
** Total BITFAIR-SHARES: 0.010000 **

9. Pay dividends of 0.1 BTC in total from my wallet account named "bitpaint_donations" to the holders of the colored coins ("shareholders of BITFAIR-SHARES") (not sure if this works with an encrypted wallet, should be easy enough to fix for those who have it):
$ python -d BITFAIR-SHARES:bitpaint_donations:.1

10. List what shares/colored coins are owned by me, their dividends (and address that the shares/dividends belong to, along with the transaction output that assigned the shares to my address):
$ python -m
BITFAIR-SHARES 0.003 ( div: 0.03 ) 1DAHyXPNJjqLGFNqHhavrukWZ6XkY8Kj21 d8e8dc799be1b552f29f8cbd2df24a1fcb9c2a9f4a43c9b4444b9dc329bbd17d:0
BITFAIR-SHARES 0.001 ( div: 0.01 ) 1Mhx4LMjbmN6KJ9B5BkdZ5zVWQP64F5TJC d8e8dc799be1b552f29f8cbd2df24a1fcb9c2a9f4a43c9b4444b9dc329bbd17d:1
BITFAIR-SHARES 0.006 ( div: 0.06 ) 1KbDEaZ99YJYaT62emhFwabFoqQ6LYdJg9 d8e8dc799be1b552f29f8cbd2df24a1fcb9c2a9f4a43c9b4444b9dc329bbd17d:2

11. Forward dividends from my asset-addresses to one of my wallet addresses:
$ python -x 1DAHyXPNJjqLGFNqHhavrukWZ6XkY8Kj21 -y 16KUdKHHZ1AUVb4ZH6Q2VY55L3V3gCCSmr
Paid 0.025 to 16KUdKHHZ1AUVb4ZH6Q2VY55L3V3gCCSmr
$ python -x 1Mhx4LMjbmN6KJ9B5BkdZ5zVWQP64F5TJC -y 16KUdKHHZ1AUVb4ZH6Q2VY55L3V3gCCSmr
Paid 0.005 to 16KUdKHHZ1AUVb4ZH6Q2VY55L3V3gCCSmr
$ python -x 1KbDEaZ99YJYaT62emhFwabFoqQ6LYdJg9 -y 16KUdKHHZ1AUVb4ZH6Q2VY55L3V3gCCSmr
Paid 0.055 to 16KUdKHHZ1AUVb4ZH6Q2VY55L3V3gCCSmr

12. The result of each command in the former step is a hex-encoded raw transaction. It contains a transaction fee of 0.005, to help it get mined into a block. The hex-encoded raw transaction can be broadcast on the network using Your client should see the transaction within seconds.

Planned features:

Please be cautious when using it, but feel free to criticise, modify and contribute. And if you like it, support it: 1GsnaaAWYMb7yPwBQ19bSLLMTtsfSyjqg3.
9  Economy / Gambling / [ANN] Bitfair: Betting Exchange (CLOSED) on: September 17, 2012, 10:10:47 PM
Edit: Service has been closed for now. Will reconsider reopening in a slightly new form when/if multisig becomes more popular and easier to use.

Hi y'all,

I'm making a betting exchange that uses bitcoin - it has currently passed all my in-house tests, and I would now like to invite all of you to test it.

There are currently many options for the gambling bitcoiner. At least a large number of casinos, and SD. For those wagering on real-life events, there's a bookmaker who accepts bitcoin, charging a gigantic overbook, of course, and there is the betsofbitcoin, which has a messy, totally unpredictable payout scheme in addition to charging an enormous commission.

Therefore, I have written a betting exchange, similar to for instance Betfair and Betdaq, that tries to leverage the strengths of bitcoin.

A betting exchange is a peer-to-peer platform for betting - instead of betting against the house, you are betting with other users. You select the event you want to bet on, the selection you want to bet on (or bet against), and the odds you want, send your bitcoins to the address for those odds, and your bet is matched against the bets of other users or returned if your bet is not matched before the market closes.

In this testing period you can only bet on tomorrow's UEFA Champions League match Real Madrid vs Manchester City. The market closes at the scheduled kickoff. Of course, no commission will be charged during this testing period - winnings are paid out in full (apart from a small transaction fee to the miners to ensure the transaction is confirmed in reasonable time).

The testing period has essentially two purposes:
  • Testing the technology: it has passed all in-house tests, but has not been exposed to the wider world yet. Hopefully there are no serious bugs, but be warned!
  • Collecting feedback on the concept: I would very much appreciate your honest opinion on the concept of a betting exchange built in this way. What things are bad? What things are good? What is missing? What is superfluous? What is confusing? All feedback will be greatly appreciated.

Visit the site here:

Click on "Help" in the top navigation bar to learn more about the service.

How do I place a bet, and how are my winnings paid?
Very simple: just send bitcoins to the address corresponding to the odds you would like to bet at ("back") or against ("lay").

Longer explanation: Visit the site, and follow the link to the event you want to bet on. This will take you to the market summary screen, showing the selections and the odds currently available in our book. If you would like to back or lay the selection at any of the available odds listed there, simply send your bitcoins to the corresponding address. If you would like to back or lay a selection at different odds, click on the selection you would like to back or lay, and send your bitcoins to the address corresponding to the odds you would like.

When the transaction is detected on the bitcoin network, your bet is matched with other bets in our order book (at the best possible odds, naturally) and any remaining unmatched amount is entered into the order book.

Unmatched portions of your bet can be cancelled at any time by signing a message that proves you own (one of the) originating address(es).

The winnings, and any bets or portions of bets that are unmatched at market close, are returned to the address from which the bet was sent in the first place when the outcome has been unconditionally determined. (Users of shared wallet services beware!)

Some words of warning
  • The service is IN TESTING. That means you should keep records of all your transactions, in case anything goes wrong, and that there is a chance your bet will be voided if something unexpected happens, even if it may have previously been considered to be matched. Please don't cry if your bet is voided.
  • Make sure you understand betting exchanges before you try it
  • Never gamble more than you are prepared to lose
  • This service is run in "onionland", that is, as a TOR hidden service ( To access it, you need to have TOR installed, or use the Tor2web proxy. TOR protects your privacy, and it protects my privacy.
  • You should avoid placing large bets at this time because (1) it's a bad idea to send large amounts to some anonymous person in onionland with no reputation yet, (2) the technology is still in testing.
  • The site is slow. It's on TOR and hosted on a fairly slow connection. Please be patient - but even though the site is slow, the bets are normally received withing seconds of being sent.

Since I am very short of BTC, I am also looking for sponsors - if you would like to sponsor the service, send me a PM with your offer (looking to buy my signature, some honorable mention, etc.?). Any donations would also be appreciated, and donations and sponsorships would go towards covering hosting costs (1FUwAQVuy3HiDFNbGAsmQ7gfky8tHfm2CK).

Betting exchanges are much more fun than traditional bookmakers, and have plenty of advantages - although going through them here would be beyond the scope of this post. I think this concept really shows off the strengths of bitcoin, and offers a lot of value for bitcoin users. In the future I want the service to use multisig transactions - that would make this service truly great.

I would like to offer my gratitude to whoever is willing to give it a try and offer their opinion. As said, the service is under development, so please make an effort to keep the feedback constructive.

Good luck!


tldr Help testing a betfair clone for bitcoin.
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!