Exploring 3 ways to integrate RedStone to tailor your needs

Watchman Zēk
3 min readApr 28, 2024

Redstone is an oracle protocol that provides price feeds to DeFi Protocols. RedStone is available cross-chain including multiple EVMs, non-EVMs, rollups and all kinds of appchains.

Financial data is the backbone of decentralised finance. It enables assets valuation and collateral management. Without access to the reliable pricing feeds, it’s impossible to create instruments like derivatives, options and futures.

Moreso, Redstone Oracles provides different needs tailored to the basic requirements of A Modular chain or protocol. This includes the the Classic, Core and X Model.

Let’s explore this real quick

Redstone Core

Redstone Core has been one of the most suitable model for most Dapps and Protocols. Blockchain infrastructures like ZkLink integrated the Redstone Core as their choice, this applies to many more protocols as well.

The core Model has been tested to be effective with more than $100M TVL in DeDi Protocols accross different blockchain networks. Basically, The Core Model consists of the Data Access Layer (DAL) and EVM Connector. The data access layer is where data packages signed by data providers are first broadcasted.

What is neccessary for this model integration :

  1. Installation using either Hardhat or Foundry (Yarn/NPM)

2. Usage which involves Adjusting your smart contract and javascript code for your dapp to avoid contract errors.

Also, Redstone already provides neccessary requirement as well. You can always tailor source code to your need.

Using the Redstone core, dApp users deliver signed data packages on demand to the destination chain. This also has Lowest gas costs and a few seconds of latency.

Redstone Classic

This choice is very Compatible with traditional Oracles, dApp gets full control over data source and update conditions (heartbeat and deviation threshold).

Redstone Classic model is well effective for protocol where gas costs are minimal, there’s existing well audited codebase and for protocol deployed on private network.

Unlike the Core Model which uses the DAL and EVM Connector. This model mainly involves the off chain relayer and Onchain contracts. The Off chain relayer is responsible for pusing the Data onchain while the onchain contracts ensures storing prices and getting them into neccessary interface.

The relayer performs according to the environmental variables customization whereby checking the define set of conditions. If any conditions are met, the prices will be updated

Redstone X

This one can be specially tailored for sophisticated protocols like Perps & Options with a Front-running proof.

Moreso, Redstone supports any public and private data API. There are dedicated plugins available for the most popular aggregators, off-chain exchanges and DEXes. It is also possible to directly connect your internal data source.

In this case this model impement a Deffered execution pattern. This processes transaction in two steps.

However, Combining both the core and classic can be effective as well. Synthetix used this kind of model. Deploying the price feed and modifying your client code to use ERC7412

Exploring more through Redstone official Doc will be helpful : Link to Doc

This mark the end of this article, I hope you find this helpful and informative

--

--

Watchman Zēk

Tech Expert, Defi Analyst, Blockchain Researcher and Data Analyst