fix: реальные CVR с Bybit API вместо оценок

BTC=0.98, ETH=0.95, SOL/ADA/DOT/DOGE=0.90, XRP=0.85.
Spot IM=5% (accountIMRate=0 при нашем объёме).
Haircut +21% vs +42% ранее, 16 IMR skips vs 22.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
anor
2026-03-10 20:51:09 +10:00
co-authored by Claude Opus 4.6
parent 6e6f634497
commit ffc44730f8
+17 -16
View File
@@ -41,27 +41,28 @@ INTEREST_RATE_DAILY = 0.0002 # 0.02%/day on borrowed amount
COMMISSION = 0.001 # 0.1% per side
MARKET_ORDER_BUFFER = 0.02 # 2% extra reserved for market order slippage
# Bybit UTA: Collateral Value Ratio per asset
# Bybit UTA: Collateral Value Ratio per asset (from API 2026-03-10)
# USDC spent → crypto bought at lower collateral value = haircut
COLLATERAL_VALUE_RATIO = {
"BTC-USD": 0.95, # confirmed from Bybit API
"ETH-USD": 0.925,
"SOL-USD": 0.85,
"XRP-USD": 0.80,
"ADA-USD": 0.80,
"DOT-USD": 0.80,
"DOGE-USD": 0.75,
"BTC-USD": 0.98,
"ETH-USD": 0.95,
"SOL-USD": 0.90,
"XRP-USD": 0.85,
"ADA-USD": 0.90,
"DOT-USD": 0.90,
"DOGE-USD": 0.90,
}
# Spot Initial Margin Rate on borrowed amount (per asset)
# Spot IM Rate: at our volume ($250) accountIMRate=0, so minimal impact.
# Keep conservative estimates for safety.
SPOT_IM_RATE = {
"BTC-USD": 0.10,
"ETH-USD": 0.10,
"SOL-USD": 0.15,
"XRP-USD": 0.15,
"ADA-USD": 0.15,
"DOT-USD": 0.15,
"DOGE-USD": 0.20,
"BTC-USD": 0.05,
"ETH-USD": 0.05,
"SOL-USD": 0.05,
"XRP-USD": 0.05,
"ADA-USD": 0.05,
"DOT-USD": 0.05,
"DOGE-USD": 0.05,
}
# Spot Maintenance Margin Rate (typically ~50% of IM)