👁️oracles

an overview of oracles used on handle.fi

an Oracle refers to a smart contract that provides readable data on-chain.

handle.fi uses a combination of our own high speed oracles, Stork Network and Chainlink oracles. each meeting differing protocol requirements

For perpetual trading, handle uses a combination of Stork Network oracles and our proprietary h2SO (handle high speed oracles) system. Chainlink data feeds are used for pricing CDP collateral and mint value of fxTokens. (arbitrum oracles can be found here).

h2SO

h2SO (handle high speed oracles) is handle's proprietary oracle system which allows the end user to update the price directly on an oracle aggregator contract by submitting a trusted signature along with the quoted price.

stork network

Stork is an ultra-low-latency, decentralized, hybrid oracle network. At the core of its design is an emphasis on high performance. Stork ensures the availability of reference prices at millisecond precision, paralleling the speed found in centralized exchanges (CEXs) and traditional financial (TradFi) exchange venues.

the innovative hybrid on/off-chain architecture of Stork enables initial off-chain processing, followed by relevant on-chain price updates. This approach is vital for maintaining our high-performing decentralized exchange (DEX), setting it apart from purely on-chain oracle providers that offer less frequent price updates. In scenarios where pure on-chain oracles are used, the less frequent price updates can hinder the support of long-tail assets, especially when the associated gas fees outweigh the on-chain demand for these assets. Moreover, in times of significant market volatility, these pure on-chain models are less effective compared to the more adaptable hybrid on/off-chain models of Stork.

Stork's system allows us to achieve robust, cost-effective, and high-performance reference prices, while minimizing the risk of pricing vulnerabilities across a diverse range of assets.

Stork carefully selects its publishers and data sources for their proven reliability in delivering low-latency price updates. The chosen methodologies are tailored to enable Stork clients to achieve targeted outcomes and are subject to continuous evolution. Each publisher within Stork's network contributes both index and mark prices for the markets they support, adhering to established calculations for both index and mark prices.

for a more detailed understanding of Stork's oracle architecture, please refer to their documentation.

for pricing CDP collateral and mint value of fxTokens handle uses the official Chainlink data feeds.

Chainlink is a popular protocol (and also product) that develops oracle smart contracts and workflows. The reason Chainlink is both a protocol and also a product/service, is that someone could use Chainlink's open source oracle smart contracts with a self-managed infrastructure, rather than relying on Chainlink's official feeds or operators.

aggregator contracts

the aggregator smart contract is one of Chainlink's oracle contracts. It is usually structured the following way:

  1. there is an Aggregator Interface contract, also called an Aggregator Proxy, which reads data from the Aggregator contract. DApps read the price from the Aggregator Interface, so that the Aggregator Interface could at any time change which Aggregator contract it points to without breaking the DApps.

  2. the Aggregator contract is the actual contract with the oracle data submission logic. The example linked is the Flux Aggregator contract, which aggregates data from the oracle operators on-chain. There are newer oracle architectures which aggregate all oracle answers off-chain, submitting a single transaction on-chain and are therefore more gas efficient. The point is that this is the implementation contract, and different architectures are available, but they usually follow the same interface for interoperability.

  3. Oracle operators, which are either individuals or organisations, run software that checks the value of an asset, off-chain, using their own data sources, and submit to the Aggregator contract, either on a schedule or when requested by the oracle system.

Last updated