Sitemap
Big Cephas

Big Cephas

RedStone Oracles

--

Tutorial on how to Integrate RedStone

Introduction

RedStone is an oracle that specializes in modularity, scalability and cross-chain interoperability. Modularity lies at the core of RedStone’s design philosophy, allowing developers to build customized oracle solutions that cater to their specific requirements.

As part of its modular framework, RedStone offers developers three main integration options. These are:

(1) RedStone Core

(2) RedStone

Get Big Cephas’s stories in your inbox

Join Medium for free to get updates from this writer.

(3) RedStone X.

This article will serve as a brief tutorial to each of these options.

RedStone Core

  • Key idea: Pull
  • Key features: Lowest gas costs, a few seconds of latency
  • Example: Price feed for $weETH, a wrapped LST from Ether.fi

Data is pulled (“fetched”) on-demand and dynamically injected to user transactions achieving maximum gas efficiency as the whole process fits into a single transaction.

RedStone Classic

  • Key idea: Push
  • Key features: Compatible with traditional oracle models, dApp has full control over data source and update conditions
  • Example: Multiple price feeds for Venus, a lending protocol on BSC

Data is pushed into on-chain storage via relayer. Ideal for protocols that have been designed around a traditional oracles model. Developers are able to have full control of the data source and update conditions

RedStone X

  • Key idea: Deferred execution
  • Key feature: Prevents front-running
  • Example: Integration with Cadence, a Decentralized Perpetuals Aggregator

This model implements a Deferred Execution Pattern where transactions are split into two steps:

Step 1: First, the user registers an intention to transact. At this stage, no price data is being transmitted. This means front-running “attackers” are unable to intercept price values and perform arbitrage.

Step 2: On the next block, price is automatically fetched by a “keeper” and the transaction is executed instantaneously.

This is typically used by more complex protocols such as perpetuals, options and derivatives trading platforms.

Learn More

This is merely an introduction to the three main ways to integrate RedStone. For more information on these integration options, please refer to the official RedStone documentation.

Official Links

Website | Docs | Blog | Discord | Twitter | Telegram

--

--