A NestJS-based analytics service for monitoring Aerodrome pools on the Base network. This application provides real-time data tracking, statistics, and analytics for DeFi pools.
- Real-time Pool Monitoring: Tracks Aerodrome pools on Base network
- Event Tracking: Monitors blockchain events and transactions
- Position Analytics: Analyzes user positions and liquidity
- Statistics API: Provides comprehensive pool statistics
- Swagger Documentation: Interactive API documentation
- Prometheus Metrics: Built-in monitoring and metrics
- PostgreSQL Database: Robust data storage with TypeORM
- Node.js 18+
- npm or yarn
- Docker and Docker Compose
- PostgreSQL (or use the provided Docker setup)
git clone <repository-url>
cd aerodrome-analyticsnpm installCopy the example environment file and configure your settings:
cp .env.example .envEdit .env file with your configuration:
BASE_NODE_URL=https://endpoints.omniatech.io/v1/base/mainnet/public
THEGRAPH_URL=https://gateway.thegraph.com/api/subgraphs/id/GENunSHWLBXm59mBSgPzQ8metBEp9YDfdqwFr91Av1UM
THEGRAPH_TOKEN=your_thegraph_token_here
STATISTIC_SYNC_INTERVAL=600000
START_SYNC_BLOCK=28200766
# PostgreSQL Configuration
DB_HOST=localhost
DB_PORT=5432
DB_USERNAME=postgres
DB_PASSWORD=password
DB_NAME=apiUsing Docker Compose (recommended):
npm run start:dbOr manually start PostgreSQL and create a database named api.
npm run start:devnpm run build
npm run start:prodnpm run start:debugnpm run build- Build the applicationnpm run start- Start the applicationnpm run start:dev- Start in development mode with hot reloadnpm run start:debug- Start in debug modenpm run start:prod- Start in production modenpm run start:db- Start PostgreSQL database with Dockernpm run stop:db- Stop PostgreSQL databasenpm run test- Run testsnpm run test:watch- Run tests in watch modenpm run test:cov- Run tests with coveragenpm run lint- Run ESLintnpm run format- Format code with Prettier
Once the application is running, you can access the Swagger API documentation at: