Sports-oracle for Autonomous Agents

Papabyte
Papabyte
Aug 5, 2019 · 2 min read

The first round of our Autonomous Agents Developer Contest has ended with some very interesting entries from participants, congratulations to them! The general feedback is that although Oscript syntax is simple and voluntary limited, it’s still possible to build powerful dApps. We like to say that the Obyte platform is made of bricks you can assemble like Lego, with Oscript it’s also like Tetris: “Some minutes to learn but a lifetime to master”.

To feed the creativity of developers we just launched a version of our famous sports-oracle on testnet with an additional feature dedicated to autonomous agents. Instead of using a feedname posted on the DAG to unlock your smart-contract, you can request the oracle to trigger an Autonomous Agent with a result as soon as it is available. It becomes possible to automate the payout of one or several bets and should enable some interesting decentralized betting applications.

Usage

Open a chat with the sports-oracle with this invitation link:

AmgZLhYG8p+dAC23iv7wUyPSeYLEhxLbtY2XVELJ/H5+@obyte.org/bb-test#0000

or find it directly in the testnet bot store.

You look for a match as you would do when requesting a posting in the DAG, then the bot suggests to input the address of an autonomous agent. Once address entered, the oracle will trigger the Autonomous Agent immediately if result is already known or, if not, as soon as it’s available.

Image for post
Image for post

In this example, if the Minnesota Twins win the game the sports-oracle will send a payment of 10000 bytes to HGIM2KHR6BIK766JRF7TUQ376MIKYZ5C with this data:

{ MINNESOTATWINS_KANSASCITYROYALS_2019–08–04: MINNESOTATWINS }

In sports the have a draw or tie, the value would be ‘draw’. If the match is canceled or postponed, nothing happens.

Oracle Monetization

We have to protect the oracle against someone who would send many trigger requests to steal bouncing fees. Before triggering an Autonomous Agent, it will check that the bouncing fees will be refunded. In the response your Autonomous Agent will send in reaction to this trigger, you must include a refund of at least 10000 bytes to oracle.

Here is a minimal example of an Autonomous Agent that the oracle would accept to trigger since it sends back 10000 bytes:

Of course, this Autonomous Agent has to be funded with enough to pay for the 10000 bytes + transaction fees.

This oracle is not supposed to make any profit and won’t, but it shows how it’s possible to monetize an oracle running on Obyte. Furthermore, the transaction is atomic. The oracle won’t trigger the Autonomous Agent if it won’t get paid and the Autonomous Agent won’t pay if oracle doesn’t trigger it. A very convenient way to do business!

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store