comet
comet copied to clipboard
Price feeds for WETH deployment
This PR implements and modifies price feeds to support the upcoming WETH deployment. The favored plan so far is to use ETH-denominated price feeds as opposed to USD price feeds, but stick with using 8 decimals for prices to avoid having to change the Comet
and Configurator
implementations.
This would require:
- A new wrapper price feed (
ScalingPriceFeed.sol
) that scales prices up or down to 8 decimals - A new
ConstantPriceFeed
that always returns 1e8 for theWETH
base asset, since should always hold a 1:1 value with ETH - Modifications to the
WstETHPriceFeed
to return prices in terms of ETH instead of USD
This is an alternative approach to #626, which is a more complex change but could be a better long-term solution.
The description of this PR is out of date now, right? This is now a PR to do truncated USD prices, not ETH
The description of this PR is out of date now, right? This is now a PR to do truncated USD prices, not ETH
The description should still be accurate since this PR is for ETH-denominated prices, not USD. The ScalingPriceFeed
can be used for any price denomination, but the changes to WstETHPriceFeed
specifically make it denominated in ETH rather than USD.
Updated this PR with a new IPriceFeed
interface to be used by the wrapper price feeds and Comet
. Discussion can be found here: https://github.com/compound-finance/comet/pull/625#discussion_r1029839340
Updated this PR with a new
IPriceFeed
interface to be used by the wrapper price feeds andComet
. Discussion can be found here: #625 (comment)
💪 Thanks for making this change!