A comprehensive dashboard for tracking and analyzing Bitcoin (BTC) yield farming opportunities across various liquidity pools. The application provides real-time data visualization, performance metrics, and detailed analytics for BTC liquidity pools.
- Top TVL Pools: View the top 5 BTC pools by Total Value Locked (TVL)
- Top Yield Pools: Discover the highest yielding BTC pools sorted by APY
- Performance Charts: Interactive charts showing TVL and APY trends over time
- Pool Details: Comprehensive information about each pool including TVL, APY, growth rates, and risk metrics
- Dynamic Filtering: Automatic filtering based on current BTC price and TVL thresholds
- Responsive Design: Works seamlessly on desktop and mobile devices
- React: UI framework (v19.0.0)
- TypeScript: Type-safe JavaScript
- Chakra UI: Component library for consistent design
- Highcharts: Interactive charting library
- React Icons: Icon library
- React Query: Data fetching and caching
- BTC Price API: Real-time Bitcoin price data
- Pool Data API: Liquidity pool information
- Custom Hooks: Data processing and filtering logic
- Vitest: Testing framework
- React Testing Library: Component testing utilities
- Jest DOM: DOM testing utilities
- Filter pools to include only those with "BTC" in their symbol
- Calculate minimum TVL threshold: 50 BTC * current BTC price
- Filter pools with TVL ≥ minimum threshold
- Sort pools by TVL (for TVL view) or APY (for yield view)
- Select top 5 pools
- TVL: Total Value Locked in USD
- APY: Annual Percentage Yield
- Growth Rate: 7-day percentage change in TVL
- Risk Assessment: Based on impermanent loss risk and exposure metrics
- Node.js (v16 or higher)
- npm or yarn
-
Clone the repository:
git clone https://github.com/yourusername/btc-yield-dashboard.git cd btc-yield-dashboard
-
Install dependencies:
npm install
or
yarn install
-
Start the development server:
npm start
or
yarn start
-
Open your browser and navigate to
http://localhost:3000
To run the tests:
npm test
or
yarn test
For watch mode during development:
npm run test:watch
or
yarn test:watch
src/
├── components/ # React components
├── hooks/ # Custom React hooks
├── services/ # API services
├── types/ # TypeScript type definitions
├── utils/ # Utility functions
├── constants/ # Application constants
└── test/ # Test setup and utilities
- TopPools: Displays top 5 BTC pools by TVL
- TopYieldPools: Shows top 5 BTC pools by APY
- PoolChart: Interactive charts for TVL and APY trends
- PoolCard: Individual pool information display
The application fetches data from:
- Bitcoin price API for current BTC value
- Liquidity pool API for pool metrics and historical data
The application includes comprehensive tests for:
-
Data Processing Logic:
- Pool filtering by BTC symbol
- TVL threshold calculations
- Sorting by TVL and APY
- Top pool selection
-
Metrics Calculation:
- Total TVL calculation
- Average APY calculation
- Growth rate calculation
-
Formatter Functions:
- TVL formatting
- Y-axis value formatting
-
Custom Hooks:
- useTopPools
- useTopYieldPools
- useCharts
- useBtcPrice
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Data provided by [Your Data Source]
- Icons from React Icons
- Charts powered by Highcharts