How to Enable a Smart Contract to Get Real-World Location Data

smart contract location data

If your smart contract needs access to real-world location data you only have one option: an oracle. But if you’re opting for a centralized oracle service (which is your only viable alternative right now) that means you’ll be vulnerable to scams by bad actors. However, there is a second choice: XYO Network, who has devised an innovative oracle network to give your project access to authoritative Proof of Location (POL). In this article, you’ll learn what the benefits are, how it achieves its security, and how you’ll be able to integrate it in your own smart contracts!

The Problem with Smart Contracts and Oracles

Smart contracts are limited in that they can operate only on the data contained inside the nodes. They’re like a self-contained system, closed to the real world. If you need to include location data in a smart contract, your only option is to use an oracle.

GPS

An oracle gives smart contracts data from the real world, which means that if the oracle is compromised then so is the entire smart contract.

oraclizeWhile there are decentralized oracle services in development like ChainLink and Augur, if you want a tested and working solution, you are currently limited to the centralized ones like Oraclize. This means that malicious actors can penetrate their websites and control their output. Back in 2012, University of Texas students were able to spoof Proof of Location technology to force a military drone to land. Crypto blogger YoungUpstarts noted, “That technology is now easy enough for your neighbor’s twelve-year-old to tamper with in order to level up his Snorlax on Pokemon Go.”

XYO Network tackles this issue with its crypto-location oracle network that is resistant to attacks and achieves unprecedented accuracy by creating a whole new system of devices to achieve its goals.

XYO Network

What is the XY Oracle Network Trying to Achieve?

XYO Network is a decentralized platform that helps smart contracts get out into the real world by using its network’s ecosystem of devices to determine exactly where physical objects are at any specific time. The network uses a system of innovative technological methods to vouch for the certainty of its data from the moment when XYO sourced the data to when they handed it over to their user.

Four Components of the XYO Network

XYO Network uses a system of four primary types of nodes to collate, store, and retrieve its data in order to answer user queries. These components are:

  • The Sentinels that collect location information via entities that include Bluetooth trackers, GPS trackers, IoT devices, satellite tracking technology, QR code scanners, and wireless scanning.
  • The Bridges that receive this location information from the Sentinels and “tidy it up” before passing it on.
  • The Archivists that store and catalog the location information in smart contracts.
  • The Diviners that retrieve, analyze, and rate the relevant stored data to answer incoming queries.

XYO Network

Because these four components use certain protocols and algorithms to protect the accuracy of the data as it gets transmitted, XYO Network calls this process the “Proof of Origin Chain.” The intent is to resolve the “oracle problem” and to provide Proof of Location that is very difficult to spoof.

Proof of Origin Chain

The Proof of Origin chain works on protocols that lock in the authenticity of the original data.

  • To verify its accuracy, each proximate bundle of data is tested by the XYO protocol of Bound Witness, where two nodes cosign on their XYO interaction.
  • To vouch for the certainty and accuracy of the data, XYO Network also uses transient key chaining (TKC), where location-data signed by a specific private key becomes associated with a specific time and date and is active only for those few minutes. Transient key chaining is far more secure than the traditional public-key cryptography system, where the individual’s private key is held long-term and can be lost or stolen. In the XYO chain of data transmission, both Sentinels and Bridges use TKC (Bridges apply their own TKC to confirm that this data is unaltered).
  • To protect your identity, the XYO Network Proof of Origin chain uses the cryptography of Zero-Knowledge Proof, which provides data confirmation without revealing information on anything else.

XYO Network: User case

Say a user wants to track his package:

  1. He programmatically asks XYO Network something like, “Where is my eCommerce order package with XYO Address 0x123456789…?”
  2. The query gets sent into a queue where it waits to be processed and answered.
  3. He can set his desired confidence level and XYO token price at query creation. The more complex the question and the more data needed, the higher the transaction fee.

Once the XYO Token holder pays the required amount of tokens, his query enters the system:

  1. The Diviners who work on the task will contact the Archivists for the relevant data.
  2. This data is then analyzed by the Diviners, who rate the data according to the best response.
  3. The Diviner also uses the Origin Chain Score algorithm to confirm the accuracy of the retrieved data. The data that proves to be irrelevant or false is sent back to the Archivists, who purges it from the blockchain.
  4. The questioner pays the network in the crypto of his choice (e.g., BTC), that is then converted into XYO Tokens.
  5. All four components involved in the transaction receive a portion of that XYO gas payment, but the Diviners are paid more than the Sentinels, Bridges, and Archivists since their tasks are more extensive.

XYO Token

XYO Token

A cryptocurrency derives its value from its utility in the network. XYO Network notes that “when it comes to modern crypto economics, many coins have become more useless than the assets they were seeking to displace (fiat currencies).” To that end, XYO believes that remuneration should reflect quality and the amount of work, which is one reason why Diviners get paid more than the other three nodes. It is also why XYO puts its Miners (e.g Sentinels, Bridges, Archivists, Diviners) in charge of adjusting the required accuracy level of the location-data, so that it encourages competition, thereby raising the quality of the work (and subsequently the value of the XYO Token). This primer on its token economics can tell you more.

Central choke points

Platform vulnerabilities include, but are not limited to, design/architecture flaws, coding errors, incorrect economic motivation, and social engineering. For instance, bad agents could corrupt the platform with malicious data (“Poison the Well Attacks”) or infiltrate nodes (“Assassination Attacks”). A malicious or dysfunctional actor could also cause a local, regional, or system wide outage (“Denial of Service Attacks”). Despite these and other possibilities, XYO Network concludes that these situations are unlikely to occur, since targeting even a small portion of the XYO Network is expensive and economically illogical. If you want to read more about how are they going to address these situations, you can find all the details in their Red Paper document.

Connectivity

XYO Network for Developers

Some platforms like EOS, Ethereum, Stellar, Cardano, and others can serve as mediators for online interactions. However, most of these platforms are concerned mainly with the online world. They do not focus on the physical world. XYO, in contrast, not only connects with real-time phenomena but is also platform agnostic. In other words, any application built on standard platforms such as Ethereum can use XYO to program smart contracts with arbitrarily accurate location data.

How to use XYO to program smart contracts from standard platforms

  1. Say you’re working on Ethereum, and you  send a query to the smart contract that requests a certain amount of XYO Tokens for a XYO Network response.
  2. Diviners from the XYO Network will receive the location request and they will send the the answer, its score, and the signatures of other Diviners to an adapter that securely connects to the XYO smart contract on the user’s particular blockchain (e.g., Ethereum). (Other Diviners sign off on the proposed block to validate that it is the best block found).
  3. The smart contract and adapter will convert ETH into the requisite amount of XYO that will then pay the XYO Network team involved in answering your query.

Benefits for developers

XYO Network benefits developers in the following ways:

  • XYO Network helps developers interact with the real world as if it were an API.
  • The XYO Network not only integrates today’s leading blockchain platforms, but its agnostic protocol also makes it compatible for future blockchain platforms.
  • XYO resembles platforms like Ethereum, EOS, and Omisego in that it gives developers a platform to build decentralized location-reliant DApps. You can access XYO projects on its GitHub.
  • XYO interfaces through what it calls XY Gamma, a simple web app interface that helps developers build a simpler delivery process.

Location Data

Other Alternatives

XYO Network competitors are Platin and FOAM.

While XYO operates on a web of connected devices that includes Bluetooth beacons, mobile applications, QR-code reading cameras, IoT devices, and satellites, Platin and Foam have different strategies.

platinPlatin uses a Platin app on smartphones that records and distributes location data. FOAM works through a synchronized radio frequency (RF) system where its nodes use radio signals (instead of GPSA) to pick up location signals.

FOAMThey also have different purposes. XYO services cross-industry needs with results that include huge savings in cost, labor, and time as well as fewer deaths and malpractice cases. Platin services any business based on location, like a supply chain. FOAM, in contrast, monitors events like IoT, autonomous cars, and natural disasters.

As far as we have seen, neither of these competitors have the breadth of marketing that XYO has, nor do they have the depth of research, capacities for ensuring data veracity, or reach. In fact, XYO has over one million devices around the globe that provide location data to the network and it recently acquired GEO, a decentralized proof of location project, to help it verify its Proof of Location.  

As a blockchain developer, you know all too well that the data that smart contracts rely on must have a high degree of accuracy. You also know that the systems that record and deliver this data must be protected from any attacks and/or error. Each of these requirements are fulfilled through the unique and robust properties of the XYO Network technology that crosses over to standard platforms so you can interact with the real world as if it were an API!

SAY WHAT YOU THINK

Related