-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclubcal0.html
239 lines (220 loc) · 9.02 KB
/
clubcal0.html
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
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Hashbank 收益模拟器</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script src="https://cdn.jsdelivr.net/npm/chartjs-plugin-datalabels"></script>
<style>
body { padding: 2rem; background-color: #f8f9fa; }
.card { margin-top: 1.5rem; }
.highlight { font-size: 1.3rem; font-weight: bold; color: #d63384; }
.chart-container { display: flex; gap: 2rem; justify-content: center; flex-wrap: wrap; }
.chart-box { width: 300px; height: 300px; }
</style>
</head>
<body>
<div class="container">
<h2 class="mb-4">📊 Hashbank 收益模拟器v1.1 by KID</h2>
<form id="earningsForm" class="row g-3">
<div class="col-md-4">
<label for="vipLevel" class="form-label">VIP 等级</label>
<select class="form-select" id="vipLevel">
<option value="VIP6">VIP6</option>
<option value="VIP5">VIP5</option>
<option value="VIP4">VIP4</option>
<option value="VIP3">VIP3</option>
<option value="VIP2">VIP2</option>
<option value="VIP1">VIP1</option>
<option value="PC">PC</option>
</select>
</div>
<div class="col-md-4">
<label for="partnerLevel" class="form-label">合伙人等级</label>
<select class="form-select" id="partnerLevel">
<option value="机构合伙人">机构合伙人</option>
<option value="一级合伙人">一级合伙人</option>
<option value="二级合伙人">二级合伙人</option>
<option value="无">无</option>
</select>
</div>
<div class="col-md-4">
<label for="directCount" class="form-label">直推人数</label>
<input type="number" class="form-control" id="directCount" value="4">
</div>
<div class="col-md-4">
<label for="memberStake" class="form-label">每位会员质押金额 (U)</label>
<input type="number" class="form-control" id="memberStake" value="10000">
</div>
<div class="col-md-4">
<label for="memberDays" class="form-label">质押周期 (天)</label>
<select class="form-select" id="memberDays">
<option value="30">30</option>
<option value="90">90</option>
<option value="180">180</option>
<option value="360">360</option>
<option value="720" selected>720</option>
</select>
</div>
<div class="col-md-4">
<label for="mbcPrice" class="form-label">MBC 价格 (U)</label>
<input type="number" class="form-control" id="mbcPrice" value="0.02">
</div>
<!-- 折叠输入区域 -->
<div class="col-12">
<button class="btn btn-link" type="button" data-bs-toggle="collapse" data-bs-target="#platformData" aria-expanded="false" aria-controls="platformData">
📉 平台参数设置
</button>
<div class="collapse" id="platformData">
<div class="row">
<div class="col-md-4">
<label for="burnedNuts" class="form-label">平台今日燃烧 Nuts 总数</label>
<input type="number" class="form-control" id="burnedNuts" value="1000000">
</div>
<div class="col-md-4">
<label for="globalProfit" class="form-label">平台季度利润总额 (U)</label>
<input type="number" class="form-control" id="globalProfit" value="3000000">
</div>
<div class="col-md-4">
<label for="totalAgents" class="form-label">平台季度分红人数</label>
<input type="number" class="form-control" id="totalAgents" value="10">
</div>
</div>
</div>
</div>
<div class="col-12">
<button type="button" class="btn btn-primary" onclick="calculateEarnings()">开始模拟</button>
</div>
</form>
<div id="results" class="card p-4"></div>
<div class="chart-container mt-4">
<div class="chart-box">
<canvas id="rewardPie"></canvas>
</div>
<div class="chart-box">
<canvas id="investmentPie"></canvas>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
<script>
const VIP_LEVELS = {
PC: { stake: 100, power_direct: 0, power_indirect: 0, dividend: 0 },
VIP1: { stake: 500, power_direct: 0.08, power_indirect: 0, dividend: 0 },
VIP2: { stake: 2000, power_direct: 0.13, power_indirect: 0.06, dividend: 0 },
VIP3: { stake: 10000, power_direct: 0.16, power_indirect: 0.10, dividend: 0 },
VIP4: { stake: 25000, power_direct: 0.20, power_indirect: 0.14, dividend: 0.01 },
VIP5: { stake: 50000, power_direct: 0.26, power_indirect: 0.17, dividend: 0.03 },
VIP6: { stake: 150000, power_direct: 0.35, power_indirect: 0.20, dividend: 0.05 }
};
const PARTNER_LEVELS = {
"机构合伙人": 0.10,
"一级合伙人": 0.08,
"二级合伙人": 0.05,
"无": 0.00
};
const HASHBANK_APY = {
30: 1.83,
90: 7.5,
180: 17.5,
360: 40.0,
720: 90.0
};
function calculateEarnings() {
const vip = document.getElementById("vipLevel").value;
const partner = document.getElementById("partnerLevel").value;
const direct = Number(document.getElementById("directCount").value);
const stake = Number(document.getElementById("memberStake").value);
const days = Number(document.getElementById("memberDays").value);
const mbcPrice = Number(document.getElementById("mbcPrice").value);
const nutsBurned = Number(document.getElementById("burnedNuts").value);
const profit = Number(document.getElementById("globalProfit").value);
const agents = Number(document.getElementById("totalAgents").value);
const vipCfg = VIP_LEVELS[vip];
const indirect = direct * direct;
const team = (direct + indirect) * 10;
const memberApy = HASHBANK_APY[days];
const memberTotal = stake * memberApy / 100;
const memberDaily = memberTotal / days;
const directReward = direct * memberDaily * vipCfg.power_direct;
const indirectReward = indirect * memberDaily * vipCfg.power_indirect;
const totalReward = directReward + indirectReward;
const nuts = totalReward * 1000;
const mbc = nuts / nutsBurned * 800000;
const nutToMbcRate = mbc / nuts;
const directU = directReward * 1000 * nutToMbcRate * mbcPrice;
const indirectU = indirectReward * 1000 * nutToMbcRate * mbcPrice;
const promotionU = directU + indirectU;
const myStake = vipCfg.stake;
const myHashbank = myStake * HASHBANK_APY[days] / 100;
const myHashbankDaily = myHashbank / days;
const partnerFee = team * memberDaily * PARTNER_LEVELS[partner];
const quarterBonus = profit * vipCfg.dividend / agents;
const quarterDaily = quarterBonus / 90;
const dailyTotal = promotionU + myHashbankDaily + partnerFee + quarterDaily;
const annual = dailyTotal * 360;
const roiAnnual = (annual / myStake * 100).toFixed(2);
document.getElementById("results").innerHTML = `
<h5>📊 每日收益模拟</h5>
<p>您的VIP等级: ${vip}</p>
<p>直推人数: ${direct}, 间推人数: ${indirect} (比例 1:${(indirect / direct).toFixed(1)})</p>
<p>全团队人数: ${team}</p>
<p>每位会员每日收益: $${memberDaily.toFixed(2)}</p>
<p>MBC/Nuts 汇率: ${nutToMbcRate.toFixed(6)}</p>
<hr>
<p><strong>直推奖励:</strong> $${directReward.toFixed(2)} → MBC价值 $${directU.toFixed(2)}</p>
<p><strong>间推奖励:</strong> $${indirectReward.toFixed(2)} → MBC价值 $${indirectU.toFixed(2)}</p>
<p><strong>季度分红:</strong> $${quarterDaily.toFixed(2)}</p>
<p><strong>合伙人服务费:</strong> $${partnerFee.toFixed(2)}</p>
<hr>
<p><strong>自己 hashbank 收益 (日):</strong> $${myHashbankDaily.toFixed(2)}</p>
<p class="highlight">每日综合收益: $${dailyTotal.toFixed(2)}</p>
<p><strong>年度总收益:</strong> $${annual.toFixed(2)}</p>
<p><strong>年度 ROI 回报率:</strong> ${roiAnnual}%</p>
`;
const pieData = {
labels: ["直推奖励", "间推奖励", "季度分红", "合伙人服务费", "质押日收益"],
datasets: [{
data: [directU, indirectU, quarterDaily, partnerFee, myHashbankDaily],
backgroundColor: ["#ff6384", "#36a2eb", "#ffcd56", "#4bc0c0", "#9966ff"],
}]
};
const pieOptions = {
plugins: {
datalabels: {
formatter: (value, ctx) => `${ctx.chart.data.labels[ctx.dataIndex]}\n${(value / dailyTotal * 100).toFixed(1)}%`,
color: '#000',
anchor: 'end',
align: 'start'
},
tooltip: {
callbacks: {
label: ctx => `${ctx.label}: $${ctx.raw.toFixed(2)}`
}
}
}
};
new Chart(document.getElementById("rewardPie"), {
type: "pie",
data: pieData,
options: pieOptions,
plugins: [ChartDataLabels]
});
new Chart(document.getElementById("investmentPie"), {
type: "pie",
data: {
labels: ["投入质押", "年度总收益"],
datasets: [{
data: [myStake, annual],
backgroundColor: ["#888", "#28a745"]
}]
},
options: pieOptions,
plugins: [ChartDataLabels]
});
}
</script>
</body>
</html>