-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
447 lines (331 loc) · 14.8 KB
/
.env.example
File metadata and controls
447 lines (331 loc) · 14.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
# ==============================================================================
# GXQ STUDIO - Environment Configuration
# ==============================================================================
# ------------------------------------------------------------------------------
# DEPLOYMENT PLATFORM (for identification)
# ------------------------------------------------------------------------------
# Options: vercel, railway, aws, azure, alibaba, docker, vps, localhost
DEPLOYMENT_PLATFORM=localhost
# ------------------------------------------------------------------------------
# SOLANA CONFIGURATION (Required)
# ------------------------------------------------------------------------------
# Solana RPC URL - Use premium RPC for production (Helius, QuickNode, Triton)
# Free tier: https://api.mainnet-beta.solana.com (slow, rate limited)
# Premium: https://mainnet.helius-rpc.com/?api-key=YOUR_KEY
SOLANA_RPC_URL=https://api.mainnet-beta.solana.com
# Solana WebSocket URL (for real-time updates)
# Required for continuous monitoring and WebSocket features
SOLANA_WS_URL=wss://api.mainnet-beta.solana.com
# Wallet private key in base58 format
# Get from Phantom/Solflare: Settings -> Export Private Key
# SECURITY: Never commit this to version control!
WALLET_PRIVATE_KEY=your_base58_private_key_here
# ------------------------------------------------------------------------------
# SERVER CONFIGURATION (for persistent deployments)
# ------------------------------------------------------------------------------
# Server host (0.0.0.0 for all interfaces, 127.0.0.1 for localhost only)
HOST=0.0.0.0
# Auto-start monitoring on server startup (true/false)
AUTO_START=true
# Scan interval in milliseconds (default: 5000 = 5 seconds)
SCAN_INTERVAL_MS=5000
# ------------------------------------------------------------------------------
# ADMIN PANEL (Required for web access)
# ------------------------------------------------------------------------------
# Admin username for web panel login
ADMIN_USERNAME=admin
# Admin password (minimum 8 characters, use strong password in production)
# For production, use bcrypt hash: npm run hash-password
ADMIN_PASSWORD=change_me_in_production
# JWT secret for authentication tokens (32+ characters recommended)
# Generate: openssl rand -base64 32
JWT_SECRET=your_32_character_secret_key_here
# Optional: Cron secret for Vercel cron job authorization
CRON_SECRET=your_cron_secret_here
# Admin API secret for backend admin operations
ADMIN_API_SECRET=your_admin_api_secret_here
# Admin session timeout in milliseconds (default: 3600000 = 1 hour)
ADMIN_SESSION_TIMEOUT=3600000
# ------------------------------------------------------------------------------
# BILLING & PAYMENT CONFIGURATION
# ------------------------------------------------------------------------------
# Billing system enabled (true/false)
BILLING_ENABLED=false
# Stripe API keys (for subscription billing)
# STRIPE_PUBLIC_KEY=pk_test_your_stripe_public_key
# STRIPE_SECRET_KEY=sk_test_your_stripe_secret_key
# STRIPE_WEBHOOK_SECRET=whsec_your_webhook_secret
# Payment processor webhook URLs
# STRIPE_WEBHOOK_URL=https://your-domain.com/api/webhooks/stripe
# CRYPTO_PAYMENT_WEBHOOK_URL=https://your-domain.com/api/webhooks/crypto
# Subscription tiers
# FREE_TIER_LIMIT=100
# PRO_TIER_LIMIT=10000
# ENTERPRISE_TIER_LIMIT=unlimited
# ------------------------------------------------------------------------------
# BOT CONFIGURATION & AUTOMATION
# ------------------------------------------------------------------------------
# Sniper bot configuration
SNIPER_BOT_ENABLED=false
SNIPER_BOT_MAX_CONCURRENT=5
SNIPER_BOT_GAS_PRICE_MULTIPLIER=1.5
SNIPER_BOT_SLIPPAGE_TOLERANCE=0.02
# Auto-trading bot configuration
AUTO_TRADE_ENABLED=false
AUTO_TRADE_MAX_POSITION_SIZE=10
AUTO_TRADE_MIN_PROFIT_THRESHOLD=0.01
AUTO_TRADE_STOP_LOSS_PERCENTAGE=0.05
# Bot monitoring
BOT_HEALTH_CHECK_INTERVAL=30000
BOT_FAILURE_ALERT_THRESHOLD=3
# ------------------------------------------------------------------------------
# RPC ROTATION & FALLBACK CONFIGURATION
# ------------------------------------------------------------------------------
# Primary RPC endpoints (comma-separated for rotation)
RPC_ENDPOINTS=https://api.mainnet-beta.solana.com,https://api.mainnet-beta.solana.com
RPC_ROTATION_ENABLED=true
RPC_ROTATION_INTERVAL=60000
# Fallback RPC endpoints (used when primary fails)
# FALLBACK_RPC_1=https://your-fallback-1.com
# FALLBACK_RPC_2=https://your-fallback-2.com
# FALLBACK_RPC_3=https://your-fallback-3.com
# RPC health check configuration
RPC_HEALTH_CHECK_ENABLED=true
RPC_HEALTH_CHECK_INTERVAL=30000
RPC_MAX_RETRY_ATTEMPTS=3
RPC_RETRY_DELAY_MS=1000
# RPC rate limiting
RPC_MAX_REQUESTS_PER_SECOND=50
RPC_BURST_LIMIT=100
# ------------------------------------------------------------------------------
# PRICE AUTOMATION & ORACLES
# ------------------------------------------------------------------------------
# Price feed update interval (milliseconds)
PRICE_UPDATE_INTERVAL=5000
# Price data sources (comma-separated)
PRICE_SOURCES=pyth,jupiter,switchboard
# Pyth Network configuration
PYTH_PRICE_FEED_ENABLED=true
PYTH_UPDATE_AUTHORITY=7UVimffxr9ow1uXYxsr4LHAcV58mLzhmwaeKvJ1pjLiE
# Jupiter price aggregator
JUPITER_PRICE_API_ENABLED=true
JUPITER_PRICE_CACHE_TTL=5000
# Switchboard oracles
SWITCHBOARD_ENABLED=false
# SWITCHBOARD_PROGRAM_ID=SW1TCH7qEPTdLsDHRgPuMQjbQxKdH2aBStViMFnt64f
# Price deviation alerts
PRICE_DEVIATION_ALERT_THRESHOLD=0.05
PRICE_STALENESS_THRESHOLD=60000
# ------------------------------------------------------------------------------
# ADMIN DESKTOP APP (admin.exe) SYNC
# ------------------------------------------------------------------------------
# Admin app synchronization enabled
ADMIN_APP_SYNC_ENABLED=false
# Admin app WebSocket server
ADMIN_APP_WS_PORT=8080
ADMIN_APP_WS_HOST=0.0.0.0
# Admin app authentication
ADMIN_APP_API_KEY=your_admin_app_api_key_here
# Admin app features
ADMIN_APP_WALLET_GENERATION_ENABLED=true
ADMIN_APP_BACKUP_ENABLED=true
ADMIN_APP_LOGS_ENABLED=true
# ------------------------------------------------------------------------------
# USER MANAGEMENT & CRM
# ------------------------------------------------------------------------------
# User registration enabled
USER_REGISTRATION_ENABLED=true
USER_EMAIL_VERIFICATION_REQUIRED=false
# User limits
MAX_USERS=1000
MAX_WALLETS_PER_USER=10
# CRM features
CRM_ENABLED=false
CRM_USER_ANALYTICS_ENABLED=true
CRM_EMAIL_NOTIFICATIONS_ENABLED=false
# ------------------------------------------------------------------------------
# TRADING CONFIGURATION
# ------------------------------------------------------------------------------
# Minimum profit threshold in SOL
# Start conservative: 0.01 (1% of 1 SOL trade)
# Adjust based on market conditions and risk tolerance
MINIMUM_PROFIT_SOL=0.01
# Maximum slippage tolerance (0.01 = 1%)
# High volatility: increase to 0.02-0.03
# Stable pairs: decrease to 0.005
MAX_SLIPPAGE=0.01
# Gas buffer multiplier for transaction fees
GAS_BUFFER=1.5
# ------------------------------------------------------------------------------
# JITO MEV PROTECTION (Mainnet Arbitrage)
# ------------------------------------------------------------------------------
# Enable Jito integration for MEV-protected execution
JITO_ENABLED=true
# Minimum Jito tip in lamports (default: 10000 = 0.00001 SOL)
JITO_MIN_TIP_LAMPORTS=10000
# Maximum Jito tip in lamports (default: 1000000 = 0.001 SOL)
JITO_MAX_TIP_LAMPORTS=1000000
# Jito tip as percentage of expected profit (default: 0.05 = 5%)
JITO_TIP_PERCENTAGE=0.05
# ------------------------------------------------------------------------------
# JUPITER V6 MULTI-HOP CONFIGURATION
# ------------------------------------------------------------------------------
# Minimum route legs for arbitrage (default: 3)
JUPITER_MIN_LEGS=3
# Maximum route legs for arbitrage (default: 7)
JUPITER_MAX_LEGS=7
# Jupiter API timeout in milliseconds before fallback (default: 5000)
JUPITER_API_TIMEOUT=5000
# Enable direct DEX routing fallback (default: true)
JUPITER_ENABLE_FALLBACK=true
# Number of route variations to explore (default: 5)
JUPITER_ROUTE_DEPTH=5
# ------------------------------------------------------------------------------
# PRIORITY FEE CONFIGURATION
# ------------------------------------------------------------------------------
# Priority fee urgency level (low, medium, high, critical)
# default: high for arbitrage
PRIORITY_FEE_URGENCY=high
# Maximum priority fee in lamports (default: 10000000 = 0.01 SOL)
MAX_PRIORITY_FEE_LAMPORTS=10000000
# Compute unit limit (default: 400000)
COMPUTE_UNIT_LIMIT=400000
# ------------------------------------------------------------------------------
# DEV FEE CONFIGURATION
# ------------------------------------------------------------------------------
# Enable dev fee (true/false)
DEV_FEE_ENABLED=true
# Dev fee percentage (0.10 = 10% of profits)
DEV_FEE_PERCENTAGE=0.10
# Dev fee recipient wallet address
DEV_FEE_WALLET=11111111111111111111111111111111
# ------------------------------------------------------------------------------
# PROFIT DISTRIBUTION
# ------------------------------------------------------------------------------
# Enable profit distribution (true/false)
PROFIT_DISTRIBUTION_ENABLED=true
# Reserve wallet domain (SNS name or PublicKey)
RESERVE_WALLET_DOMAIN=monads.skr
# Reserve wallet percentage (default: 0.70 = 70%)
RESERVE_WALLET_PERCENTAGE=0.70
# User wallet percentage for gas/slippage (default: 0.20 = 20%)
USER_WALLET_PERCENTAGE=0.20
# DAO wallet percentage (default: 0.10 = 10%)
DAO_WALLET_PERCENTAGE=0.10
# DAO wallet address (PublicKey)
DAO_WALLET_ADDRESS=DmtAdUSzFvcBymUmRFgPVawvoXbqdS2o18eZNpe5XcWW
# ------------------------------------------------------------------------------
# FLASH LOAN PROVIDERS (Mainnet Program IDs)
# ------------------------------------------------------------------------------
MARGINFI_PROGRAM_ID=MFv2hWf31Z9kbCa1snEPYctwafyhdvnV7FZnsebVacA
SOLEND_PROGRAM_ID=So1endDq2YkqhipRh3WViPa8hdiSpxWy6z3Z6tMCpAo
MANGO_PROGRAM_ID=mv3ekLzLbnVPNxjSKvqBpU3ZeZXPQdEC3bp5MDEBG68
KAMINO_PROGRAM_ID=KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD
PORT_FINANCE_PROGRAM_ID=Port7uDYB3wk6GJAw4KT1WpTeMtSu9bTcChBHkX2LfR
SAVE_FINANCE_PROGRAM_ID=SAVEg4Je7HZcJk2X1FTr1vfLhQqrpXPTvAWmYnYY1Wy
TULIP_PROGRAM_ID=TuLipcqtGVXP9XR62wM8WWCm6a9vhLs7T1uoWBk6FDs
DRIFT_PROGRAM_ID=dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH
JET_PROGRAM_ID=JPv1rCqrhagNNmJVM5J1he7msQ5ybtvE1nNuHpDHMNU
# ------------------------------------------------------------------------------
# JUPITER AGGREGATOR
# ------------------------------------------------------------------------------
JUPITER_V6_PROGRAM_ID=JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4
# ------------------------------------------------------------------------------
# OPTIONAL: QUICKNODE CONFIGURATION
# ------------------------------------------------------------------------------
# QuickNode RPC URL (if using QuickNode)
# QUICKNODE_RPC_URL=https://example.solana-mainnet.quiknode.pro/YOUR_KEY/
# QuickNode API Key
# QUICKNODE_API_KEY=your_quicknode_api_key
# QuickNode Functions URL
# QUICKNODE_FUNCTIONS_URL=your_quicknode_functions_url
# QuickNode KV Store URL
# QUICKNODE_KV_URL=your_quicknode_kv_url
# QuickNode Streams URL
# QUICKNODE_STREAMS_URL=your_quicknode_streams_url
# ------------------------------------------------------------------------------
# ORACLE INTELLIGENCE (AI-Powered Decision Making)
# ------------------------------------------------------------------------------
# Enable Oracle Intelligence System (true/false)
# Requires Gemini API key for Strategy Agent
GEMINI_ENABLED=false
# Google Gemini API Key
# Get from: https://ai.google.dev/
# Used for AI-powered route optimization and strategy analysis
GEMINI_API_KEY=your_gemini_api_key_here
# ------------------------------------------------------------------------------
# OPTIONAL: DATABASE CONFIGURATION (PostgreSQL)
# ------------------------------------------------------------------------------
# Database host
# DB_HOST=localhost
# Database port
# DB_PORT=5432
# Database name
# DB_NAME=gxq_studio
# Database user
# DB_USER=postgres
# Database password
# DB_PASSWORD=your_database_password
# ------------------------------------------------------------------------------
# OPTIONAL: FARCASTER INTEGRATION
# ------------------------------------------------------------------------------
# Neynar API Key for Farcaster integration
# NEYNAR_API_KEY=your_neynar_api_key
# ------------------------------------------------------------------------------
# OPTIONAL: GXQ ECOSYSTEM
# ------------------------------------------------------------------------------
# GXQ token mint address
# GXQ_TOKEN_MINT=your_gxq_token_mint
# GXQ ecosystem program ID
# GXQ_ECOSYSTEM_PROGRAM_ID=your_gxq_program_id
# ------------------------------------------------------------------------------
# WEBAPP CONFIGURATION (Next.js)
# ------------------------------------------------------------------------------
# Next.js public RPC URL (accessible from browser)
NEXT_PUBLIC_RPC_URL=https://api.mainnet-beta.solana.com
# Backend API URL for webapp (http://backend:3000 for Docker)
NEXT_PUBLIC_BACKEND_URL=http://localhost:3000
# WebSocket URL for real-time updates
NEXT_PUBLIC_WS_URL=ws://localhost:3000
# ------------------------------------------------------------------------------
# APPLICATION SETTINGS
# ------------------------------------------------------------------------------
# Log level (debug, info, warn, error)
LOG_LEVEL=info
# Node environment (development, production)
NODE_ENV=production
# Port for Railway/Docker deployment
PORT=3000
# Metrics port for Prometheus
METRICS_PORT=9090
# ------------------------------------------------------------------------------
# PRODUCTION SYSTEM CONFIGURATION
# ------------------------------------------------------------------------------
# Auto-fix system
AUTO_FIX_ENABLED=false
AUTO_REDEPLOY_ENABLED=false
ANALYSIS_WINDOW=60
MIN_ERROR_THRESHOLD=5
# Canary deployment
STAGING_URL=https://gxq-staging.vercel.app
PRODUCTION_URL=https://gxq.vercel.app
# GitHub integration (for auto-ticketing)
# GITHUB_TOKEN=your_github_token_here
# Vercel integration (for auto-deployment)
# VERCEL_TOKEN=your_vercel_token_here
# VERCEL_ORG_ID=your_vercel_org_id_here
# VERCEL_PROJECT_ID=your_vercel_project_id_here
# Grafana integration (for monitoring)
# GRAFANA_API_KEY=your_grafana_api_key_here
# GRAFANA_URL=https://your-grafana-instance.com
# ------------------------------------------------------------------------------
# SECURITY NOTES
# ------------------------------------------------------------------------------
# 1. NEVER commit this file with real values to version control
# 2. Use environment variables in CI/CD pipelines
# 3. Rotate secrets regularly (JWT_SECRET, ADMIN_PASSWORD)
# 4. Use strong, unique passwords
# 5. Enable 2FA on RPC provider accounts
# 6. Monitor wallet activity regularly
# 7. Keep trading wallet separate from main funds
# ------------------------------------------------------------------------------