privateuserh commited on
Commit
a25c420
·
verified ·
1 Parent(s): 876d7d1

Add 2 files

Browse files
Files changed (2) hide show
  1. README.md +7 -5
  2. index.html +554 -19
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Privdmi Vbeta1 02
3
- emoji: 📈
4
- colorFrom: gray
5
- colorTo: yellow
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: privdmi-vbeta1-02
3
+ emoji: 🐳
4
+ colorFrom: red
5
+ colorTo: blue
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,554 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>DMIM Yield Farming | Bitcoin Cash Blockchain</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <style>
10
+ .price-up {
11
+ color: #10b981;
12
+ animation: pulse-up 0.5s ease-in-out;
13
+ }
14
+ .price-down {
15
+ color: #ef4444;
16
+ animation: pulse-down 0.5s ease-in-out;
17
+ }
18
+ @keyframes pulse-up {
19
+ 0% { transform: scale(1); }
20
+ 50% { transform: scale(1.1); }
21
+ 100% { transform: scale(1); }
22
+ }
23
+ @keyframes pulse-down {
24
+ 0% { transform: scale(1); }
25
+ 50% { transform: scale(0.9); }
26
+ 100% { transform: scale(1); }
27
+ }
28
+ .chart-container {
29
+ height: 250px;
30
+ position: relative;
31
+ }
32
+ .chart-line {
33
+ position: absolute;
34
+ bottom: 0;
35
+ left: 0;
36
+ width: 100%;
37
+ height: 100%;
38
+ stroke-width: 2;
39
+ fill: none;
40
+ }
41
+ .institutional-panel {
42
+ background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
43
+ border: 1px solid #334155;
44
+ }
45
+ .tokenomics-card {
46
+ background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
47
+ border-left: 4px solid #8b5cf6;
48
+ }
49
+ .token-badge {
50
+ background-color: rgba(139, 92, 246, 0.1);
51
+ border: 1px solid rgba(139, 92, 246, 0.3);
52
+ }
53
+ .blink {
54
+ animation: blink-animation 1s steps(5, start) infinite;
55
+ }
56
+ @keyframes blink-animation {
57
+ to { opacity: 0.5; }
58
+ }
59
+ .yield-card {
60
+ background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
61
+ border: 1px solid #334155;
62
+ }
63
+ .yield-highlight {
64
+ background: linear-gradient(135deg, #4c1d95 0%, #7c3aed 100%);
65
+ }
66
+ </style>
67
+ </head>
68
+ <body class="bg-gray-900 text-gray-100 min-h-screen">
69
+ <div class="container mx-auto px-4 py-8">
70
+ <header class="flex flex-col md:flex-row justify-between items-start md:items-center mb-8 gap-4">
71
+ <div class="flex items-center">
72
+ <div class="relative">
73
+ <i class="fas fa-coins text-3xl text-purple-500 mr-3"></i>
74
+ <span class="absolute -top-1 -right-1 bg-purple-500 text-white text-xs rounded-full w-4 h-4 flex items-center justify-center blink"></span>
75
+ </div>
76
+ <div>
77
+ <h1 class="text-2xl font-bold">DMIM Yield Farming</h1>
78
+ <div class="flex items-center mt-1 space-x-2">
79
+ <span class="token-badge px-2 py-1 rounded-md text-xs flex items-center">
80
+ <i class="fab fa-bitcoin text-orange-400 mr-1"></i>
81
+ Bitcoin Cash Blockchain
82
+ </span>
83
+ <span class="token-badge px-2 py-1 rounded-md text-xs">Fungible Token</span>
84
+ </div>
85
+ </div>
86
+ </div>
87
+ <div class="flex flex-col md:flex-row items-start md:items-center space-y-2 md:space-y-0 md:space-x-4">
88
+ <div class="bg-gray-800 px-4 py-2 rounded-lg">
89
+ <span class="text-gray-400">Balance:</span>
90
+ <span class="font-bold ml-2" id="balance">1,250.00 DMIM</span>
91
+ </div>
92
+ <div class="bg-gray-800 px-4 py-2 rounded-lg">
93
+ <span class="text-gray-400">BCH Balance:</span>
94
+ <span class="font-bold ml-2">5.42 BCH</span>
95
+ </div>
96
+ </div>
97
+ </header>
98
+
99
+ <div class="grid grid-cols-1 lg:grid-cols-3 gap-6 mb-6">
100
+ <!-- Token Info -->
101
+ <div class="bg-gray-800 rounded-xl p-6">
102
+ <h2 class="text-xl font-bold mb-4 flex items-center">
103
+ <i class="fas fa-info-circle text-purple-400 mr-2"></i>
104
+ Token Information
105
+ </h2>
106
+ <div class="space-y-4">
107
+ <div>
108
+ <div class="text-gray-400 text-sm">Token Name</div>
109
+ <div class="text-lg font-bold">DMIM</div>
110
+ </div>
111
+ <div>
112
+ <div class="text-gray-400 text-sm">Token ID</div>
113
+ <div class="text-sm font-mono break-all">81fd176d7e3769aad00bc21539082cc3345f9cd613623fa281e6726f451f32f9</div>
114
+ </div>
115
+ <div>
116
+ <div class="text-gray-400 text-sm">Total Supply</div>
117
+ <div class="text-lg font-bold">1,000,000 DMIM</div>
118
+ </div>
119
+ <div>
120
+ <div class="text-gray-400 text-sm">Current Price</div>
121
+ <div class="text-2xl font-bold" id="current-price">0.052 BCH</div>
122
+ <div class="text-sm" id="price-change">+1.24% <i class="fas fa-arrow-up ml-1"></i></div>
123
+ </div>
124
+ <div>
125
+ <div class="text-gray-400 text-sm">Creation TX</div>
126
+ <a href="https://blockchair.com/bitcoin-cash/transaction/81fd176d7e3769aad00bc21539082cc3345f9cd613623fa281e6726f451f32f9" target="_blank" class="text-purple-400 hover:underline text-sm font-mono break-all">81fd176d7e3769...f451f32f9</a>
127
+ </div>
128
+ </div>
129
+ </div>
130
+
131
+ <!-- Market Data -->
132
+ <div class="bg-gray-800 rounded-xl p-6">
133
+ <div class="flex justify-between items-center mb-4">
134
+ <h2 class="text-xl font-bold flex items-center">
135
+ <i class="fas fa-chart-line text-purple-400 mr-2"></i>
136
+ Market Data
137
+ </h2>
138
+ <div class="flex space-x-2">
139
+ <select class="bg-gray-700 text-white rounded px-3 py-1 text-sm">
140
+ <option>1h</option>
141
+ <option>4h</option>
142
+ <option>1d</option>
143
+ <option>1w</option>
144
+ </select>
145
+ </div>
146
+ </div>
147
+
148
+ <div class="chart-container mb-4">
149
+ <svg id="price-chart" width="100%" height="100%" viewBox="0 0 500 250" preserveAspectRatio="none">
150
+ <path class="chart-line", stroke="#8b5cf6" d="M0,250 L50,220 L100,240 L150,210 L200,230 L250,200 L300,220 L350,190 L400,180 L450,170 L500,160" />
151
+ </svg>
152
+ </div>
153
+
154
+ <div class="grid grid-cols-2 gap-4">
155
+ <div class="bg-gray-700 p-3 rounded-lg">
156
+ <div class="text-gray-400 text-sm">24h Volume</div>
157
+ <div class="text-lg font-bold">12,450 DMIM</div>
158
+ </div>
159
+ <div class="bg-gray-700 p-3 rounded-lg">
160
+ <div class="text-gray-400 text-sm">Liquidity</div>
161
+ <div class="text-lg font-bold">24,000 BCH</div>
162
+ </div>
163
+ </div>
164
+ </div>
165
+
166
+ <!-- Tokenomics -->
167
+ <div class="tokenomics-card rounded-xl p-6">
168
+ <h2 class="text-xl font-bold mb-4 flex items-center">
169
+ <i class="fas fa-pie-chart text-purple-400 mr-2"></i>
170
+ Tokenomics
171
+ </h2>
172
+ <div class="flex items-center justify-center mb-4">
173
+ <div class="w-32 h-32 rounded-full border-4 border-purple-500 flex items-center justify-center">
174
+ <div class="text-center">
175
+ <div class="text-2xl font-bold">1M</div>
176
+ <div class="text-xs text-gray-400">Total Supply</div>
177
+ </div>
178
+ </div>
179
+ </div>
180
+ <div class="space-y-3">
181
+ <div class="flex justify-between">
182
+ <span class="text-gray-400">Circulating</span>
183
+ <span class="font-medium">650,000 DMIM (65%)</span>
184
+ </div>
185
+ <div class="flex justify-between">
186
+ <span class="text-gray-400">Reserves</span>
187
+ <span class="font-medium">200,000 DMIM (20%)</span>
188
+ </div>
189
+ <div class="flex justify-between">
190
+ <span class="text-gray-400">Team</span>
191
+ <span class="font-medium">100,000 DMIM (10%)</span>
192
+ </div>
193
+ <div class="flex justify-between">
194
+ <span class="text-gray-400">Ecosystem</span>
195
+ <span class="font-medium">50,000 DMIM (5%)</span>
196
+ </div>
197
+ </div>
198
+ </div>
199
+ </div>
200
+
201
+ <div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
202
+ <!-- Yield Farming Panel -->
203
+ <div class="yield-card rounded-xl p-6">
204
+ <h2 class="text-xl font-bold mb-4 flex items-center">
205
+ <i class="fas fa-seedling text-purple-400 mr-2"></i>
206
+ Yield Farming
207
+ </h2>
208
+
209
+ <div class="mb-4">
210
+ <label class="text-gray-400 block mb-2">Select Pool</label>
211
+ <select class="w-full bg-gray-800 border border-gray-700 rounded-lg px-4 py-3 focus:outline-none focus:ring-2 focus:ring-purple-500" id="pool-select">
212
+ <option value="0.03">DMIM/BCH Pool (0.03% APY)</option>
213
+ <option value="0.05">DMIM/USDC Pool (0.05% APY)</option>
214
+ <option value="0.07">DMIM/ETH Pool (0.07% APY)</option>
215
+ </select>
216
+ </div>
217
+
218
+ <div class="mb-4">
219
+ <div class="flex justify-between mb-2">
220
+ <label class="text-gray-400">DMIM Amount</label>
221
+ <span class="text-gray-400">Available: 1,250.00 DMIM</span>
222
+ </div>
223
+ <input type="number" class="w-full bg-gray-800 border border-gray-700 rounded-lg px-4 py-3 focus:outline-none focus:ring-2 focus:ring-purple-500" placeholder="0.00" id="farm-amount">
224
+ </div>
225
+
226
+ <div class="mb-4">
227
+ <div class="flex justify-between mb-2">
228
+ <label class="text-gray-400">BCH Amount</label>
229
+ <span class="text-gray-400">Available: 5.42 BCH</span>
230
+ </div>
231
+ <input type="number", class="w-full bg-gray-800 border border-gray-700 rounded-lg px-4 py-3 focus:outline-none focus:ring-2 focus:ring-purple-500" placeholder="0.00" id="bch-amount">
232
+ </div>
233
+
234
+ <div class="mb-4">
235
+ <label class="flex items-center">
236
+ <input type="checkbox" class="form-checkbox h-5 w-5 text-purple-600 rounded" checked>
237
+ <span class="ml-2">Auto-compound rewards</span>
238
+ </label>
239
+ </div>
240
+
241
+ <button class="w-full bg-purple-600 hover:bg-purple-700 py-3 rounded-lg font-bold transition mb-4">
242
+ Add Liquidity
243
+ </button>
244
+
245
+ <div class="text-center text-sm text-gray-400">
246
+ Current TVL: <span class="text-purple-400">$1,240,000</span>
247
+ </div>
248
+ </div>
249
+
250
+ <!-- Profit Calculator -->
251
+ <div class="yield-highlight rounded-xl p-6">
252
+ <h2 class="text-xl font-bold mb-4 flex items-center">
253
+ <i class="fas fa-calculator mr-2"></i>
254
+ Profit Calculator
255
+ </h2>
256
+
257
+ <div class="mb-4">
258
+ <label class="text-gray-200 block mb-2">Investment Amount (DMIM)</label>
259
+ <input type="number" class="w-full bg-purple-800 border border-purple-700 rounded-lg px-4 py-3 focus:outline-none focus:ring-2 focus:ring-purple-400" placeholder="1000" id="investment-amount">
260
+ </div>
261
+
262
+ <div class="mb-4">
263
+ <label class="text-gray-200 block mb-2">APY (%)</label>
264
+ <input type="number" class="w-full bg-purple-800 border border-purple-700 rounded-lg px-4 py-3 focus:outline-none focus:ring-2 focus:ring-purple-400" value="0.03" step="0.01" id="apy-input">
265
+ </div>
266
+
267
+ <div class="grid grid-cols-4 gap-2 mb-4">
268
+ <button class="bg-purple-700 hover:bg-purple-800 py-2 rounded-lg text-sm" onclick="calculateProfit('week')">Week</button>
269
+ <button class="bg-purple-700 hover:bg-purple-800 py-2 rounded-lg text-sm" onclick="calculateProfit('month')">Month</button>
270
+ <button class="bg-purple-700 hover:bg-purple-800 py-2 rounded-lg text-sm" onclick="calculateProfit('quarter')">Quarter</button>
271
+ <button class="bg-purple-700 hover:bg-purple-800 py-2 rounded-lg text-sm" onclick="calculateProfit('year')">Year</button>
272
+ </div>
273
+
274
+ <div class="bg-purple-800 rounded-lg p-4 mb-4">
275
+ <div class="flex justify-between mb-2">
276
+ <span class="text-gray-300">Estimated Rewards:</span>
277
+ <span class="font-bold" id="estimated-rewards">0 DMIM</span>
278
+ </div>
279
+ <div class="flex justify-between">
280
+ <span class="text-gray-300">Value in BCH:</span>
281
+ <span class="font-bold" id="estimated-value">0 BCH</span>
282
+ </div>
283
+ </div>
284
+
285
+ <div class="text-center text-sm text-gray-200">
286
+ Calculations based on current price: <span class="font-bold">0.052 BCH/DMIM</span>
287
+ </div>
288
+ </div>
289
+
290
+ <!-- Institutional Trading -->
291
+ <div class="institutional-panel rounded-xl p-6">
292
+ <h2 class="text-xl font-bold mb-4 flex items-center">
293
+ <i class="fas fa-building text-purple-400 mr-2"></i>
294
+ Institutional Trading
295
+ </h2>
296
+
297
+ <div class="mb-4">
298
+ <div class="flex justify-between items-center mb-2">
299
+ <label class="text-gray-400">OTC Order Size</label>
300
+ <span class="text-xs text-gray-400">Min: 10,000 DMIM</span>
301
+ </div>
302
+ <input type="number" class="w-full bg-gray-800 border border-gray-700 rounded-lg px-4 py-3 focus:outline-none focus:ring-2 focus:ring-purple-500" placeholder="10,000+ DMIM">
303
+ </div>
304
+
305
+ <div class="mb-4">
306
+ <label class="text-gray-400 block mb-2">Settlement Period</label>
307
+ <div class="grid grid-cols-3 gap-2">
308
+ <button class="bg-gray-800 hover:bg-gray-700 py-2 rounded-lg text-sm">T+1</button>
309
+ <button class="bg-gray-800 hover:bg-gray-700 py-2 rounded-lg text-sm">T+2</button>
310
+ <button class="bg-purple-600 py-2 rounded-lg text-sm">T+0</button>
311
+ </div>
312
+ </div>
313
+
314
+ <div class="mb-4">
315
+ <label class="flex items-center">
316
+ <input type="checkbox" class="form-checkbox h-5 w-5 text-purple-600 rounded" checked>
317
+ <span class="ml-2">Block Trade</span>
318
+ </label>
319
+ </div>
320
+
321
+ <div class="mb-4">
322
+ <label class="text-gray-400 block mb-1">Counterparty</label>
323
+ <select class="w-full bg-gray-800 border border-gray-700 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-purple-500">
324
+ <option>Select Institution</option>
325
+ <option>BCH Foundation</option>
326
+ <option>Digital Asset Fund</option>
327
+ <option>Crypto Market Makers</option>
328
+ </select>
329
+ </div>
330
+
331
+ <button class="w-full bg-purple-600 hover:bg-purple-700 py-3 rounded-lg font-bold transition">
332
+ Request OTC Quote
333
+ </button>
334
+ </div>
335
+ </div>
336
+
337
+ <!-- Trade History -->
338
+ <div class="bg-gray-800 rounded-xl p-6 mt-6">
339
+ <div class="flex justify-between items-center mb-6">
340
+ <h2 class="text-xl font-bold flex items-center">
341
+ <i class="fas fa-history text-purple-400 mr-2"></i>
342
+ Recent Transactions
343
+ </h2>
344
+ <div class="flex space-x-2">
345
+ <button class="bg-gray-700 hover:bg-gray-600 px-3 py-1 rounded text-sm">All</button>
346
+ <button class="bg-gray-700 hover:bg-gray-600 px-3 py-1 rounded text-sm">Swaps</button>
347
+ <button class="bg-gray-700 hover:bg-gray-600 px-3 py-1 rounded text-sm">Adds</button>
348
+ <button class="bg-gray-700 hover:bg-gray-600 px-3 py-1 rounded text-sm">Removes</button>
349
+ </div>
350
+ </div>
351
+ <div class="overflow-x-auto">
352
+ <table class="w-full">
353
+ <thead>
354
+ <tr class="text-gray-400 border-b border-gray-700">
355
+ <th class="pb-3 text-left">Date</th>
356
+ <th class="pb-3 text-left">Type</th>
357
+ <th class="pb-3 text-left">Amount (DMIM)</th>
358
+ <th class="pb-3 text-left">Amount (BCH)</th>
359
+ <th class="pb-3 text-left">Status</th>
360
+ <th class="pb-3 text-left">TX ID</th>
361
+ </tr>
362
+ </thead>
363
+ <tbody id="trades-table">
364
+ <tr class="border-b border-gray-700 hover:bg-gray-700">
365
+ <td class="py-3">2023-11-15 14:32</td>
366
+ <td class="text-green-400">Add Liquidity</td>
367
+ <td>250.00</td>
368
+ <td>13.00</td>
369
+ <td class="text-green-400">Confirmed</td>
370
+ <td class="text-xs font-mono">a1b2c3...e4f5</td>
371
+ </tr>
372
+ <tr class="border-b border-gray-700 hover:bg-gray-700">
373
+ <td class="py-3">2023-11-15 11:18</td>
374
+ <td class="text-blue-400">Swap</td>
375
+ <td>180.50</td>
376
+ <td>9.42</td>
377
+ <td class="text-green-400">Confirmed</td>
378
+ <td class="text-xs font-mono">d4e5f6...g7h8</td>
379
+ </tr>
380
+ <tr class="border-b border-gray-700 hover:bg-gray-700">
381
+ <td class="py-3">2023-11-14 16:45</td>
382
+ <td class="text-green-400">Add Liquidity</td>
383
+ <td>420.00</td>
384
+ <td>21.63</td>
385
+ <td class="text-green-400">Confirmed</td>
386
+ <td class="text-xs font-mono">i9j0k1...l2m3</td>
387
+ </tr>
388
+ <tr class="border-b border-gray-700 hover:bg-gray-700">
389
+ <td class="py-3">2023-11-14 09:12</td>
390
+ <td class="text-yellow-400">Remove Liquidity</td>
391
+ <td>75.25</td>
392
+ <td>3.95</td>
393
+ <td class="text-green-400">Confirmed</td>
394
+ <td class="text-xs font-mono">n4o5p6...q7r8</td>
395
+ </tr>
396
+ <tr class="hover:bg-gray-700">
397
+ <td class="py-3">2023-11-13 22:08</td>
398
+ <td class="text-blue-400">Swap</td>
399
+ <td>324.75</td>
400
+ <td>16.63</td>
401
+ <td class="text-green-400">Confirmed</td>
402
+ <td class="text-xs font-mono">s9t0u1...v2w3</td>
403
+ </tr>
404
+ </tbody>
405
+ </table>
406
+ </div>
407
+ </div>
408
+ </div>
409
+
410
+ <script>
411
+ // Simulate price changes for DMIM/BCH pair
412
+ let currentPrice = 0.0520;
413
+ let priceDirection = 1; // 1 for up, -1 for down
414
+ let balance = 1250.00;
415
+ let transactions = [];
416
+
417
+ // DOM elements
418
+ const currentPriceEl = document.getElementById('current-price');
419
+ const priceChangeEl = document.getElementById('price-change');
420
+ const balanceEl = document.getElementById('balance');
421
+ const farmAmountEl = document.getElementById('farm-amount');
422
+ const bchAmountEl = document.getElementById('bch-amount');
423
+ const poolSelectEl = document.getElementById('pool-select');
424
+ const investmentAmountEl = document.getElementById('investment-amount');
425
+ const apyInputEl = document.getElementById('apy-input');
426
+ const estimatedRewardsEl = document.getElementById('estimated-rewards');
427
+ const estimatedValueEl = document.getElementById('estimated-value');
428
+ const tradesTableEl = document.getElementById('trades-table');
429
+ const priceChartEl = document.getElementById('price-chart');
430
+
431
+ // Format currency
432
+ const formatCurrency = (amount) => {
433
+ return amount.toFixed(4) + ' BCH';
434
+ };
435
+
436
+ // Format DMIM
437
+ const formatDMIM = (amount) => {
438
+ return amount.toFixed(2) + ' DMIM';
439
+ };
440
+
441
+ // Generate random price data for chart
442
+ const generateChartData = () => {
443
+ let points = [];
444
+ let y = 250;
445
+ for (let x = 0; x <= 500; x += 50) {
446
+ y = Math.max(100, Math.min(250, y + (Math.random() * 40 - 20)));
447
+ points.push(`${x},${y}`);
448
+ }
449
+ return points.join(' ');
450
+ };
451
+
452
+ // Update chart
453
+ const updateChart = () => {
454
+ const path = priceChartEl.querySelector('.chart-line');
455
+ path.setAttribute('d', `M${generateChartData()}`);
456
+ };
457
+
458
+ // Update price
459
+ const updatePrice = () => {
460
+ // Random price change
461
+ const change = (Math.random() * 0.002 - 0.001) * priceDirection;
462
+ currentPrice = Math.max(0.0500, Math.min(0.0540, currentPrice + change));
463
+
464
+ // Occasionally reverse direction
465
+ if (Math.random() < 0.2) {
466
+ priceDirection *= -1;
467
+ }
468
+
469
+ // Update UI
470
+ currentPriceEl.textContent = formatCurrency(currentPrice);
471
+
472
+ // Calculate percentage change
473
+ const changePercent = (change / (currentPrice - change) * 100).toFixed(2);
474
+ if (change >= 0) {
475
+ priceChangeEl.innerHTML = `+${changePercent}% <i class="fas fa-arrow-up ml-1"></i>`;
476
+ priceChangeEl.className = 'text-sm price-up';
477
+ currentPriceEl.className = 'text-2xl font-bold price-up';
478
+ } else {
479
+ priceChangeEl.innerHTML = `${changePercent}% <i class="fas fa-arrow-down ml-1"></i>`;
480
+ priceChangeEl.className = 'text-sm price-down';
481
+ currentPriceEl.className = 'text-2xl font-bold price-down';
482
+ }
483
+
484
+ // Update chart
485
+ updateChart();
486
+ };
487
+
488
+ // Calculate farming profits
489
+ const calculateProfit = (period) => {
490
+ const amount = parseFloat(investmentAmountEl.value) || 0;
491
+ const apy = parseFloat(apyInputEl.value) || 0;
492
+
493
+ if (amount <= 0 || apy <= 0) {
494
+ estimatedRewardsEl.textContent = "0 DMIM";
495
+ estimatedValueEl.textContent = "0 BCH";
496
+ return;
497
+ }
498
+
499
+ let days;
500
+ switch (period) {
501
+ case 'week':
502
+ days = 7;
503
+ break;
504
+ case 'month':
505
+ days = 30;
506
+ break;
507
+ case 'quarter':
508
+ days = 90;
509
+ break;
510
+ case 'year':
511
+ days = 365;
512
+ break;
513
+ default:
514
+ days = 365;
515
+ }
516
+
517
+ // Simple interest calculation
518
+ const rewards = amount * (apy / 100) * (days / 365);
519
+ const value = rewards * currentPrice;
520
+
521
+ estimatedRewardsEl.textContent = formatDMIM(rewards);
522
+ estimatedValueEl.textContent = formatCurrency(value);
523
+ };
524
+
525
+ // Sync BCH amount when DMIM amount changes
526
+ farmAmountEl.addEventListener('input', () => {
527
+ const dmimAmount = parseFloat(farmAmountEl.value) || 0;
528
+ const bchAmount = dmimAmount * currentPrice;
529
+ bchAmountEl.value = bchAmount.toFixed(4);
530
+ });
531
+
532
+ // Sync DMIM amount when BCH amount changes
533
+ bchAmountEl.addEventListener('input', () => {
534
+ const bchAmount = parseFloat(bchAmountEl.value) || 0;
535
+ const dmimAmount = bchAmount / currentPrice;
536
+ farmAmountEl.value = dmimAmount.toFixed(2);
537
+ });
538
+
539
+ // Update APY when pool changes
540
+ poolSelectEl.addEventListener('change', () => {
541
+ const selectedPool = poolSelectEl.options[poolSelectEl.selectedIndex];
542
+ const apy = selectedPool.value;
543
+ apyInputEl.value = apy;
544
+ });
545
+
546
+ // Initialize
547
+ updatePrice();
548
+ updateChart();
549
+
550
+ // Simulate price changes every 3 seconds
551
+ setInterval(updatePrice, 3000);
552
+ </script>
553
+ <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - <a href="https://enzostvs-deepsite.hf.space?remix=tonymontana2064/simple-trading" style="color: #fff;text-decoration: underline;" target="_blank" >🧬 Remix</a></p><p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=privateuserh/privdmi-vbeta1-02" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
554
+ </html>