From Pull to Push: Changing Oracle Paradigms
Most blockchain oracles use a push approach to update data (e.g., prices) on-chain. However, with Acurast, highly secure, low latency, and on-demand oracles are possible.
The oracle problem is considered to be the Achilles heel of public blockchains. Traditionally, oracles are based on a push mechanism, where an oracle operator (or other authenticated parties) continuously pushes price updates on-chain.
With Acurast On-Demand Oracles, hyper-frequent price updates are enabled, and universally interoperable across an unlimited number of chains and ecosystems. In this post, we explore the technical details of push and pull oracles, as well as the trade-offs between the two approaches. Further, we examine the security of the Acurast on-demand approach in detail.
Interval-based Push Oracles
So-called interval-based or push oracles provide updates within a given arbitrary time interval e.g., every 5, 10, or 15 minutes. Acurast also supports this type of Oracle, as depicted in Figure 2. These price updates are directly pushed to the environment (e.g., Substrate, EVM, WASM).
- The “script”, i.e., the source code defining the business logic of the oracle (e.g., endpoints of APIs to be called to fetch price pairs from multiple sources), is directly executed on each assigned processor.
- (and 3) The output is cryptographically signed and directly published on-chain to the destination defined in the job and is then publicly available and it is possible for any project (also from other ecosystems) to query the data.
It is important to note that interval-based oracles require on-chain transaction fees for each update and the Processor’s execution reward.
Limitations of push-based Oracles
Increasing the number of price feeds, blockchains, or update frequency all cause additional transaction costs. For that reason, push oracles are limited to offer infrequent updates to a limited set of feeds on a small number of blockchains, whereas on-demand oracles solve these issues completely.
On-demand Pull-based Oracles
So-called On-Demand or pull oracles follow a different paradigm. On-demand oracles move away from sporadic price updates. Instead, they focus on a solution where users directly receive the latest price updates from Acurast’s Processors and then actively submit these updates with their transactions. A simplified representation of the pull flow is depicted in Figure 3.
The process is as follows:
- Users trigger an interaction through the dApp frontend, e.g., initiating a token swap
- A WebSocket channel to the processor is opened and the request is posted.
- The Acurast Processor calls the APIs and fetches the price (which is optimally cryptographically signed) data.
- The reply is then also signed by the Acurast processor and returned through the WebSocket set up in Step 2.
- The user action is based on the on-demand fetched price update. The
Acurast is providing the first of its kind with this solution since the API calls are executed in a permissionless, confidential and zero trust manner, fetched within a secure hardware co-processor, and then directly provided to the user without detours. In addition, this approach provides a considerable upside in terms of offloading the transaction costs for the feeds to the end-user.
Why Acurast for On-Demand Oracles?
There are a multitude of upsides to using Acurast for On-Demand Oracles:
- Security: Instead of trusting third-party infrastructure, the Acurast zero trust execution layer uses secure hardware and cryptography.
- Confidentiality: With Acurast, no third-party server executes price queries, but dedicated processors that are secure and do not leak anything that could negatively impact user privacy.
- Scalability: Acurast enables price fetching From any source to any destination and, thus, unlimited scalability without incurring unnecessary push-based on-chain updates.
- Performance: Direct peer-to-peer WebSocket connections to Acurast processors enable the lowest possible latency to fetch prices without any trusted intermediaries.
- Cost Efficiency: Since no unnecessary spam is incurred, and queries are only performed on-demand, the cost efficiency is maximized.
In summary, Acurast On-Demand oracles are a technical evolution that shows no downsides or trade-offs regarding negative impacts. On the contrary, security-wise, the improvements are manifold. Instead of simply trusting a host of different servers to update Oracle’s prices on-chain, Acurast uses secure hardware to fetch, sign, and return price data in a breeze.
Acurast is a general-purpose platform for building zero-trust applications. A key use-case are flexible, on-demand Oracles that are used by decentralized applications: If you want to bulletproof your Oracles with Acurast, reach out to us via Twitter, Discord, or Telegram.