On-Demand Oracle Solution

Modefi
3 min readNov 8, 2020

Leveraging Modefi’s by design decentralized model, the platform introduces the ability for developers and end users to obtain one-time and uncommon data requests to meet the demands of their custom smart contracts that are reliant on outside data sources that may not have API’s.

What is an Oracle?

A data oracle provides the transfer of real world data to smart contracts on the blockchain.

Why are Oracles needed?

Blockchains and smart contracts don’t have direct access to off-chain (real world) data. However, for many smart contracts, it is important to have relevant information from the outside world to function as intended.

This is where oracles are necessary, as they provide a connection between off-chain and on-chain executions. Oracles are extremely important to the blockchain ecosystem since they open a gateway of possibilities to smart contract uses.

The Problem

Finding a Oracle data provider is proven to be difficult for small one-off or uncommon data requirements. Typically most trusted Oracles stick with the common data outputs. E.g. The price of a popular cryptocurrency. This currently works for a large portion of data requirements on-chain at the moment, but with adoption of smart contracts in other sectors like insurance, gambling, or voting, the need for all types of data on-chain will grow exponentially.

The Modefi Solution

At Modefi we understand the importance of off-chain data requests regardless if the requirements are ongoing or one-off tasks.

The On-Demand data oracle comprises a P2P network built around smart contracts and EOA’s. It’s designed to be easy to use and integrate by end users, developers and data validators.

Data reporters (validators) may be subject to Governance, and other means of social verification. Prior to being eligible to report data, the validator bonds collateral (if required by client) and will be rewarded upon successful consensus of the data they provide. Providing incorrect or manipulated data will result in the validator being disqualified from future requests and at risk of losing their stake.

With the use of Modefi’s P2P On-Demand data oracle it opens up the possibility for small data requests ranging from a friendly wager on who will win the next presidential campaign, or a multi-million dollar decentralized sports betting platform needing the score for tonight’s big game.

What can this data be used for?

  • E-Sports
  • Sporting Events
  • Elections
  • Voting
  • Weather conditions in a location at a specific time
  • Prediction Markets
  • P2P wagers
  • Insurance Payouts

How it works

Bob and Alice decide to create a friendly wager smart contract to bet on who will win the next Presidential Election. The smart contract allows both parties to submit their pick and deposit the wager amount. The wager smart contract is programmed to only accept the winning result from a custom oracle contract deployed on the Modefi network.

The oracle contract is deployed automatically after Bob and Alice fill out all the relative information on the Modefi oracle dApp.

This information includes but is not limited to

  • Brief description of the data requested
  • Where the result data should be sourced from
  • List of potential outcomes
  • Event timer
  • Required number of validators for consensus
  • Required value of tokens staked by validator
  • Minimum reputation
  • Validator Incentive

Once the oracle contract is deployed and the required timer has expired, eligible validators can start submitting their results. After the minimum number of validators have submitted data, the contract will reach consensus and the results will be available on-chain for the wager contract to react accordingly. The wager contract will then allow the winner to withdraw their funds.

--

--

Modefi

Building the foundation for real world adoption of Oracles and DeFi