Tuesday, June 10, 2014

Peer to Peer SportsBetting in 5 steps using Bitcoin

Peer to Peer SportsBetting in 5 steps using Bitcoin

 Peer to peer betting using counterparty is here. Counterparty is a protocol that runs on top of bitcoin. It is one of the bitcoin 2.0 initiatives and allows additional financial applications that cannot be done with bitcoin alone. This includes:
  • Smart Property - basically you can create your own coins and asset.
  • Distributed Exchange (DEX) - which is a distributed (peer to peer) version of a stock market, where anyone can sell any asset  for any other asset to anyone.
  • Betting - Binary and CFD. You can use this for hedging or leveraged financial transaction (CFD) or just a simple bet that an event will happen or not (binary).

So here we are now interested in the betting part, particularly the binary bets because this is used for sports betting.

Before we explain how this works lets talk about why peer to peer sports betting is important.

Sports betting is huge:
The worldwide sports betting industry is worth anywhere between $700 billion and $1 trillion according to Sportradar, a company that monitors the gambling activity of over 55,000 sports matches a year. The estimation was reported by the BBC and says that more than 70 percent of that action is placed on football matches in the legal and illegal betting markets.

So the market is big and most of it happens illegally. If illegal there is a problem: trust. You either need to trust your (mafia) bookie or you need to trust some off-shore casino. Both are really bad options since they are illegal, even if you can trust them you don't know if some government will take them down.

If its legal (i.e. you you fly to Las Vegas to bet on your favorite team) or you bet in Europe there is yet another problem: the vig (vigorish) is about 10%. This 10% fee leads to the fact that most players lose and the house makes a huge profit. While sportbetting is naturally a fair market between all the players in reality its effectively gambling because just like betting on roulette its pretty much impossible to win (with the exception of some very few that make more than 10% on avg per bet).

Both of these problems are now solved using bitcoin:

1. Betting can be done without a casino and trusted 3rd party by betting directly peer to peer. There is still a 3rd party feed provider but its much easier to trust a publication of a result and also much easier to verify this than trusting a bookie or casino.

2. Betting is now done Peer to Peer where players set their odds directly and without vig. Because you don't bet against the house but against other players there is no adjustment to the true odds between the two. The only fees we have to pay is to make a bitcoin transaction and the feed provider also receives potentially a fee. Since providing a feed is much cheaper and easier than being a casino and holding the risk of losing the bet this will be much cheaper. I.e. currently 1% vs 10% the bookie tends to charge.

This is big for two parties:

a) Sport bettors: The people who like to bet on sports can now have a real fair market. Sport betting thus can become a true skill game vs gamble that it is now. Today unless done professionally you will have practically no chance at beating the house. But in the future one will simply have to be smarter than the average player to be able to make a profit.

b) The bitcoin economy. I love bitcoin and use it all the time. But to be honest there is nothing in my world that I can't do without it.  But now we have an actual application that is only possible because of bitcoin: Peer to peer betting is clearly superior to betting vs a casino. Just like email is better than snail mail. So every bettor should essentially move away from their old school casino and use bitcoin to bet on their game. This means that 1 trillion USD should ultimately flow into the bitcoin economy.  But because the game is much better (less money wasted in fees and more money won by players) the market can actually be bigger, simply because for many people its not stupid any more to bet on games. So players naturally will bet more and bigger and more players will do it in the future.

So here you have it why I think you should care. But enough with the philosophical stuff. Lets take a look how this works:

There are 5 things you need to do make your bets on counterparty. I will show this and post screenschots so you can get a feel for it even if you are not ready to invest real money.

1. Get a counterwallet.co

Go to counterwallet.co and create a new wallet using a secret pass-phrase.

Counterparty is a global marketplace and financial platform built on Bitcoin, which makes powerful peer-to-peer financial instruments available to anyone with an Internet connection. Trade assets, launch projects, secure funding, and make financial agreements that protect and enhance your wealth – cheaply, safely and easily. Just as the Internet shattered the barriers preventing the open exchange of information, Counterparty allows you to engage in business with whomever you choose, with no gatekeepers or middlemen collecting fees or restricting its use.

2. Send over some bitcoin and by some XCP

Counterparty runs on top of bitcoin, so your counterwallet contains already some bitcoin addresses. So sent some bitcoin over there. Once you have bitcoin in the bitcoin address of your wallet you can  buy some XCP via the distributed exchange (that's how I do it) or you can buy XCP some place else (i.e. bter.com).

When you buy XCP with the DEX I suggest to overwrite the market price with something a bit higher, you will get the market price anyway (the DEX chooses the best price for you either way) but I have had issues with using the market price that is suggested. The volume on this market is currently very low that is probably why.

Why do we need XCP?
XCP is the counterparty currency and is used to make peer to peer bets and other things such as creating assets. It is needed for counterpaty to bet with and to take money into escrow and pay it out automatically.

Once you have aquired some XCP your wallet should look something like the above. Notice you need both BTC and XCP in your wallet. Everytime you make a small transaction a tiny amount (0.0002) of bitcoin is used as a transaction fee, so without BTC you can essentially not do much on counterparty and of course the XCP are needed for making the bets themselves.

3. Find your Feed to bet on.

In order to make a bet you need a feed. This is a bitcoin address that will publish a result in the future so you can bet on the outcome now.

In this example we will use a feed to bet on the World Cup. Lets assume we think Brazil is going to win the Cup and we want to bet on Brazil to win.

Go to http://xbet.io > WorldCup > Winner of World Cup

Xbet.io is a website of a feed provider. You can find feeds for different kinds of sport bets and also see what has been bet on these feeds so you can understand the market conditions (granted this market is quite tiny right now).

You can see all your choices above. The first line is Brazil. If we want to bet on the fact that Brazil will win we need to chose the "Back" side. "Lay" means we are betting against that outcome. The different colors are different odds (top line) and the amount of XCP that is waiting for the counterbet. If this is confusing click on the "i" icons. The xbet guys have done a wonderful job explaining everything.

We can thus currently bet 9 XCP for 4.2 to 1 odds that Brazil will win. We can also create a new bet if we want. But lets just take the existing odds so we can make sure that the bet will be matched right away (we know there is a counter-bet already available).

So I simply click on the purple box and the Bet Maker pops up:

I can now define the bet I want to make. I need to enter my bitcoin address (the one in my counterwallet that has both BTC and XCP) and I can define how much I want to bet and at what odds. When  done click submit.
The code that is generated is the feed + the betting logic that we just created with the help of this website. So we now have the feed that we can use to make our bet.

4. Enter the bet in counterparty

Now go back to counterwallet and click on Betting and enter the code you just created in the Address/Bet Code field.

After you paste in your code can now verify all the details of the bet.

All that is left to do now is to review once more and actually make the bet.

Click the bet button.

5. Watch for your bet to be countered

Now we have sent the bet to the bitcoin network. We now need to wait for the transaction to be written into the next block in the blockchain. This will take a few minutes and counterwallet reminds us of this fact nicely.

Because we chose odds where there was already a counterbet existing our bet was matched immediately. Essentially what counterparty does here is look for a counterbet and then escrow the funds from both accounts. You can see this by the message that we sent 1 XCP and some other address sent 3.2 XCP, this is due to the odds of 4.2.

That means the bet is made and now in a pending status until the feed will publish the result of the outcome, in this case the conclusion of the World Cup.

In the mean time I can review all the bets I have made in the "My Bet History" tab. I think this view needs a bit of work from counterparty. It is hard to recognize which bet is which and some of the details of the feeds are missing in the overview. I have been told by the developers (you can talk to them via the chat in counterwallet) that they are working on fixing this. The whole functionality just came out 2 days ago and has not been marketed at all so lets be a bit patient.

Below is the view from the "Open Bets". This is what it looks like when you make bets that have not been countered.  I created some odds that have not been accepted by some other bettor just yet and they are waiting to be be countered.

In summary I think this is very powerful. Dealing with counterparty and bitcoin might feel a bit clunky at first and many things take some getting used to, especially the waiting for bitcoin block confirmations.

On the other hands the bets work quite well. Once you have the XCP and you know how to get your feed it is quite amazing that one can simply create whatever bet that is desired. The xbet.io site in combination with counterparty.co is a wonderful solution that comes just in time.

I believe this has the great potential to completely change the sports betting market. I have personally never been into sports betting for the simple reason that I know that I would not be able to make any money against the house. Now I can just imagine trying to learn it. People who already bet on sports must be drawn to this even more as their profits should rise quite a bit with the reduced fees.

If the above is true than bitcoin will also gain from this as new people will join the network and money has to flow in. We will see what the future holds, but I think it is looking swell.

I have written this article as I have seen no media coverage of this so far and wanted to give people an idea of how peer to peer betting can work today without needing to risk your won real money. If you like what I wrote I would appreciate some BTC or XCP tips at my bitcoin address:  15ZBYrd8VgtX43K7R21Zwo6Biu5Z7fMeqn

Thank you and good luck with your bets.