Skip to Content

Oracles

Polaris is designed to rely on its own onchain mechanisms wherever possible, minimizing its dependence on external inputs. The price of pETH, for example, 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, with a design that can be reused across every future pAsset while minimizing oracle dependency and remaining resilient to oracle failures.

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

The Medianiser 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 allows Polaris to keep pETH pricing internal to the bonding curve while using external oracles only where real-world reference pricing is unavoidable. It also means USDp does not require an external market-price oracle to maintain its peg, as its adaptive peg defence uses minting, redemptions and interest rate adjustments without the need to rely on an external pAsset price feed.

The Medianiser

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

A Medianiser 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 Medianiser 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. A failed feed can be replaced immediately, while replacing a live feed or adding a new feed to an empty slot requires a timelock.

This allows Polaris to recover from oracle failures without giving stewards immediate discretionary control over active price sources.

Last updated on