RADIX WikiRADIX Wiki

Religant was a decentralized oracle service designed to provide accurate and up-to-date price data feeds on the Radix network.

Functionality

The Religant Oracle protocol operated by aggregating data from various sources. A network of data nodes queried exchanges for current transaction data and submitted this information to a contract. This contract employed a consensus mechanism to determine the aggregate price. Data nodes, running the Religant node backend software, updated the feed at regular intervals or when the new aggregate price exceeded a specified divergence threshold, currently set at 2%. This threshold ensured that the rate from the Religant oracle's feed remained within 2% of actual transaction rates on exchanges.

Component API

The user-facing API of the Religant Oracle was straightforward, consisting of a single method, get_price, which returned a PriceData structure containing the current XRD/USD exchange rate and a timestamp. The Option wrapper in the return type ensured type safety, with the method usually returning a valid result after the initial round of Oracle feed aggregation.

Integration Guide

Integrating the Religant Oracle into an application required several steps:

  1. Defining the PriceData structure outside of the application blueprint, using various traits and types like ScryptoSbor, USDValue, and POSIXTime.
  2. Declaring the component's API within the blueprint module using an extern_blueprint! macro.
  3. Instantiating a reference to the global Religant component within the blueprint.
  4. Using the Religant component's methods within the application, such as retrieving the current exchange rate and minting tokens based on this rate.

Status

Religant is no longer operational — the project's website (religantoracles.com) no longer resolves and the oracle feed has been discontinued. The Scrypto integration example published by MLabs remains available as a reference. For active oracle infrastructure on Radix, see OTER, an optimistic oracle launched on the network.