This small PoC for nethermind.io has the intent to capture events from crypto ecosystem, more specifically observing Uniswap V3 Protocol historical data.
In order to run the project locally, the following needs to be installed in your local host for your specific platform:
- Node.Js (ideally through NVM)
- Yarn
- Postgres Client (psql)
- Docker / Docker Compose
This is a summary on how the process works:
- Data is fetched from the Uniswap V3 (via The Graph) graphql endpoint, which allows to get certain data nodes and combinations.
- This data is then loaded in a PostgreSQL schema with some predefined tables to accommodate the data and views to perform certain transformations.
- Once this data is in the database, we can view data plotted in Grafana Open Source tool on dashboard visualization.
In order tp run this small PoC, please follow these steps (Linux/Mac):
git clone <https://github.com/fbrcode/work-assignment-nethermind.git>
cd work-assignment-nethermind/database
(for detailed information go to database readme)source .env
cp .env.example .env
docker compose up -d
psql -f init.sql
cd ..
yarn
cp .env.example .env
yarn test
yarn dev
cd grafana
(for detailed information go to grafana readme)chmod -R 777 grafana
docker compose up -d
Then, import the dashboard data from file ./grafana/uniswap-v3-dashboard-grafana.json
These are some action points that would enhance the project:
- Other databases (i.e. TimescaleDB)
- Other graph options (i.e. Chart.js)
- Time period selection and automated fetching
- API and Interface interactions
- Dynamic and automated graph generation of pool data
- Insights/Trends analysis and/or generation