[WOOF!] Correlated-Assets Price Oracle (CAPO)

Correlated-Assets Price Oracle (CAPO)

co-authors: @bryancolligan @Gauntlet @AlphaGrowth

Problem

Compound aims to remain a leading choice among crypto lending and borrowing protocols. A significant portion of TVL revolves around LST/LRT tokens. These assets have the potential to significantly enhance protocol liquidity and generate higher fees. However, Compound cannot compete effectively in the high-leverage space due to inherent risks and limitations.

A major concern lies in pricing these correlated assets accurately. Currently, Compound uses an exchange rate price feed for some collateral assets like weETH, fetching prices directly from the token contracts. This method poses risks as the exchange rate can be manipulated, either intentionally or unintentionally, leading to inaccurate valuations. In a worst-case scenario, an inflated exchange rate could enable borrowing against unprofitable liquidation positions, jeopardizing protocol security. This issue was highlighted in a Gauntlet forum discussion.

Solution

To address these risks, we propose implementing a Correlated-Assets Price Oracle (CAPO) for LST and LRT assets. CAPO introduces flexibility to set and enforce limits on the maximum permissible growth of these assets’ yields. By leveraging CAPO, Compound can ensure secure and accurate pricing for correlated assets.

How CAPO Works

Existing Price Feed Flow:

  • Compound Market → Price Feed Wrapper → Underlying Price Feeds (Exchange Rate/Market Rate).

New Price Feed Flow with CAPO:

  • Compound Market → Price Feed Wrapper → CAPO → Underlying Price Feeds (Exchange Rate/Market Rate).

CAPO enhances the price feed flow by introducing safeguards that cap the maximum exchange rate growth, based on predefined parameters:

  1. Snapshot Timestamp: The reference time for the initial exchange rate.
  2. Snapshot Ratio: The initial value of the asset’s exchange rate.
  3. Max Yearly Ratio Growth Percent: The maximum allowable yearly growth rate for the exchange rate.

CAPO Logic

  1. Fetch Asset Price: Retrieve the current exchange rate for the asset.
  2. Compare with Maximum Rate: Check if the exchange rate exceeds the preconfigured maximum rate, calculated dynamically based on the snapshot ratio and allowable growth.
  3. Return Adjusted Price:
    • If the exchange rate exceeds the cap, return the maximum preconfigured rate.
    • Otherwise, return the current exchange rate.

Example Flow

Day 1

  • Snapshot Timestamp: Day 1
  • weETH Ratio: 1.1
  • Max Yearly Ratio Growth Percent: 12%

Day 30

Calculate the maximum permissible rate:

  • Max Monthly Growth: 1% (12% / 12 months)
  • Maximum Preconfigured Rate: 1.1 + (1.1 * 1%) = 1.111

Compare with Current Exchange Rate:

  • If the exchange rate is greater than 1.111, return 1.111.
  • Otherwise, return the current exchange rate.

Parameter Updates

CAPO contracts will be governed by the Compound DAO. Updates to parameters such as the snapshot timestamp, ratio, or growth percent will require an on-chain governance proposal.

Scope

To implement CAPO, we propose the following deliverables:

  1. CAPO Contracts:
    • Develop CAPO implementations for various ETH and stable markets.
    • Supported assets include ezETH, wstETH, weETH, rsETH, osETH, rETH, rswETH, ETHx, sFRAX, wUSDM, and mETH.
    • Start with the Mainnet, but also cover all other networks LSTs/LRTs
  2. Price Feed Wrappers:
    • Integrate CAPO with price feed wrappers to replace existing feeds.
  3. On-Chain Proposal:
    • Submit a governance proposal to update the price feeds in the protocol.

Benefits of CAPO

  1. Mitigates Risks: Protects against misconfigured or manipulated exchange rates.
  2. Improves Flexibility: Enables governance to set dynamic and precise growth limits.
  3. Enhances Security: Ensures liquidations remain profitable, maintaining protocol integrity.
  4. Supports Growth: Safely integrates correlated assets to increase TVL and protocol fees.

By adopting CAPO, Compound can address current limitations while securely expanding support for LST and LRT assets, strengthening its position as a leading DeFi protocol.

5 Likes

@dmitriywoofsoftware Thank you for putting this together. This should help Compound be more competitive with Higher Collateral Factors with less risk after implementation.

4 Likes

Thanks a lot for sharing the solution @dmitriywoofsoftware ! Eager to collaborate and help in implementing higher collateral factors as a competitive edge for Compound.

2 Likes