Three Ways to Integrate RedStone Oracle

RedStone Oracle is a leading data provider in the blockchain ecosystem, supporting over 100+ decentralized applications (dApps) and securing billions of dollars in value. To enhance dApp efficiency and reduce costs, RedStone offers three primary data integration models: Pull Model, Push Model, and X Model. Each model is uniquely suited to the needs of different dApps. Below is an overview of these integration methods and how they can be applied.

1. Pull Model

OverviewThe Pull Model provides a flexible approach, enabling dApps to fetch data on-demand rather than pushing it to the blockchain at regular intervals. Data is stored off-chain as cryptographically signed packages and is only accessed by the dApp’s smart contracts when needed.

Application

  • Cost Efficiency: By retrieving data only when necessary, dApps can significantly reduce gas costs. This model avoids the constant on-chain data pushing, lowering operational expenses.

  • Best Suited For: dApps that require access to multiple price feeds with frequent updates while focusing on cost efficiency.

Advantages

  • Reduces on-chain data storage and related costs.

  • Maximizes gas efficiency by enabling dynamic data fetching.

  • Proven in production, currently securing over $100 million in Total Value Locked (TVL) across DeFi protocols.

Example Use CaseDeFi applications managing large numbers of assets, such as lending platforms or decentralized exchanges, benefit from the Pull Model. This approach allows them to minimize costs while maintaining real-time data accuracy.

2. Push Model

post image

OverviewThe Push Model aligns with traditional Oracle operations, where data is pushed to the blockchain at set intervals. RedStone’s Push Model offers greater control over data frequency and timing, allowing developers to customize their data delivery.

Application

  • Control and Customization: Protocols can decide how often and when data should be updated, giving them control over data sources and frequency.

  • Best Suited For: dApps with fewer data feeds that do not need frequent updates, or those that integrate multiple Oracle providers.

Advantages

  • Allows full control over data timing and frequency.

  • Ideal for protocols that prefer the traditional Oracle setup with minimal changes to their existing code.

Example Use CaseProtocols operating on private chains or handling a small set of assets benefit from this model. It provides a familiar Oracle structure without the need for continuous updates or high-frequency data feeds.

3. X Model

post image

OverviewThe X Model is tailored for advanced financial protocols—such as perpetuals, options, and derivatives—that require protection against front-running risks. This model delivers price data by the very next block after user transactions are initiated, ensuring data accuracy at execution.

Application

  • Front-Running Protection: The X Model mitigates front-running risks, preventing malicious actors from exploiting transaction timings for profit.

  • Best Suited For: Protocols focused on perpetuals, options, and derivatives that require low latency and next-block data accuracy.

Advantages

  • Provides strong security for time-sensitive transactions.

  • Eliminates arbitrage and front-running risks by validating price data off-chain before pushing it on-chain.

Example Use CaseProtocols such as perpetual exchanges and options trading platforms that are vulnerable to price discrepancies and front-running attacks find the X Model highly effective. It ensures real-time price accuracy, which is crucial for these applications.


Conclusion

RedStone offers three distinct data integration models, each tailored to specific needs:

  • Pull Model: Ideal for dApps needing frequent, cost-effective updates.

  • Push Model: Suitable for traditional Oracle setups that prioritize control over data frequency.

  • X Model: Perfect for advanced financial protocols needing real-time data protection against front-running.

By selecting the appropriate integration model, dApp developers can optimize their protocols for performance, security, and cost-efficiency, driving further advancements in the decentralized finance (DeFi) ecosystem.