-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenv.example.battering-ram
More file actions
343 lines (251 loc) · 13.6 KB
/
env.example.battering-ram
File metadata and controls
343 lines (251 loc) · 13.6 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
# =============================================================================
# MiTeddy Mint Bot - Environment Configuration
# =============================================================================
# Copy this file to .env and fill in the required values (marked with REQUIRED)
# =============================================================================
#
# ⚠️ IMPORTANT: RBF Bot (src/main-rbf.ts) is now PRIMARY/PRODUCTION
# Original Bot (src/index.ts) is LEGACY/DEPRECATED
# Command: npm run start:rbf (production) or npm run start:rbf:dry (test)
# =============================================================================
# -----------------------------------------------------------------------------
# REQUIRED: Wallet & Contract Configuration
# -----------------------------------------------------------------------------
# Wallet (fresh hot wallet recommended - NEVER use your main wallet)
PRIVATE_KEY=
# REQUIRED: Sacrifice contract address
SACRIFICE_ADDR=0x111111111fd1a588bdb8254e3af1fc2fb0d9078a
# REQUIRED: Your Steady Teddy token ID
TEDDY_ID=
# REQUIRED: Your Mibera Maker token ID
MIBERA_ID=
# -----------------------------------------------------------------------------
# RBF BOT Configuration (PRODUCTION)
# -----------------------------------------------------------------------------
# Base gas multiplier - RBF Bot: 200.0x (5,000 Gwei base)
BASE_MULTIPLIER=200.0
# RBF base gas multiplier (default: 200.0)
RBF_BASE_GAS_MULTIPLIER=200.0
# RBF compound bump per pulse (default: 1.05 = 5% increase)
RBF_COMPOUND_BUMP=1.05
# RBF maximum gas multiplier (default: 1223.0 = 30,580 Gwei)
RBF_MAX_GAS_MULTIPLIER=1223.0
# RBF pulses per 2-second block (default: 20)
RBF_PULSES_PER_BLOCK=20
# RBF pulse interval in milliseconds (default: 100)
RBF_PULSE_INTERVAL_MS=100
# Maximum priority fee cap - RBF Bot: 30580 (supports 1,223x multiplier)
MAX_PRIORITY_FEE_GWEI=30580
# -----------------------------------------------------------------------------
# LEGACY: Timing Configuration (Original Bot - DEPRECATED)
# -----------------------------------------------------------------------------
# LEGACY: Expected unlock time in HH:MM:SS format (24-hour)
# ⚠️ NOT USED in RBF bot (block-event driven only)
# Use: npm run calc-unlock "HH:MM:SS" to calculate and set this automatically
# EXPECTED_UNLOCK_TIME=
# -----------------------------------------------------------------------------
# Contract Function Configuration
# -----------------------------------------------------------------------------
# Function signature for sacrifice/mint call (default: mint(uint256,uint256))
SAC_FUNCTION=mint(uint256,uint256)
# Optional: View function to check if window is open (e.g., isOpen())
# SAC_FUNCTION_VIEW=isOpen()
# -----------------------------------------------------------------------------
# Gas Configuration (Shared)
# -----------------------------------------------------------------------------
# Base priority fee in Gwei (default: 250)
PRIORITY_FEE_GWEI=250
# -----------------------------------------------------------------------------
# LEGACY: BATTERING RAM MODE - Extreme Gas Configuration (Original Bot - DEPRECATED)
# -----------------------------------------------------------------------------
# LEGACY: Base gas multiplier - Original Bot: 50.0x (DEPRECATED)
# BASE_MULTIPLIER=50.0
# LEGACY: Enable nuclear gas mode (Original Bot - DEPRECATED)
# GAS_NUCLEAR_MODE=true
# LEGACY: Maximum priority fee cap - Original Bot: 12,500 (DEPRECATED)
# MAX_PRIORITY_FEE_GWEI=12500
# Maximum fee per gas (very high to support extreme multipliers)
MAX_FEE_PER_GAS_GWEI=50000
# Hard cap on all fees - BATTERING RAM: 12,500 Gwei (allows full 50.0x multiplier)
FEE_MAX_GWEI_CAP=12500
# Gas bump percentage per replacement (default: 1.0 = 100% jumps in Battering Ram Mode)
BUMP_PCT=1.0
# Minimum bump percentage (default: 0.12 = 12%)
MIN_BUMP_PCT=0.12
# Maximum number of gas bumps (default: 5 in Battering Ram Mode)
MAX_BUMPS=5
# Interval between gas bumps in milliseconds (default: 1000ms = 1.0s)
BUMP_INTERVAL_MS=1000
# Final bump interval in milliseconds (default: 500ms = 0.5s in last 3s)
FINAL_BUMP_INTERVAL_MS=500
# -----------------------------------------------------------------------------
# LEGACY: Time-Based Spam Mode Configuration (Original Bot - DEPRECATED)
# -----------------------------------------------------------------------------
# LEGACY: Enable time-based spam mode (Original Bot - DISABLED)
# ⚠️ NOT USED in RBF bot, disabled in Original bot config
# TIME_BASED_SPAM=false
# LEGACY: Start spamming N seconds before expected unlock (Original Bot - DISABLED)
# SPAM_START_SECONDS=42
# LEGACY: Milliseconds between spam transactions (Original Bot - DISABLED)
# SPAM_INTERVAL_MS=25
# LEGACY: Continue spamming N seconds past expected unlock (Original Bot - DISABLED)
# SPAM_END_SECONDS=42
# LEGACY: Time offset adjustment in milliseconds (Original Bot - NOT USED in RBF bot)
# TIME_OFFSET_MS=-8000
# LEGACY: Estimated network latency compensation in milliseconds (Original Bot)
# NETWORK_LATENCY_MS=0
# -----------------------------------------------------------------------------
# BATTERING RAM MODE - Pre-Warming Configuration
# -----------------------------------------------------------------------------
# Enable pre-warming (true/false, default: true)
PRE_WARM_TX=true
# Start pre-warming N seconds before unlock - BATTERING RAM: 300s (5 minutes)
PRE_WARM_START_SECONDS=300
# Pre-warm steps: "seconds:multiplier;seconds:multiplier" format
# BATTERING RAM MODE: Nuclear gas (50.0x) at all intervals starting 5 minutes early
PRE_WARM_STEPS=300:50.0;120:50.0;60:50.0;30:50.0;15:50.0;5:50.0;2:50.0;1:50.0
# Optional: Dedicated RPCs for pre-warming (defaults to RPCS_BROADCAST)
# Add your premium RPC endpoints here
PRE_WARM_RPCS=https://berachain-rpc.publicnode.com,https://rpc.berachain.com
# Enable pre-signing transactions at multiple gas levels (true/false, default: true)
# In Battering Ram Mode, only pre-signs NUCLEAR (50.0x) transaction
PRE_SIGN_GAS_LEVELS=true
# -----------------------------------------------------------------------------
# RPC Configuration (Optimized for Speed)
# -----------------------------------------------------------------------------
# HTTP RPC endpoints (comma-separated, fastest first from latency tests)
# Public RPCs: https://docs.berachain.com/developers/rpc-endpoints
# Premium RPCs: Consider QuickNode, Alchemy, Chainstack for lower latency
RPCS_HTTP=https://rpc.berachain.com,https://berachain-rpc.publicnode.com,https://berachain.drpc.org
# WebSocket RPC endpoints (comma-separated, fastest first from latency tests)
RPCS_WS=wss://berachain.drpc.org,wss://rpc.berachain-apis.com,wss://berachain-rpc.publicnode.com
# Broadcast RPC endpoints (use only RPCs that accept ≥12,500 Gwei priority fees)
# Only include nodes that can handle nuclear (50.0x) transactions
# Add your premium RPC endpoints here (QuickNode, Alchemy, etc.)
RPCS_BROADCAST=https://berachain-rpc.publicnode.com,https://rpc.berachain.com
# Optional: Private transaction RPC endpoint (for eth_sendPrivateTransaction)
# PRIVATE_TX_RPC=
# Per-RPC request timeout in milliseconds (default: 900ms)
RPC_REQUEST_TIMEOUT_MS=900
# Enable RPC health checking and latency sorting (true/false, default: true)
RPC_HEALTH_CHECK=true
# Check RPC health every N polls (default: 100)
RPC_HEALTH_INTERVAL_POLLS=100
# -----------------------------------------------------------------------------
# WebSocket & Block Subscription
# -----------------------------------------------------------------------------
# Enable WebSocket connections (true/false, default: true)
WS_ENABLED=true
# Enable block subscription for instant reaction (true/false, default: true)
BLOCK_SUBSCRIBE=true
# -----------------------------------------------------------------------------
# Polling & Window Detection
# -----------------------------------------------------------------------------
# Polling interval in milliseconds when window is closed (default: 250ms)
SIMULATE_MS=250
# Switch to fast polling in last N seconds before unlock (default: 3s)
FAST_POLL_SECONDS=3
# Fast polling interval in milliseconds (default: 100ms)
FAST_POLL_MS=100
# Ultra-fast polling interval in milliseconds (default: 10ms)
ULTRA_FAST_POLL_MS=10
# Switch to ultra-fast polling in last N seconds (default: 1s)
ULTRA_FAST_POLL_SECONDS=1
# Unlock time unit: 'seconds' or 'milliseconds' (default: seconds)
UNLOCK_TIME_UNIT=seconds
# -----------------------------------------------------------------------------
# Nonce Management
# -----------------------------------------------------------------------------
# Nonce strategy: 'replace' (reuse same nonce) or 'multi' (increment nonce)
# 'replace' is recommended for gas bumping strategy
NONCE_MODE=replace
# -----------------------------------------------------------------------------
# Dual-Branch Strategy (RBF + Shadow New-Nonce)
# -----------------------------------------------------------------------------
# Enable dual-branch strategy (default: true)
DUAL_BRANCH_ENABLED=true
# Start shadow branch after N milliseconds (default: 700ms)
DUAL_BRANCH_AFTER_MS=700
# Maximum shadow branch attempts (default: 2)
DUAL_BRANCH_MAX=2
# Extra multiplier for shadow branch (default: 1.5x = 75.0x total in Battering Ram)
DUAL_BRANCH_EXTRA_MULTIPLIER=1.5
# -----------------------------------------------------------------------------
# Caching & Performance
# -----------------------------------------------------------------------------
# Maximum cache entries for view function results (default: 256)
CACHE_MAX_ENTRIES=256
# Cache TTL in milliseconds (default: 300000 = 5 minutes)
CACHE_TTL_MS=300000
# -----------------------------------------------------------------------------
# Gas Limit Configuration
# -----------------------------------------------------------------------------
# Fallback gas limit if estimation fails (default: 260000)
FALLBACK_GAS_LIMIT=260000
# Maximum gas limit allowed (default: same as FALLBACK_GAS_LIMIT)
MAX_GAS_LIMIT=260000
# -----------------------------------------------------------------------------
# Simulation Configuration
# -----------------------------------------------------------------------------
# Simulation timeout in milliseconds (default: 150ms)
SIMULATION_TIMEOUT_MS=150
# Simulation cache TTL in milliseconds (default: 80ms)
SIMULATION_CACHE_MS=80
# Skip simulation in final N seconds before unlock (default: 5s)
SIMULATION_SKIP_SECONDS=5
# -----------------------------------------------------------------------------
# Pre-Warm Low Multiplier Configuration
# -----------------------------------------------------------------------------
# Low multiplier for early pre-warm steps (default: 20x)
PRE_WARM_LOW_MULTIPLIER=20
# Threshold in seconds for using low multiplier (default: 30s)
PRE_WARM_LOW_THRESHOLD_SECONDS=30
# -----------------------------------------------------------------------------
# RPC Fan-Out Configuration
# -----------------------------------------------------------------------------
# Number of top-N RPCs to try first before falling back (default: 3)
RPC_PRIMARY_FANOUT=3
# -----------------------------------------------------------------------------
# Logging & State Management
# -----------------------------------------------------------------------------
# Enable detailed logging to file (true/false, default: true)
DETAILED_LOGGING=true
# Persist state to disk for crash recovery (true/false, default: true)
PERSIST_STATE=true
# Lock file name (default: .miteddy.lock)
LOCKFILE=.miteddy.lock
# -----------------------------------------------------------------------------
# Development & Testing
# -----------------------------------------------------------------------------
# Dry run mode (set via --dry-run flag, not env var)
# Run with: npm start -- --dry-run
# =============================================================================
# RBF BOT Notes (PRODUCTION):
# =============================================================================
# - Block-event driven: No EXPECTED_UNLOCK_TIME needed
# - Shotgun RBF: 20 pulses per 2-second block
# - Gas escalation: 200x base → 1,223x maximum (5% compound per pulse)
# - 80 broadcast attempts per nonce (20 pulses × 4 RPCs)
# - Receipt-based nonce discipline (waits for receipt before incrementing)
# - Success rate: 50-60% in extreme competition
# =============================================================================
# LEGACY: BATTERING RAM MODE Notes (Original Bot - DEPRECATED):
# =============================================================================
# - Pre-warming starts 5 minutes (300s) before unlock with nuclear gas (50.0x)
# - All pre-warm steps use maximum gas (50.0x = 12,500 Gwei priority fee)
# - Bot starts at maximum gas immediately (no gradual ramp-up)
# - Only pre-signs NUCLEAR transaction (50.0x) for instant firing
# - RPCS_BROADCAST should only include RPCs that accept ≥12,500 Gwei
# - Time offset defaults to -8000ms (8 seconds earlier) based on post-mortem
# ⚠️ WARNING: Original bot failed in all recent production runs. Use RBF bot instead.
# =============================================================================
# General Notes:
# =============================================================================
# - All gas values are in Gwei
# - Time values are in seconds unless specified as milliseconds
# - RPC URLs should be comma-separated with no spaces (or spaces are trimmed)
# - Pre-warm steps format: "seconds:multiplier;seconds:multiplier"
# Battering Ram example: "300:50.0;120:50.0;60:50.0;30:50.0;15:50.0;5:50.0;2:50.0;1:50.0"
# - EXPECTED_UNLOCK_TIME format: "HH:MM:SS" (24-hour format)
# Use: npm run calc-unlock "HH:MM:SS" to calculate from website timer
# =============================================================================