Browse Source

GAMMA调整,更快速度归位

skyfffire 2 tháng trước cách đây
mục cha
commit
7bada564e1
2 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 2 2
      checker/c_erc20_to_mexc.py
  2. 1 1
      checker/c_mexc_to_erc20.py

+ 2 - 2
checker/c_erc20_to_mexc.py

@@ -81,7 +81,7 @@ TARGET_ASSET_SYMBOL = CEX_TARGET_PAIR_USDT.split('_')[0] # e.g., RATO
 BASE_CURRENCY_SYMBOL = CEX_TARGET_PAIR_USDT.split('_')[1] # e.g., USDT (assumed to be consistent with IN_TOKEN_ADDRESS)
 
 # 价差与平均价差
-GAMMA = decimal.Decimal(0.9999)
+GAMMA = decimal.Decimal(0.999)
 GAMMA_1 = decimal.Decimal(0.99)
 spread_ema = decimal.Decimal(0)
 count = decimal.Decimal(0)
@@ -318,7 +318,7 @@ def update_data_for_plotly_and_table():
                 spread_ema = spread_ema * GAMMA_1 + spread * (decimal.Decimal(1) - GAMMA_1)
         else:
             spread_ema = spread_ema * GAMMA + spread * (decimal.Decimal(1) - GAMMA)
-        # dex_price = dex_price - spread_ema
+        dex_price = dex_price - spread_ema
 
         # 4. 计算百分比差异
         # diff = (CEX卖价 - 链上买价) / 链上买价

+ 1 - 1
checker/c_mexc_to_erc20.py

@@ -75,7 +75,7 @@ TARGET_ASSET_SYMBOL = CEX_TARGET_PAIR_USDT.split('_')[0] # e.g., RATO
 BASE_CURRENCY_SYMBOL = CEX_TARGET_PAIR_USDT.split('_')[1] # e.g., USDT (assumed to be consistent with IN_TOKEN_ADDRESS)
 
 # 价差与平均价差
-GAMMA = decimal.Decimal(0.9999)
+GAMMA = decimal.Decimal(0.999)
 GAMMA_1 = decimal.Decimal(0.99)
 spread_ema = decimal.Decimal(0)
 count = decimal.Decimal(0)