eth-onchain-price
July 5, 2022 ยท View on GitHub
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-pricenpm install package.json- Update
sample.config.jswith relevant fieldsprovider,DB_PATH.. - Rename
sample.config.jstoconfig.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.