Governance Proposal 019: Open Price Feed

This is the discussion thread for Governance Proposal 019: Open Price Feed.

Previous discussion thread on migrating to the Open Price Feed.

Proposal Description

This proposal changes the price oracle in Compound to use the Open Price Feed deployed at 0x9b8eb8b3d6e2e0db36f41455185fef7049a35cae. The Open Price Feed is an open-source project where a set of reporters sign price data which is posted on-chain for use by DeFi protocols. There is no privilege required to post prices, and we encourage the community to build additional posters to keep prices up-to-date. The Compound Protocol will initially use price data from Coinbase (via the Coinbase Oracle) as well as a time-weighted average price from Uniswap’s on-chain markets to ensure price integrity.

The Open Price Feed has been audited by Open Zeppelin 1 2. The system initially supports prices for BAT, WBTC, COMP, DAI, ETH, KNC, LINK, REP, SAI, USDC, USDT and ZRX. The system is compatible with support for more tokens and different reporters, both of which would require a new Governance proposal.

The Open Price Feed system was announced almost a year ago. We envisioned the system as an easy way for different projects and exchanges to sign data without the burden of posting that data onto the Ethereum blockchain itself. Instead, the exchanges expose an HTTP endpoint with an Ethereum-signed message containing the price data. The goal is that every exchange can provide such data, which can be used by every DeFi project.

In the current incarnation of the Open Price Feed, it takes the prices from Coinbase’s Oracle (which was designed in coordination with the Open Price Feed) and it tests that price against a time-weighted average price (TWAP) from Uniswap v2. If the price for a given asset from Coinbase is within 20% of the Uniswap TWAP for that asset, it is posted and immediately is available for use in the Protocol (e.g. for collateral calculations). The TWAP calculation is based on the Uniswap Oracle concept.

The Open Price Feed has been running in production for several weeks and has been tested on the Ropsten and Kovan test-nets.

References

4 Likes

What happens if the Coinbase price diverges from the TWAP Uniswap price by more than 20%? Can the protocol still get a price to use for collateral calculations? Will it default to the lower price?

1 Like

The price won’t be updated until the two match, so it’ll remain stale (whatever it was last accepted at) until the two converge again.

So during the most recent DAI issues, did the Uniswap price move into line with the elevated coinbase price so that the feed would use a recent, elevated price vs a stale, (but in-line) price?

No, it didn’t. My understanding is that during the event, Coinbase reported DAI prices of up to ~$1.30 while the Uniswap TWAP stayed ~$1.00. Since the delta between the Uniswap TWAP and Coinbase is limited at 20%, anything above $1.20 was rejected (there was a brief period where $1.21 was reported as Uniswap TWAP increased).

1 Like