Update the INV Price Feed - 2

Update INV Price Feed to Dynamic-Fee INV/WETH Curve Oracle

Summary

This proposal updates the INV/USD price feed used by FiRM and Frontier to:

  1. Migrate from the current INV/WETH Curve pool to the new higher-fee INV/WETH Curve pool; and
  2. Replace the existing ChainlinkCurve2CoinsFeed with a new DynamicFeeCurveFeed that explicitly accounts for the Curve pool’s trading fee.

The goal is for FiRM and Frontier to use a price that reflects INV’s net-of-fee executable value in our main liquidity pool.

Background

  • INV is currently priced via a Chainlink + Curve oracle:
    • Chainlink WETH/USD price, combined with
    • Curve INV/WETH twocrypto-ng EMA (price_oracle()).
  • The DAO is migrating INV liquidity and routing to a new INV/WETH Curve pool configured with a higher trading fee.
  • With the higher fee, the mid-price from the pool (EMA) overstates the value a liquidator can actually realize after paying fees.

To keep the oracle aligned with where INV trades and make pricing slightly more conservative, we introduce a dynamic-fee-aware variant.

DynamicFeeCurveFeed Overview

The new oracle contract, DynamicFeeCurveFeed, keeps the same basic structure:

  • Uses IChainlinkBasePriceFeed for WETH → USD (18 decimals).
  • Uses the new INV/WETH Curve pool for:
    • price_oracle() (EMA of the INV/WETH rate), and
    • fee() (dynamic pool fee, 1e10 precision).
  • Returns INV/USD with 18 decimals and description INV / USD.

Price calculation (simplified):

  • Get pairedTokenToUsdPrice (WETH/USD) from Chainlink.
  • Get crvOraclePrice from curvePool.price_oracle(), which is WETH/INV
  • Compute INV/USD
  • Fetch fee = curvePool.fee(), clamp it to maxFee (initially 2%, equal to the pools maximum fee).
  • Apply the discount: usdPrice = usdPrice * (1 - fee).

This makes the oracle reflect a post-fee price, bounded by a governance-controlled maxFee (0–100%).

The contract also includes a simple gov / pendingGov pattern and a setMaxFee(int _maxFee) function restricted to gov.

Rationale

  • We are already relying on the INV/WETH Curve pool as the main liquidity venue for INV.
  • With the new pool’s higher fee, using a pure mid-price (price_oracle()) overestimates the value available to liquidators and arbitrageurs.
  • Applying the Curve fee in the oracle:
    • Keeps assumptions closer to real execution, and
    • Introduces a small, bounded conservative bias that improves risk management for FiRM and Frontier.

On-Chain Actions

  • Update FiRM INV Feed
  • Update Frontier INV Feed
  • Update sINV price feed