https://github.com/cakevm/rethdb-dexsync
Read dex state (e.g. Uniswap) from reth db
https://github.com/cakevm/rethdb-dexsync
Last synced: 3 months ago
JSON representation
Read dex state (e.g. Uniswap) from reth db
- Host: GitHub
- URL: https://github.com/cakevm/rethdb-dexsync
- Owner: cakevm
- License: apache-2.0
- Created: 2024-09-24T07:56:43.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-20T17:49:16.000Z (about 1 year ago)
- Last Synced: 2025-01-08T09:02:57.953Z (11 months ago)
- Language: Rust
- Homepage:
- Size: 1000 KB
- Stars: 13
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
- awesome-reth - rethdb-dexsync
README
# RethDB DexSync
This crate provides a way to read Uniswap v2/v3 pool states direct from the Reth database. This will speed up the initial sync process and reduce the load on the Ethereum node.
## Features
- Reading Uniswap v2 pairs/reserves
- Reading Uniswap v3 pools positions and slot0
## Usage
The `RETH_DB_PATH` without /db/ directory. For example, if the path is `/home/user/reth/db/`, then the `RETH_DB_PATH` should be `/home/user/reth`.
```
RETH_DB_PATH=
cargo run --release --example univ2_pairs
cargo run --release --example univ3_pools
```
## Acknowledgements
Many thanks to the team of [reth](https://github.com/paradigmxyz/reth).
## License
This project is dual-licensed under the [MIT](./LICENSE-MIT) and [Apache-2.0](./LICENSE-APACHE) licenses.