๐Using Witnet Custom Feeds
One of the core capabilities of the Wit/Oracle Framework is to enable smart contracts to securely retrieve and transform data extracted from Graph-QL servers, REST API endpoints, JSON-RPC providers, or in general any content accessible via HTTP/GET, HTTP/POST or even HTTP/HEAD requests.
Witnet securely collects data using cryptographic, crowd-attestation and Proof-of-Stake consensus mechanisms. Every oracle data query and its outcome, whether successful or not, is permanently and publicly recorded on the Witnet blockchain.
Wit/Oracle queries from smart contracts rely on formally verified Radon Requests. These Witnet-compliant requests define the public sources for retrieving data and outline the methods for transforming, filtering, and aggregating the data collected from each source.
Multiple data provisioning models are possible depending on who initiates the oracle query and who executes the EVM transaction processing the result:
Active PULL
Smart contract
Some blocks after the data is queried, the consuming contract calls the WitOracle legacy contract to read and process the query result, if available. Query outcomes are publicly stored in the WitOracle contract and can be erased only by those who requested them.
Passive PULL
Smart contract
The consuming contract is called immediately once the outcome of the data query is returned by the Wit/Oracle bridging framework. The consuming contract is in charge of preserving valuable data on-chain.
Passive PUSH
Off-chain environment
The data requester conducts a free dry run of some data query (i.e. Radon Request), to decide if it's worth paying for a Data Request Transaction in Witnet and posting the result on-chain afterward.
Why is it different to other oracle solutions?
Few EVM oracle solutions allow Custom Feeds, often missing crucial features such as:
Adaptability: You can set parameters for data feeds and determine values on-chain before querying.
Time to Market: Create, deploy, and report your own custom feeds independently. No application forms, subscriptions, or third-party involvement required.
Tokenomics: You don't need third-party ERC-20 tokens when pulling data from your smart contracts. Fees are paid in native gas tokens and fluctuate solely based on network congestion status, rather than arbitrary or corporate interests.
Transparency: Data requests must be verified on-chain before querying. Contracts can check data source counts, FQDNs, expected result types, and filtering or aggregation methods before data delivery.
Traceability: All oracle queries are recorded permanently on the Witnet blockchain. Each reported result on-chain keeps a cryptographic trail, enabling the tracking of sources and the time of data collection.
Trustworthiness: Data can be gathered from various trusted sources simultaneously, enhancing decentralization and fault tolerance. Query results could only be altered if an individual controls more than two-thirds of the staked supply in Witnet.
Censorship-Resistance: The requester specifies the size of the committee to resolve an oracle query, with members randomly selected in Witnet for each resolution. Data delivery could only be blocked if an individual controls more than one-third of the staked supply in Witnet.
Create and Validate a New Custom Feed
This examples creates a Cross-Chain Custom Feed that retrieves supply information about Witnet:
Querying Resolution for a Custom Feed
Pushing Resolutions of a Custom Feed
Process Data Query Results
Learn more about Witnet Custom Data Feeds
Follow the rabbit hole deep and learn how to harness the true potential of Custom Data Feeds in Witnet:
๐Witnet Custom FeedsLast updated
Was this helpful?
