Executed

Compound Oracle Upgrade v3


ID 117

ID 117

Compound

Compound

Proposed on: Aug 23rd, 2022

Proposed on: Aug 23rd, 2022

Result details
Final Votes

Quorum

696.67K of 0

Majority support

Yes

For

696.67K

Against

0

Abstain

0

Actions

Type

Address

Details

Custom

0x3d98...Cd3B

_setPriceOracle(..)

Custom

Account

0x3d98...Cd3B

Method

_setPriceOracle(..)

Proposal

Compound UAV v3 Upgrade

GFX Labs is proposing on behalf of Chainlink to upgrade the protocol's oracle contract (currently v2) to v3, which switches the anchor market from Uniswap v2 to v3.

Forum Post

  • The new UniswapAnchoredView (UAV) no longer records and keeps observations but instead queries the respective Uniswap V3 pool’s observe function to get a TWATP with the set anchor period when it’s needed (i.e., when a reporter calls validate on the UAV).

  • The price of an asset in Uniswap V3 is a function of the “tick” of the pool. The formula is price = 1.0001^tick. The math required for conversion between posted prices and the Uniswap V3 TWATP and the UAV representation has been modified to support this. Relevant libraries (TickMath and FullMath) have been included from the Uniswap V3 codebase.

  • The tests from the original UAV have been adapted to the new Uniswap V3 architecture - i.e., observations/TWATP tests were removed. Hardhat (+typechain) has been implemented so real Uniswap V3 pools can be used via forked mainnet in tests and eliminate the need for mocking Uniswap V3 pools.

  • Chainlink has increased the Uniswap observation cardinality to 150 on pools that were below 150.

Dedaub & ABDK audits: link

Open Zeppelin report: link

Oracle Contract

Final Votes

Quorum

696.67K of 0

Majority support

Yes

For

696.67K

Against

0

Abstain

0

Final Votes
Status

Tue Aug 23, 12:40 am

Published onchain

Tue Sep 6, 09:38 pm

Voting period started

Fri Sep 9, 03:20 pm

Voting period ended

Sun Aug 28, 06:54 am

Proposal queued

Tue Aug 30, 06:20 pm

Proposal executed