Ensure the security of your smart contracts

MixBytes & Robonomics collaboration report

Author: MixBytes team
The MixBytes team has started the collaboration with Robonomics and its ecosystem projects to help perform the initial research and build proof-of-concept products for two projects. We present a report of what was done in terms of this collaboration.
XCMP + Robobank demo
The main goal of this concept was to implement a cross-chain interaction between Polkadot parachains and use it to allow robots and IoT devices managed by the Robonomica parachain to receive and fulfill orders created and paid in external parachains. This task was difficult because cross-chain messaging was still in the development phase, continuously changing, and required to emulate three blockchains at once in order to prove the workability of this concept. As a result we created the xcm-testsuite pack of scripts allowing us to test cross-chain logic by emulating all the needed blockchain with custom logic and test cross-chain messages between them. Based on the xcm-testsuite, we built a proof-of-concept demonstrating the logic of creating an order in an external parachain sending an XCM message to the Robonomica parachain where a robot receives the order, completes it, sends the completion report back to the source parachain and receives the payment. The whole process of setup and transaction flow is shown in the demo video, more info about this project can be found on Robonomica wiki.
Distributed Sky
This project is related to drones flight regulation: registration of pilots, drones, flight restricted zones and routes announcements. The main goal of the proof-of-concept was to demonstrate that blockchain can be used to announce and register flight routes, mitigating the risk of dispatching errors. Such systems can be used as a base for transport and delivery systems for automated vehicles. While decentralised identifiers of pilots and UAVs are not so complicated to implement (blockchain is a DID and SSI system by default), storing information about geo-zones, their polygons and checking intersections in one transaction was a difficult task. As a result, a kind of "geo-index", similar to spatial indexes used in SQL databases was implemented in runtime logic. The proof-of-concept code allows the REGULATORs to register PILOTs accounts, PILOTs accounts to register UAVs, and announce UAV routes in blockchain. The route is a single line and it cannot be added if it intersects with any of the restricted flight zones. This is the basic functionality the main goal of which was to perform the check with O(1) complexity ensuring its performance in a publicly verifiable way in blockchain. Further development includes expanding of runtime logic to allow multi-line routes, check flight time parameters, create more complicated zones polygons, and implement inverted logic with "flights allowed" zones instead of "flights restricted" zones. All code resides in this repo, an example frontend to demonstrate all described logic is here, the demo video is currently being prepared by Robonomics team, and can be presented by demand personally.
Other posts