# Three Ways to Integrate RedStone Oracle **Published by:** [JP](https://paragraph.com/@hakresearch-2/) **Published on:** 2024-09-11 **URL:** https://paragraph.com/@hakresearch-2/three-ways-to-integrate-redstone-oracle ## Content RedStone Oracle is one of the leading data providers in the blockchain space, supporting over 100+ decentralized applications (dApps) and securing billions of dollars in value. With the aim of enhancing efficiency and reducing costs for dApps, RedStone offers three main models for data integration: Pull Model, Push Model, and X Model. Each model is tailored to meet different needs of dApps. Below is an overview of these three integration methods and their practical applications.1. Pull ModelOverviewThe Pull Model is a dynamic approach that allows dApps to fetch data on demand, instead of pushing data to the blockchain at fixed intervals. The data is stored off-chain as cryptographically signed packages and fetched only when necessary by the dApp’s smart contracts.ApplicationCost-efficiency: By retrieving data only when needed, dApps can significantly reduce gas costs. The data is not continuously pushed on-chain but is accessed during specific transactions.Best suited for: dApps that require access to multiple price feeds with frequent, cost-effective updates.AdvantagesReduces on-chain data storage and associated costs.Maximizes gas efficiency by fetching data dynamically.Tested in production, securing over $100 million in TVL for DeFi protocols.Example Use CaseDeFi applications with a large number of assets that need regular price updates (e.g., lending protocols, decentralized exchanges) benefit greatly from this model, as they can minimize operational costs while ensuring real-time data accuracy.2. Push ModelOverviewThe Push Model operates on the traditional Oracle model where data is pushed onto the blockchain at regular intervals. RedStone’s Push Model gives developers more control over how and when the data is pushed, allowing for more customization.ApplicationControl and Customization: Protocols can control the data source and decide when and how often the data should be updated, ensuring better alignment with their specific requirements.Best suited for: dApps that do not need frequent updates or have fewer data feeds, such as protocols that prefer to integrate multiple Oracle providers.AdvantagesOffers full control over the timing and frequency of data updates.Suitable for protocols that rely on a traditional Oracle model with minimal amendments to their codebase.Example Use CaseProtocols operating on private chains or those that handle a small set of assets can benefit from this model, as it allows them to maintain a familiar structure without constant updates or high-frequency data requirements.3. X ModelOverviewThe X Model is designed for advanced financial protocols such as perpetuals, options, and derivatives, where eliminating front-running risks is critical. This model provides price feeds at the very next block after users’ transactions are initiated, ensuring data accuracy at the time of execution.ApplicationEliminates Front-running Risks: The X Model secures data in a way that prevents any attempts of front-running, where malicious actors try to exploit transaction timings to their advantage.Best suited for: Protocols focused on perpetuals, options, and derivatives, which require ultra-low latency and next-block data accuracy.AdvantagesProvides a high level of security for time-sensitive financial transactions.Eliminates arbitrage and front-running risks by using a two-step transaction process: price data is validated off-chain before being pushed on-chain.Example Use CaseProtocols like perpetual exchanges and options trading platforms, where price discrepancies and front-running can lead to significant losses, will find the X Model highly effective in securing real-time price accuracy.In conclusion, RedStone offers three distinct integration models, each addressing specific needs:Pull Model: For frequent, cost-effective updates.Push Model: For traditional Oracle setups with more control over data.X Model: For advanced protocols requiring real-time data protection against front-running.By selecting the right integration model, dApp developers can optimize their protocols for performance, security, and cost-efficiency, further advancing the decentralized finance (DeFi) ecosystem. ## Publication Information - [JP](https://paragraph.com/@hakresearch-2/): Publication homepage - [All Posts](https://paragraph.com/@hakresearch-2/): More posts from this publication - [RSS Feed](https://api.paragraph.com/blogs/rss/@hakresearch-2): Subscribe to updates