Awesome
eth-onchain-price
Objective
Access to historical price of ETH completely on-chain stored in a SQLite DB that can be queried for convenience.
Installation
git clone https://github.com/brianleect/eth-onchain-price
npm install package.json
- Update
sample.config.js
with relevant fieldsprovider
,DB_PATH
.. - Rename
sample.config.js
toconfig.js
node index.js
Elaboration on quirks
- Start block for default initialization is
10100000
(Uniswap V2 pool for ETHUSD was launched around then) - Ideally running on a local node we can set rate limit to 500-600 which should be significantly faster.
- Alternatively, download recently synced DB and continue from there. Alchemy limit of 10/s should be more than sufficient to keep up.