Introduction

There is a way to use any ERC20 token as a payment token in Robonomics Network (page 8 of Robonomics Whitepaper)

There is the `token` field in Demand and Offer messages which specify the address of ERC20 payment token. The match of the field is required in order to create a liability contract.

Until today all the experiments in Robonmics Network used the standard XRT token however it was interesting to demonstrate the work on the example of a token of a completely different project.

The Streamr project was eye-catching since it’s close to our fields of interests.

Streamr: How to deal with it

According to the official web-site of the project “Streamr looks forward to a data economy where humans, AI, and other smart machines are all trading real-time data”

Working on agents for Robonomics Network we were dealing with the similar scenario. Have a look at what the protocol is able to provide for you.

So what if we create an agent which provides the similar to Streamr’s interface and charges DATAcoin. The steps are:

A user chooses the period he/she is willing to receive the data

The Dapp calculates how much it costs and creates a new stream

The user confirms the message and a fee

The Dapp packs all the necessary information, including the stream’s id, into `objective` and broadcasts a demand message to Robonomics channel

The agent receives the demand and replies with an offer

When a liability is created the agent starts to publish the data to the stream

The user is able to see the data on the dapp or come back at any time by the link provided via email

When the time is over the agent publishes the result message with all the published data

The liability is finished and the agent receives the fee in DATAcoin

Have a look at the source code of the agent here.

The source code of the Dapp is located here

Conclusion

So the question is what are the benefits of using Robonomics?

From the user/developer point of view:

using Robonomics’ agent gives a developer more convenient way interact with Streamr. The benefits of using ROS pushes the developer to more complex and interesting scenarios.

the user doesn’t pay extra fees but receives a digital passport of the liability

after the time is over the user receives the log file in a convenient rosbag format

For the Airalab team it was a great experience to work with another project and show how Robonomics extends the Ethereum computer and can be integrated with existing projects.