A comprehensive web application suite for DeFi liquidity providers, featuring advanced calculators and position tracking tools. Built with Vue 3, TypeScript, and Tailwind CSS for a modern, responsive experience.
Experience live at: https://lp-calculator.pages.dev
Calculate precise token amounts for concentrated liquidity positions with custom price ranges.
Simple 50/50 token ratio calculations for traditional liquidity pools.
Calculate Annual Percentage Rate (APR) for your liquidity pool investments using simple interest.
Comprehensive LP position management with real-time APR tracking and historical analytics.
- Real-Time Calculation: Instantly see required Token0 and Token1 amounts
- Dynamic Price Range: Set custom lower and upper price bounds
- Price Difference Display: Visual percentage differences from current price
- Advanced Math: Handles complex concentrated liquidity formulas
- Input Validation: Clear error messages for invalid ranges
- Simple 50/50 Split: Traditional liquidity pool calculations
- USD-Based Input: Enter total USD amount to split evenly
- Token Price Integration: Automatic conversion to token amounts
- Instant Results: Real-time calculation updates
- Simple Interest Formula:
(Total Fees / Initial Investment) × (365 / Days) × 100 - Date Range Selection: Pick start and end dates for accurate calculations
- Multiple Metrics: APR, daily rate, monthly rate, and total return percentage
- Time Period Display: Shows investment duration in days and years
- Position Management: Create, track, and close LP positions
- Real-Time APR: Automatic APR calculation based on fee collections
- Fee History: Track all fee collections with timestamps
- Status Management: Active vs. closed positions with frozen calculations
- Advanced Analytics: Total fees, return percentage, days active, average daily fees
- Data Persistence: All data saved locally with localStorage
-
Clone the repository:
git clone https://github.com/Drarox/LP-Calculator.git cd LP-Calculator -
Install dependencies:
npm install
-
Run the development server:
npm run dev
-
Open your browser and navigate to
http://localhost:5173
npm run build- Enter your total USD investment amount
- Set current market price between Token1 and Token0
- Define your price range (lower and upper bounds)
- Input current USD prices for both tokens
- View calculated token amounts instantly
- Enter total USD amount to deposit
- Input current USD prices for both tokens
- Get 50/50 split amounts automatically
- Enter your initial investment amount
- Input total fees collected
- Select start and end dates
- View comprehensive APR analytics
- Create Position: Add name, investment amount, opening date, and optional external link
- Track Fees: Add fee collections as they occur with timestamps
- Monitor Performance: Watch real-time APR calculations
- Manage Lifecycle: Close positions to freeze calculations or reopen as needed
- Review History: Access complete historical performance data
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.