Fix fee tiers to match official Hyperliquid docs
Perps tiers 4-6 had wrong volume thresholds, taker rates, and incorrect negative maker rebates (HL only has rebates via staking). Changes (matching https://hyperliquid.gitbook.io/.../trading/fees): Tier 4: $250M→$500M vol, taker 0.025%→0.028% Tier 5: $750M→$2B vol, taker 0.020%→0.026%, maker -0.002%→0.000% Tier 6: $2.5B→$7B vol, taker 0.015%→0.024%, maker -0.004%→0.000% UI dropdown labels updated to match. Chart refresh enhanced with resize+fitContent after recalc for smooth transitions.
This commit is contained in:
+3
-3
@@ -16,9 +16,9 @@ PERPS_TIERS = {
|
|||||||
1: {"name": "VIP 1", "volume": 5_000_000, "taker": 0.00040, "maker": 0.00012},
|
1: {"name": "VIP 1", "volume": 5_000_000, "taker": 0.00040, "maker": 0.00012},
|
||||||
2: {"name": "VIP 2", "volume": 25_000_000, "taker": 0.00035, "maker": 0.00008},
|
2: {"name": "VIP 2", "volume": 25_000_000, "taker": 0.00035, "maker": 0.00008},
|
||||||
3: {"name": "VIP 3", "volume": 100_000_000,"taker": 0.00030, "maker": 0.00004},
|
3: {"name": "VIP 3", "volume": 100_000_000,"taker": 0.00030, "maker": 0.00004},
|
||||||
4: {"name": "VIP 4", "volume": 250_000_000,"taker": 0.00025, "maker": 0.00000},
|
4: {"name": "VIP 4", "volume": 500_000_000, "taker": 0.00028, "maker": 0.00000},
|
||||||
5: {"name": "VIP 5", "volume": 750_000_000,"taker": 0.00020, "maker": -0.00002},
|
5: {"name": "VIP 5", "volume": 2_000_000_000, "taker": 0.00026, "maker": 0.00000},
|
||||||
6: {"name": "VIP 6", "volume": 2_500_000_000,"taker":0.00015,"maker": -0.00004},
|
6: {"name": "VIP 6", "volume": 7_000_000_000, "taker": 0.00024, "maker": 0.00000},
|
||||||
}
|
}
|
||||||
|
|
||||||
# ── Spot fee tiers (base rates) ──
|
# ── Spot fee tiers (base rates) ──
|
||||||
|
|||||||
@@ -166,9 +166,9 @@ footer a{color:#3f3f4a;text-decoration:none}footer a:hover{color:var(--tx)}
|
|||||||
<option value="1">VIP 1 (0.040/0.012%)</option>
|
<option value="1">VIP 1 (0.040/0.012%)</option>
|
||||||
<option value="2">VIP 2 (0.035/0.008%)</option>
|
<option value="2">VIP 2 (0.035/0.008%)</option>
|
||||||
<option value="3">VIP 3 (0.030/0.004%)</option>
|
<option value="3">VIP 3 (0.030/0.004%)</option>
|
||||||
<option value="4">VIP 4 (0.025/0.000%)</option>
|
<option value="4">VIP 4 (0.028/0.000%)</option>
|
||||||
<option value="5">VIP 5 (0.020/-0.002%)</option>
|
<option value="5">VIP 5 (0.026/0.000%)</option>
|
||||||
<option value="6">VIP 6 (0.015/-0.004%)</option>
|
<option value="6">VIP 6 (0.024/0.000%)</option>
|
||||||
</select>
|
</select>
|
||||||
<select id="stake-tier-sel" style="display:none;font-size:10px;background:var(--srf);color:var(--hi);border:1px solid var(--ln);border-radius:4px;padding:3px 6px;font-family:var(--f)" onchange="onFeeTierChange()">
|
<select id="stake-tier-sel" style="display:none;font-size:10px;background:var(--srf);color:var(--hi);border:1px solid var(--ln);border-radius:4px;padding:3px 6px;font-family:var(--f)" onchange="onFeeTierChange()">
|
||||||
<option value="none">No Stake</option>
|
<option value="none">No Stake</option>
|
||||||
@@ -323,7 +323,7 @@ function renderBTDetail(full){
|
|||||||
if(!detChart)initDetChart();
|
if(!detChart)initDetChart();
|
||||||
var pts=[],curve=full.equity_curve||[];
|
var pts=[],curve=full.equity_curve||[];
|
||||||
for(var i=0;i<curve.length;i++){if(curve[i]&&curve[i].t)var ct=curve[i].t;if(typeof ct==="string")ct=Math.floor(new Date(ct).getTime()/1000);pts.push({time:ct,value:curve[i].v})}
|
for(var i=0;i<curve.length;i++){if(curve[i]&&curve[i].t)var ct=curve[i].t;if(typeof ct==="string")ct=Math.floor(new Date(ct).getTime()/1000);pts.push({time:ct,value:curve[i].v})}
|
||||||
if(pts.length>0){detSer.setData(pts);detChart.timeScale().fitContent();setTimeout(function(){detChart.timeScale().fitContent()},200)}
|
if(pts.length>0){detSer.setData(pts);detChart.timeScale().fitContent();setTimeout(function(){if(detChart){detChart.timeScale().fitContent();detChart.applyOptions({width:document.getElementById('det-chart').offsetWidth,height:280})}},250)}
|
||||||
// Trades table (show pnl_net or pnl_gross based on toggle)
|
// Trades table (show pnl_net or pnl_gross based on toggle)
|
||||||
var trows='',tlist=full.trades||[];
|
var trows='',tlist=full.trades||[];
|
||||||
for(var j=Math.max(0,tlist.length-100);j<tlist.length;j++){
|
for(var j=Math.max(0,tlist.length-100);j<tlist.length;j++){
|
||||||
|
|||||||
Reference in New Issue
Block a user