Skip to content

Conversation

kevincheng96
Copy link
Contributor

This PR creates a custom price feed for WBTC / USD by reading from both the WBTC / BTC and BTC / USD price feeds. This will allow the cUSDCv3 market to get a more accurate price for WBTC.

We also organize the contracts repo by moving all the custom price feed contracts into a separate pricefeeds subdirectory.

Copy link
Contributor

@jflatow jflatow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a fan of additional surface area for contracts, but makes sense. Big fan of the price feeds directory 🧼

@kevincheng96 kevincheng96 added the ready for audit This pull request is ready / waiting to be audited label Apr 24, 2023
@kevincheng96 kevincheng96 force-pushed the kevin/wbtc-pf branch 2 times, most recently from 7d63533 to 29c36d7 Compare May 25, 2023 19:16
@kevincheng96 kevincheng96 force-pushed the kevin/wbtc-pf branch 2 times, most recently from 4dc6ca3 to 554d573 Compare May 25, 2023 20:21
@kevincheng96 kevincheng96 added openzeppelin PRs and issues related to OZ audit audited These changes have been audited and removed ready for audit This pull request is ready / waiting to be audited labels May 26, 2023
@kevincheng96
Copy link
Contributor Author

Final audit report from OZ

@kevincheng96 kevincheng96 merged commit 16e31d0 into main May 30, 2023
@kevincheng96 kevincheng96 deleted the kevin/wbtc-pf branch May 30, 2023 22:29
kevincheng96 added a commit that referenced this pull request Aug 3, 2023
This generalizes the logic used in the recently audited [`WBTCPriceFeed`](#737) to create a `MultiplicativePriceFeed` that derives its price from multiplying the prices from two other price feeds together. 

This is a flexible wrapper price feed that can be used to generate prices for any asset that does not have a price feed that fits Comet's expected price denomination. e.g. if we wanted to add `cbETH` to `cUSDCv3`, there is no Chainlink price feed for `cbETH / USD`, so we would need to multiply the `cbETH / ETH` and `ETH / USD` price feeds together to get `cbETH / USD`
Copy link

@se6799 se6799 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yelp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
audited These changes have been audited openzeppelin PRs and issues related to OZ audit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants