Skip to Content

Oracles

Polaris is designed to rely on its own onchain mechanisms wherever possible, minimizing its dependence on external inputs. For example, the price of pETH is determined entirely by the bonding curve and never depends on external price feeds.

However, pAssets require external reference prices. Polaris limits the oracle layer to those markets through a reusable design for every pAsset market, keeping oracle dependency to a minimum without compromising resilience to oracle failures.

To achieve this, Polaris routes every external price through a custom oracle aggregator called the Medianizer.

The Medianizer is used wherever external reference prices are needed. For instance, USDp uses it for ETH/USD, while GOLDp uses it for both ETH/USD and XAU/USD. Future pAssets follow the same approach by using the reference feeds required for their own underlying asset.

This keeps Polaris pricing internal to the bonding curve and limits external oracles to markets that require real-world reference prices. USDp also does not require an external market-price oracle to maintain its peg, as its adaptive peg defence relies on minting, redemptions and interest rate adjustments instead of an external price feed.

The Medianizer

Each Medianizer is responsible for a single external price, such as ETH/USD or XAU/USD. A pAsset market may use one or more Medianizers to calculate the collateral value required for that asset.

A Medianizer supports up to three independent oracle feeds. Only one feed is required, but additional feeds improve resilience whenever multiple high-quality data sources are available.

When more than one feed is configured, the Medianizer selects the price according to the feeds currently available:

  • If three valid feeds are available, it returns the median price.
  • If one or two valid feeds are available, it returns the first valid feed in the configured order.
  • If no valid feeds are available, it falls back to the last valid price datapoint.

A feed is considered valid only if the external call succeeds, the returned value is positive and the price is not stale.

As a result, Polaris can continue operating flexibly even if individual oracle feeds become unavailable. When multiple feeds are available, the protocol aggregates them. If some feeds fail, it continues operating with the remaining valid feeds, and if every configured feed becomes unavailable, it falls back to the last valid price.

Updating Oracle Feeds

Although the protocol itself is immutable, oracle providers may evolve over time or become unavailable.

Oracle sources can therefore be replaced through stewardship. Failed feeds can be replaced immediately, whereas replacing an active feed or populating an empty slot requires a timelock.

Table columns: Action, Approval
ActionApproval
Replace failed feedImmediate
Replacelive feedTimelock
Fill empty slotTimelock

Polaris can therefore recover from oracle failures without giving stewards immediate discretionary control over active price sources.

Note: The set of oracle feeds used at launch will be finalized closer to the mainnet launch.