Papabyte
Papabyte
Aug 5 · 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.

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!

Obyte

Smart payments made simple

Papabyte

Written by

Papabyte

Obyte

Obyte

Smart payments made simple

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade