forked from DitherAI/MeteorShower
-
Notifications
You must be signed in to change notification settings - Fork 11
feat: Add comprehensive LiquidityPups integration with Vercel deploym… #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mesaque
wants to merge
8
commits into
fciaf420:main
Choose a base branch
from
mesaque:many_integrations
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ent support - Implement PoolBot class for automated DLMM pool management - Add WebSocket server (wsServer.js) for real-time bot communication - Create Vercel-compatible HTTP server (vercel-server.js) with Server-Sent Events - Integrate Jupiter Ultra API for automatic token-to-SOL conversion on position closure - Add authentication system with INTEGRATION_SECRET for secure bot access - Implement real-time metrics tracking (P&L, fees, rebalance counts) - Add automatic position rebalancing when price moves outside range - Support both development (WebSocket) and production (HTTP/SSE) communication modes - Include comprehensive error handling and graceful bot lifecycle management - Add Vercel deployment configuration (vercel.json) for serverless hosting - Remove all debug logs for production-ready deployment
- Update wsServer.js to accept connections via nginx proxy with verifyClient logging - Add start-production.js script for production deployment with proper host binding - Add production optimizations and proper error handling for proxy connections - Support both local development and production nginx proxy setups
- Authentication: two-level access (user/admin) with separate secrets - Protected administrative endpoints: * LIST_ACTIVE_BOTS - list all active bots * GET_SERVER_STATUS - server status (port, clients, uptime, memory) * GET_SYSTEM_METRICS - system metrics (CPU, memory, disk, load average) * STOP_ALL_BOTS - stop all running bots * GET_BOT_LOGS - get specific bot logs - Security: mandatory admin role verification - Monitoring: detailed server resource information - Timeout and automatic reconnection for administrative operations - Remove obsolete HTTP endpoints (vercel-server.js, vercel.json)
- Remove verbose authentication logging - Remove debug connection logging - Remove shutdown debug messages - Keep only essential server startup message - Clean up production and integration startup scripts - Prepare for production deployment Files cleaned: - wsServer.js (removed auth, connection, shutdown logs) - start-production.js (simplified startup messages) - start-integration.js (simplified startup messages)
- Convert SOL initial value to USD for accurate PnL calculation in botManager - Remove debug console.log statements from botManager.js and wsServer.js - Implement silent error handling in monitoring loops and WebSocket operations - Clean production-ready code for deployment - Maintain full functionality while removing noise from logs - Fix units consistency: initialValue in USD, currentValue in USD for correct PnL
- Replace individual getPrice calls with batch getPrices for better efficiency - Add rate limiting and caching to prevent excessive API calls - Configure Ultra API with proper authentication headers - Fix existing https://lite-api.jup.ag 429 errors Changes: - lib/price.js: Implemented batch getPrices with cache (60s TTL) + rate limiting - botManager.js: All metrics updates now use batch price requests (3 tokens per cycle) - jupiter.js: Swap calculations now fetch both tokens in single batch call - Add JUPITER_API_BASE_URL and JUPITER_API_KEY environment variable support Benefits: - Reduce individual API calls (SOL + tokenX + tokenY) → 1 batch call - Cache prices for 60s to avoid repeated fetches in tight loops - Exponential backoff on 429s to handle rate limits gracefully - Silent error handling to avoid production log noise
This reverts commit 1582577.
- Remove cache and batch functionality for simplicity - Switch from lite-api to Ultra API only - Keep simple getPrice function with environment variables - botManager.js unchanged - use getPrice calls normally - jupiter.js unchanged - original getPrice calls Simple change: - price.js: lite-api -> ultra/v1/search with x-api-key authentication - No cache, no batch optimization yet - Basic functionality preserved - Environment variables JUPITER_API_BASE_URL and JUPITER_API_KEY required
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…ent support