Becoming a Bitcoin Oracle: How To Publish a Counterparty Feed
Latest posts by Dean (see all)
- Aeternity: Fast, private smart contracts, an oracle machine & truly decentralized mining - March 29, 2017
- MetaGold: Some of the Best Games using Ethereum! - March 27, 2017
- The Scarab Experiment: Creating A Decentralized Artistic Personae - March 16, 2017
What is a Bitcoin Oracle and Why Should Consider Becoming One
Sometimes things like smart contracts and P2P betting protocols require a trusted source of information from outside the network. For example, two people may be able to use a peer-to-peer protocol to have a bet with each other over who will win a football match, without the need to use a central service provider. But unless there is a third-party to say who won the match (and hence the bet) there are likely to be disagreements. In the same way, a smart contract may need a trusted source of information on whether a piece of work has been done satisfactorily, whether a piece of property has changed hands, or on the exchange rate between different currencies. In either case, the provider of this information service, whose job is purely to broadcast information which the users of a P2P network can choose to mutually trust, may be called an ‘oracle’.
Oracles might publish information via a range of different blockchains or other P2P protocols, but in this article we will focus on the ‘Bitcoin Oracle’ who uses the most secure blockchain available, which of course belongs to the original cryptocurrency Bitcoin.
Anybody can use Counterparty (CP) to become an oracle (with no real technical skills required) by broadcasting information over the Bitcoin blockchain. Because CP has a peer-to-peer betting protocol baked into it, users who both trust the same oracle may choose to have a bet with each other using that information. The oracle is not involved in arranging this deal, taking payments or settling with the winner – they just publish the information and set a price for its use within these P2P smart contracts arrangements.
The role of the oracle is perfectly suited to anybody who has built up trust within the crypto community. It requires minimal work, but does require that people feel they can trust you to publish reliable information. If you have a good reputation built up on forums or social media, or if you run a well established website, then becoming an oracle is a way to effectively monetizing the trust that you have built up.
How To Become a Bitcoin Oracle By Publishing a Counterparty Feed
A Counterparty feed provider is just another name for an oracle: it’s just someone who publishes information and sometimes gets a reward for doing it. Like all Counterparty transactions, the information is published on the Bitcoin blockchain. It is surprisingly easy to become a feed operator. Here is what you will need:
- A web hosting account, or some other way to publish a single page of text onto the internet.
- You will obviously need access to Counterparty software and have Bitcoin address you can use with it.
- People who trust you
- Some way to communicate with the people who trust you (a website, social media accounts, a BCT ANN thread etc.)
You can actually broadcast information just using the Counterparty client and nothing else, but to set yourself up as an Oracle you will need to provide a little bit more information than you can squeeze into a Bitcoin transaction. You do this by publishing the information in a single page on the internet and then providing a link to it in your broadcast. This is called ‘enhanced feed’ information, and allows software such as Counterparty wallets to provide your full service to their users. This is one of the great things about using CP; you don’t need a central website or to create your own software for people to interact with: they can use it from their own regular wallet.
There are two different types of broadcast you can send. The first type provides a set of possible outcomes for a future event in advance, for example: team 1 wins, team 2 wins, or its a draw. People may use this information within Counterparty by placing a bet on which outcome they think will happen, but this is nothing to do with the feed operator who only broadcasts which possibility actually happens when the time comes.
The other method is to publish information at a set time interval. For example, the price of Bitcoin every hour. Counterparty users may choose to use this to create contracts with each other to bet on whether the price will be higher or lower at a particular time, but once again the feed operator doesn’t get involved in setting this up, they just publish the information for people to use as they wish.
In either case you will use your enhanced feed info – the single page you need to publish online – to tell users about yourself, the information you will be broadcasting and when you will be broadcasting it, the fee you would like to take for its use, the different possible outcomes if you are using the first type of feed described above, and other similar information.
A full list of the different information you can include, along with examples, can be found here: https://github.com/CounterpartyXCP/Documentation/blob/master/Counterwallet/enhanced_feed_info.md
To give you a rough idea, here is one of the examples of the enhanced information you need to publish:
"title": "Superbowl 2014",
"description": "The feed for the Super Bowl final",
"description": "Development site",
"text": "The Bronco wins",
"text": "The Seahawks wins",
"text": "They draw",
Once you have published this information you need to let the Counterparty network know about the service you are providing. You ca do with a simple broadcast (you can send these from any CP client, whether it’s the full desktop command line client for developers or the easier and more convenient web-based Counterwallet.io). Set the value to minus one and put the link to your enhanced feed information in as the ‘text’.
Once you have done this your service will be available to anybody who can use Counterparty, so all you need to do is to let people know about it and then keep publishing accurate and timely information so that people can trust you!