-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
108 lines (94 loc) · 4.72 KB
/
.env.example
File metadata and controls
108 lines (94 loc) · 4.72 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
# =============================================================================
# DeFi Yield Aggregator - Environment Configuration
# =============================================================================
# Copy this file to .env and update values as needed
# NEVER commit .env to version control
# -----------------------------------------------------------------------------
# Application Settings
# -----------------------------------------------------------------------------
APP_ENV=development # development, staging, production
APP_NAME=defi-yield-aggregator
LOG_LEVEL=debug # debug, info, warn, error
# -----------------------------------------------------------------------------
# Server Configuration
# -----------------------------------------------------------------------------
SERVER_HOST=0.0.0.0
SERVER_PORT=3000
SERVER_READ_TIMEOUT=30s
SERVER_WRITE_TIMEOUT=30s
SERVER_IDLE_TIMEOUT=120s
# -----------------------------------------------------------------------------
# PostgreSQL Configuration
# -----------------------------------------------------------------------------
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
POSTGRES_USER=defi
POSTGRES_PASSWORD=defi_secret
POSTGRES_DB=defi_aggregator
POSTGRES_SSL_MODE=disable # disable for local dev, require for production
POSTGRES_MAX_CONNECTIONS=25
POSTGRES_MAX_IDLE_CONNECTIONS=5
POSTGRES_CONNECTION_MAX_LIFETIME=5m
# -----------------------------------------------------------------------------
# Redis Configuration
# -----------------------------------------------------------------------------
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD= # Empty for local dev
REDIS_DB=0
REDIS_POOL_SIZE=10
# -----------------------------------------------------------------------------
# ElasticSearch Configuration
# -----------------------------------------------------------------------------
ELASTICSEARCH_URL=http://localhost:9200
ELASTICSEARCH_USERNAME= # Empty for local dev
ELASTICSEARCH_PASSWORD= # Empty for local dev
# -----------------------------------------------------------------------------
# API Rate Limiting
# -----------------------------------------------------------------------------
RATE_LIMIT_REQUESTS=100 # Requests per window
RATE_LIMIT_WINDOW=1m # Time window
# -----------------------------------------------------------------------------
# External API Configuration
# -----------------------------------------------------------------------------
# DeFiLlama API (Free, no key required)
DEFILLAMA_BASE_URL=https://yields.llama.fi
DEFILLAMA_RATE_LIMIT=500 # Requests per minute
DEFILLAMA_FETCH_INTERVAL=3m # How often to fetch pools
# CoinGecko API (Free Demo plan)
COINGECKO_BASE_URL=https://api.coingecko.com/api/v3
COINGECKO_API_KEY= # Get from https://www.coingecko.com/en/api
COINGECKO_RATE_LIMIT=30 # Requests per minute (Demo plan)
COINGECKO_FETCH_INTERVAL=10m # How often to fetch prices
# -----------------------------------------------------------------------------
# Worker Configuration
# -----------------------------------------------------------------------------
OPPORTUNITY_DETECT_INTERVAL=5m # How often to run opportunity detection
WORKER_CONCURRENCY=5 # Number of concurrent workers
# -----------------------------------------------------------------------------
# Opportunity Detection Thresholds
# -----------------------------------------------------------------------------
MIN_TVL_THRESHOLD=100000 # Minimum TVL in USD to consider pool
MIN_APY_THRESHOLD=0.1 # Minimum APY (0.1%)
YIELD_GAP_MIN_PROFIT=0.5 # Minimum yield gap to report (0.5%)
APY_JUMP_THRESHOLD=50 # APY increase % to trigger alert
# -----------------------------------------------------------------------------
# Scoring Weights (must sum to 1.0)
# -----------------------------------------------------------------------------
SCORE_WEIGHT_APY=0.35
SCORE_WEIGHT_TVL=0.25
SCORE_WEIGHT_STABILITY=0.25
SCORE_WEIGHT_TREND=0.15
# -----------------------------------------------------------------------------
# CORS Configuration
# -----------------------------------------------------------------------------
CORS_ALLOWED_ORIGINS=http://localhost:3000,http://localhost:8080
CORS_ALLOWED_METHODS=GET,POST,PUT,DELETE,OPTIONS
CORS_ALLOWED_HEADERS=Origin,Content-Type,Accept,Authorization
CORS_MAX_AGE=86400
# -----------------------------------------------------------------------------
# WebSocket Configuration
# -----------------------------------------------------------------------------
WS_PING_INTERVAL=30s
WS_PONG_TIMEOUT=60s
WS_MAX_MESSAGE_SIZE=512