Oracle Contract & User Interaction
Last updated
Was this helpful?
Last updated
Was this helpful?
UDF’s oracle contracts provide two distinct interfaces, Pull and Push, designed to deliver flexible data access for dApps. Please refer to the section for implementation details.
The Pull interface enables on-demand verification within user transactions, supporting both Pay-As-You-Go (PAYG) and subscription-based models. The Push interface offers subscribed users seamless access to pre-verified, on-chain data updates.
These interfaces, detailed in the table below, leverage VerificationLib to ensure data integrity and adaptability across diverse use cases.
Pull
verifyWithFee()
Processes the protocol fee for the PAYG pull model during a transaction, verifies transmitter votes, and returns the aggregated data value.
Ideal for dApps with sporadic data needs.
Pull
verifyAsSubscriber()
Confirms the user has an active pull subscription, verifies votes, and returns the aggregated data value without additional protocol fees.
Suited for protocols (e.g. lending) needing frequent, real-time price checks with predictable costs.
Push
getFeedPrice()
Allows subscribed users to read the latest push feed data stored on-chain without verification overhead.
Suited for DEXs or stablecoin issuers requiring continuous price updates for liquidity pools.
Multiple Chains: Each supported chain has UDF Oracle Push and Pull contract deployments. See the page for more information.
Push Node Authorization: Authorization mechanisms manage the push nodes that are permitted to submit updates on each chain, ensuring controlled data propagation through access control mechanisms.
Cross-Chain: For multi-network deployments, EIB supports two sync methods. In the subscription model, chains listen for finalized updates. In the push model, updates are actively sent when values change or a heartbeat is triggered. Both approaches keep data consistent with minimal delay.
UDF supports seamless omnichain data delivery through two models. In the subscription model, transmitter nodes monitor the Entangle Interoperable Blockchain (EIB) and relay oracle updates to subscribed chains as they’re finalized. This ensures efficient propagation with minimal overhead. In contrast, the push model takes a more active approach. Specialised nodes listen to live oracle emissions from L2, compare them with on-chain values, and trigger updates when deviation thresholds or heartbeat timers are met. Each target chain is updated independently, keeping data in sync and available in real time for multi-chain dApps.