Push Feeds excel at providing high-frequency, low-latency data because oracles like Chainlink Data Streams or Pyth Network proactively push signed price updates on-chain. This results in sub-second finality for critical DeFi actions like liquidations. For example, Pyth's Solana feed updates every 400ms, enabling protocols like Drift and Marginfi to operate with minimal latency risk. The trade-off is higher baseline gas costs for the oracle provider, which are often subsidized but can lead to centralization pressures.
Push Feeds vs Read Calls: Contract Design
Introduction: The Core Oracle Design Decision
Choosing between push feeds and read calls defines your protocol's data reliability, cost structure, and architectural complexity.
Read Calls take a different approach by using on-demand data retrieval via protocols like Chainlink Functions or API3's dAPIs. This strategy minimizes on-chain footprint and cost for low-frequency data needs, as contracts only pay gas when they explicitly request an update. This results in a trade-off of higher latency and potential single-point-of-failure during the request cycle, but offers superior flexibility for custom data types not suited to continuous feeds.
The key trade-off: If your priority is ultra-low latency and maximum uptime for core financial data (e.g., a perpetual futures DEX), choose a Push Feed from Pyth or Chainlink. If you prioritize cost efficiency, data customization, and infrequent updates (e.g., an insurance protocol checking a weather API weekly), choose a Read Call solution like Chainlink Functions.
TL;DR: Key Differentiators
Architectural trade-offs for real-time data delivery on-chain. Choose based on your application's latency, cost, and complexity requirements.
Push Feeds (e.g., Chainlink Data Streams)
Proactive, Low-Latency Delivery: Data is pushed to your contract via a keeper or relayer upon update. This enables sub-second finality for critical actions like liquidations or high-frequency trading on DEXs like GMX. Ideal for real-time price oracles.
Push Feeds (e.g., Pyth Network)
Guaranteed Data Freshness: Your contract receives data only when it's new and verified, eliminating stale reads. This reduces gas costs for the end-user and is critical for perpetuals protocols like Synthetix that require up-to-the-second accuracy.
Read Calls (e.g., Standard Oracles, Uniswap TWAP)
Simplicity & Cost Control: Your contract pulls data on-demand via a standard external call. No need for complex subscription or upkeep logic. This is perfect for batch processing, governance votes, or analytics dashboards where near-real-time data isn't required.
Read Calls (e.g., MakerDAO Oracles)
Deterministic Execution & Security: The data pull is a explicit, auditable step in your transaction flow. This avoids unexpected callback logic and simplifies security reviews. Best for lending protocols like Aave where price updates are triggered by user actions, not time.
Feature Comparison: Push Feeds vs Read Calls
Architectural comparison of on-chain data delivery patterns for smart contracts.
| Metric / Feature | Push Feeds (e.g., Chainlink) | Read Calls (e.g., POKT, API3) |
|---|---|---|
Data Flow Direction | Push (Oracle → Contract) | Pull (Contract → Oracle) |
Gas Cost Payer | Oracle/Relayer (Off-chain) | Contract User (On-chain) |
Update Latency | ~1-60 sec (Scheduled) | ~200-2000ms (On-demand) |
Data Freshness Guarantee | ||
Off-chain Computation Support | ||
On-chain Storage Required | ||
Ideal Use Case | Price Feeds, Keepers | Custom API Data, User Actions |
Push Feed Model: Pros and Cons
Choosing between a proactive push feed (e.g., Chainlink Data Streams, Pyth Network) and reactive read calls (e.g., standard oracles) impacts latency, cost, and system complexity.
Push Feed: Real-Time Guarantee
Sub-second finality: Data is pushed on-chain as soon as it's available, enabling <400ms updates (e.g., Pyth Network). This is critical for perpetual futures DEXs like Hyperliquid or options protocols where price latency directly impacts liquidations and arbitrage.
Push Feed: Predictable Cost Structure
Fixed operational cost: The feed publisher (or relayer) bears the gas cost for updates, insulating downstream dApps from gas volatility. This simplifies budgeting for high-frequency applications like GMX or Synthetix that require constant price refreshes.
Read Call: Maximum Freshness Control
On-demand data retrieval: Contracts like Aave or Uniswap V3 can fetch the latest price exactly when needed (e.g., at swap execution). This eliminates reliance on a push schedule and is optimal for low-frequency, high-value transactions where staleness risk must be minimized per event.
Read Call: Simpler Initial Integration
Minimal upstream dependency: Integrate a standard oracle interface (e.g., Chainlink AggregatorV3Interface) without managing subscription or relay infrastructure. This reduces time-to-market for NFT lending protocols like JPEG'd or insurance dApps that query data sporadically.
Push Feed: Higher System Complexity
Infrastructure overhead: Requires managing a reliable publisher/relayer network, monitoring for liveness, and handling potential MEV in the data delivery layer. This adds DevOps burden compared to a simple read call, as seen in custom implementations for high-frequency trading bots.
Read Call: Unpredictable User Cost & Latency
Gas cost volatility: End-users pay for the oracle call gas, which can spike during network congestion, hurting UX for retail DeFi. The call also adds 100-300ms of latency versus a pre-committed value, a critical drawback for arbitrage-sensitive applications.
Push Feeds vs Read Calls: Contract Design
Choosing between proactive data pushes and on-demand pulls defines your protocol's gas efficiency, latency, and complexity. Here are the key strengths and trade-offs at a glance.
Push Feed (Oracle) Pros
Guaranteed Data Freshness: Data is proactively written on-chain (e.g., Chainlink Data Feeds). This matters for permissionless critical functions like liquidations in Aave or price checks in Synthetix, where stale data is catastrophic.
Push Feed (Oracle) Cons
High, Continuous Gas Costs: Every update consumes gas, paid by the oracle or protocol treasury. This matters for high-frequency data (e.g., per-second volatility) where costs scale linearly with frequency, making it expensive for long-tail assets.
Read Call (Pull) Model Pros
Extreme Gas Efficiency: Consumers pay gas only when they need data. This matters for user-initiated, non-critical actions like fetching an NFT's rarity score from an off-chain API or checking a wallet's social profile via ENS.
Read Call (Pull) Model Cons
Latency & Integration Burden: Data is fetched on-demand, adding RPC call latency (~100-500ms). This matters for composability within a single transaction (e.g., flash loans), where synchronous, on-chain state is required.
When to Use Each Model
Push Feeds (e.g., Chainlink Data Streams) for DeFi
Verdict: Essential for high-frequency, latency-sensitive protocols. Strengths: Sub-second price updates are critical for perpetual DEXs like GMX or dYdX and on-chain order books. Eliminates the risk of stale data in liquidations. Provides a deterministic, push-based data layer for automated strategies. Trade-offs: Higher gas costs for the publisher (oracle). Requires smart contracts to manage subscription payments and data consumption.
Read Calls (e.g., Pyth Network, Chainlink Data Feeds) for DeFi
Verdict: The standard for most lending, stablecoins, and spot trading. Strengths: Extremely cost-effective for protocols like Aave, Compound, or Uniswap V3 where price updates are triggered by user interactions (e.g., a swap). The "pull" model means you only pay when you need data. Battle-tested security with multi-source aggregation. Trade-offs: Latency is bound to block time; not suitable for sub-second updates.
Technical Deep Dive: Implementation & Cost Analysis
A data-driven comparison of two primary methods for smart contracts to consume off-chain data, focusing on architectural patterns, gas costs, and optimal use cases for protocol architects.
No, a Read Call is almost always cheaper for on-chain data. A Read Call is a free, stateless RPC query, while a Push Feed requires a paid on-chain transaction to store data. For example, checking a Uniswap V3 pool's price via slot0() costs $0 in gas, whereas a Chainlink oracle update costs $0.50-$5.00. Use Read Calls for non-critical, latency-tolerant data and Push Feeds for data requiring guaranteed on-chain state and consensus.
Final Verdict and Decision Framework
Choosing between push-based feeds and on-demand read calls is a fundamental architectural decision that defines your protocol's performance profile and cost structure.
Push Feeds excel at delivering high-frequency, real-time data with minimal latency for subscribers. This is because the feed provider (e.g., Chainlink Data Streams, Pyth Network) pre-commits gas to push updates to a dedicated on-chain storage contract. For example, Pyth's Solana pull oracle can deliver price updates with sub-second latency at a fraction of a cent in fees, enabling high-frequency trading protocols like Drift and Jupiter to operate efficiently. This model shifts the gas burden from the end-user to the data provider, creating predictable, low-cost access for all consumers of the feed.
Read Calls (Pull Oracles) take a different approach by storing data off-chain (or in a cheaper layer) and having contracts request it on-demand via authenticated APIs like Chainlink Functions or API3's dAPIs. This strategy results in a significant trade-off: it eliminates the continuous gas cost of pushing unused data, dramatically reducing operational overhead for low-frequency data (e.g., NFT floor prices updated daily). However, it introduces per-request latency (2-5 seconds for a full request-fulfill cycle) and variable gas costs paid by the requesting contract at the moment of need.
The key trade-off is between cost predictability & latency versus operational efficiency & flexibility. If your priority is sub-second latency and stable, near-zero user fees for high-frequency actions like perpetual swaps or liquidations, choose Push Feeds. They are the backbone of DeFi's most demanding applications. If you prioritize minimizing baseline gas overhead and your use case involves low-frequency data (e.g., insurance triggers, weekly rewards calculations) or dynamic, custom data aggregation, choose Read Calls. This model is ideal for event-driven contracts where cost efficiency trumps instant availability.
Decision Framework: Consider Push Feeds if: Your dApp is latency-sensitive (DeFi trading, options), you serve a high-volume user base, and you require absolute data freshness on-chain. Choose Read Calls when: Your data updates are infrequent (< hourly), you need to query custom API endpoints, your contract logic is asynchronous, or you are building on an L2 where cross-chain messaging costs for push models can be prohibitive. The optimal choice often involves a hybrid approach, using push feeds for core liquidity data and pull oracles for ancillary or custom logic.
Build the
future.
Our experts will offer a free quote and a 30min call to discuss your project.