Oracle Contract to Uniswap v3
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.
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 )
Duplicate of https://github.com/unlock-protocol/unlock/issues/7746
related PRs #10262 #10235 #9548