flashbots / mev-inspect-rs

Discover historic Miner Extractable Value (MEV) opportunities

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

More accurate ETH price data

obadiaa opened this issue · comments

We are currently using eth_price table from @epheph which is daily Ethereum price. It'd be great if we could use Ethereum block price data rather than daily data for extra precision.

I believe we can use Uniswap V2 oracle to get ETH price data but that's only from May 18 2020 onwards, we'd ideally like ETH price data per block from Jan 1 2020 onwards.

Alright so it seems on-chain data is not the move given price spikes, so exchange data is our best bet for historical data.

We could use Kaiko or alternatively an exchange's API somewhere (Binance/Coinbase since they do the most volume?).

The plan to me is to convert Ethereum price data per second into Ethereum price per block using either a simplification of number of seconds per block or joining nearest second to block timestamp. Then once we have ethereum price data per block, we can add that to a table that queries Uniswap oracle for Ethereum block data so that we have a new entry for eth_price every block.

Done! Thanks to @epheph, now using Ethereum minute price data + Uniswap v3 oracle Ethereum price per block data