Price Oracles

A price oracle is any tool used to view price information about a given asset.

The PriceFeed contract accepts submissions from the price feed keeper. This keeper calculates prices using the median price of Binance,, Kucoin, OKX, Bybit, Coinbase and a few other CEXs. There are two types of keepers:

  • Price feed keeper: submits prices routinely for swaps

  • Position keeper: submits prices when executing a position

These two keepers ensure users a real-time price when they create a position or execute a swap.

To enhance the protocol's protection against incorrect pricing, a third-party oracle (Chainlink/Pyth/API3/…) serves as a Secondary PriceFeed.

The protocol uses the price from the PriceFeed if it is within a configured percentage of the corresponding Secondary PriceFeed. If the price exceeds this threshold then a spread would be created between the keeper price and the secondary price, this threshold is based on the historical max deviation of the third-party oracle price from the median price of reference exchanges.

Prices from the keeper also have an expiry of five minutes, if the last price has been submitted more than five minutes ago, the secondary price will be used instead.

Aside from the keeper nodes, watcher nodes are also ran to verify that the prices submitted by the keepers have not been tampered with. Watcher nodes continually compute the median price and compare this with the prices submitted by keepers, if the prices submitted by a keeper does not match the computed median price, then the watcher sends a transaction to enforce a spread between the keeper price and the secondary price.

PriceFeed contracts on different networks:

  • Mantle - 0x391536D06480e554cFA60F9E2Be0f3BbE5A377CA

  • Arbitrum - 0x2e5dC67A12cdcF80124e0D2ba01b7A9F04De04C6

  • BNB Chain - 0xDe131C73602Df41Decb30E8b1ad16205af048579

Last updated