unlock icon indicating copy to clipboard operation
unlock copied to clipboard

Oracle Contract to Uniswap v3

Open julien51 opened this issue 3 years ago • 2 comments

We use an Oracle contract in all Unlock deployments to keep track of the value of tokens and account for that in our Gross Network Product. The Oracle contract currently uses Uniswap v2 and implements features that we would not need if we were using an oracle contract that plugs into v3.

Let's create a new Oracle contract that has the same function signatures so it can be replaced in place inside our Unlock contracts, but this time it should interact with Uniswap v3 deployments.

julien51 avatar Sep 02 '22 14:09 julien51

After some research and tinkering, the uniswap v3 oracle feature seems quite straightforward and it should be possible to write a simple wrapper around it that follows our existing API.

However, the oracle feature won't work on Optimism due to spec limitations related to block time stamp (read here https://docs.uniswap.org/protocol/concepts/V3-overview/oracle#optimism )

clemsos avatar Sep 06 '22 10:09 clemsos

Duplicate of https://github.com/unlock-protocol/unlock/issues/7746

julien51 avatar Sep 12 '22 17:09 julien51

related PRs #10262 #10235 #9548

clemsos avatar Nov 15 '22 12:11 clemsos