Fringe Price Oracle Model

Protecting against oracle price attacks

Innovating DeFi Lending with Advanced Price Oracle Models

There is a problem in DeFi, and particularly with lending and trading platforms, whereby there is risk of price manipulation attacks (sometimes known as market manipulation attacks, price oracle attacks). We have a solution to mitigate that risk.

In an ecosystem where asset pricing is pivotal, the accuracy and security of price feeds are paramount.

Why are price manipulation attacks a problem?

Chainalysis estimates that DeFi protocols lost $399.1 million in 2021 and $403.2 million in 2022 to oracle manipulation attacks.

A critical aspect of decentralized finance is related to price oracles, and specifically how market manipulation poses risks to DeFi lending platforms. Market manipulation, a tactic where actors seek “highly profitable trading strategies” by artificially influencing asset prices, can have devastating effects.

Fringe Finance's Response to Price Manipulation

In response to these challenges, Fringe Finance has innovated with its enhanced price oracle model to mitigate these manipulation tactics.

  • To note: Fringe's New Price Oracle Model is distinct to an actual oracle, in that it wraps around raw oracle price providers (such as Chainlink, PYTH and UniV3) to achieve protections against oracle price manipulation.

Key Features of the Enhanced Oracle Model

Resilience Against Manipulation: The cornerstone of Fringe's model is its robust defense against price manipulation. By applying advanced algorithms, we ensure that the prices reflect genuine market trends.

Improved Liquidation Processes: For borrowers, our model offers a smoother, more equitable liquidation curve, ensuring fairer prices during liquidations.

Enhanced Lender Security: Lenders benefit from a platform fortified against manipulation, ensuring reliability and greater safety of their assets.

Technical Insight: Price Update Mechanisms

Fringe’s price oracle model uses a blend of interaction-activated and bot-activated updates. Interaction-activated updates occur during user interactions, like deposits or loan repayments. Bot-activated updates are triggered when a price becomes outdated or a suspected attack is occurring, ensuring continuous accuracy and relevance.

Fringe’s new price oracle model applies a series of treatments to prices to help achieve this new resilience.

Understanding Price Sources

Diverse Price Sources: Fringe Finance integrates prices from multiple sources: Chainlink, Uniswap V3, and Pyth. Each asset on Fringe is linked to one of these sources, allowing Fringe to use the most relevant and reliable price source.

A model of safety

The raw price obtained from the underlying price source is then wrapped with Fringe’s New Price Oracle Model. The New Price Oracle Model applies various price treatments which provide resilience against market price manipulation attacks. The price treatments can be summarized as follows:

These are more fully described and illustrated below.

Volatility cap rules - Governed Price

  • limit the impact of price manipulation attacks:

Long TWAP

  • makes market price manipulation attacks less interesting for attackers:

  • The above depicts the approach for collateral asset prices - which takes the minimum of Governed Price and Long TWAP Price.

    • to protect against upwards price manipulations.

  • For capital asset prices, we take the maximum of Governed Price and Long TWAP Price.

    • to protect against downwards price manipulations.

Note the Long TWAP employs Governed Prices, thus further building on the protections of Governed Prices.

Long TWAP threshold parameters

  • to limit the effect of price manipulation attacks:

The Long TWAP Threshold Parameters are designed to work hand-in-hand with the price cap treatment and Long TWAP to make price manipulation attacks less interesting for attackers.

These price processing techniques and parameterization combine to provide strong resilience against market price manipulation attacks.

Processing Steps

The following presents how each of the above techniques and thresholds are methodically applied to achieve the outcomes of more resilience against market manipulation price attacks.

The whole is greater than the sum of the parts.

Full, Partial and non-TWAP price processing paths

Fringe's oracle model processes prices through one of three paths: Full, Partial, and Non-TWAP, each tailored to specific asset characteristics and platform activity levels.

Price-logging bot

Fringe has established automated price-logging bots to ensure Long TWAP accumulators are logged sufficiently frequently to enable Long TWAP calculations to support the Full and Partial price processing paths.

Also, the price-logging bot detects when a suspected oracle price attack has ended (via threshold price movements) and then promptly logs a new Long TWAP accumulator entry. The purpose of this is to minimize the weighting of any accumulator that was logged during the suspected price attack and therefore minimize the effects of the attack on pricing used by Fringe.

Rationale and Benefits

The table below presents the rationale for the various aspects of Fringe's new price oracle model and the benefits they deliver.

Caption - Table of rationales and benefits

Expanding Asset Inclusion

The new oracle model is not just about protection – it's about including support for even long-tail assets. By allowing diverse price sources and minimizing attack risks, we're integrating a wider range of assets, previously unavailable in the DeFi lending market. We believe this will be attractive for retail long-tail asset holders, DAOs who hold part of their treasury in their project token and speculators wishing to either go long or short for a wide range of assets.

Future Developments: Incentivized Bots and Decentralization

Looking ahead, Fringe plans to further decentralize the platform. One initiative is incentivizing third-party bots for price updates, enhancing the platform's resistance to censorship and centralized failures.

Conclusion: A Leap Forward in DeFi Lending

In summary, Fringe Finance's new price oracle model marks a significant advancement in asset pricing within DeFi. By offering improved protection against market manipulations and supporting a broader range of assets, we are not just enhancing our platform but also contributing to the evolution of the DeFi sector as a whole. In the endeavor to increase DeFi’s anti-fragility, Fringe is innovating to set a new standard for resilience against market manipulation attacks.

Last updated