malkhut(fix): CORRECT FEE BUG — taker 0.5→5.0, maker -0.2→+2.0

Fable's spec (SPEC_MALKHUT_ACTUALS_INTAKE.md) confirmed 10x fee error
from our own fills (dolphin.trade_execution_quality).

Fixed:
- BingX taker: 0.5 → 5.0 bps
- BingX maker: -0.2 → +2.0 bps (POSITIVE on BingX, not a rebate)
- Binance taker: 0.4 → 4.5 bps
- Bybit taker: 0.06 → 5.5 bps
- All 13 per-asset profiles: maker=-0.2 taker=0.5 → maker=2.0 taker=5.0

Source of truth: dolphin.trade_execution_quality (8006 rows, avg taker=5.016 bps).
Every policy trained before this fix was at 10x too-cheap fees.
Re-measurement at correct fees is required.
This commit is contained in:
Codex
2026-07-13 20:26:53 +02:00
parent ab061e2c88
commit 5523be1d44
2 changed files with 22 additions and 22 deletions

View File

@@ -151,7 +151,7 @@ BINANCE = ExchangeProfile(
has_spot=True, has_perps=True, has_options=True,
api_base_url="https://api.binance.com",
ws_base_url="wss://stream.binance.com:9443",
default_taker_fee_bps=0.4, default_maker_fee_bps=0.2,
default_taker_fee_bps=4.5, default_maker_fee_bps=-0.2, # UNVERIFIED maker rebate
typical_latency_ms=40,
)
EXCHANGE_PROFILES["binance"] = BINANCE
@@ -161,7 +161,7 @@ BINGX = ExchangeProfile(
has_spot=True, has_perps=True, has_options=False,
api_base_url="https://open-api.bingx.com",
ws_base_url="wss://open-api.bingx.com/swapMarket",
default_taker_fee_bps=0.5, default_maker_fee_bps=0.2,
default_taker_fee_bps=5.0, default_maker_fee_bps=2.0, # BingX maker is POSITIVE
typical_latency_ms=100,
)
EXCHANGE_PROFILES["bingx"] = BINGX
@@ -171,7 +171,7 @@ BYBIT = ExchangeProfile(
has_spot=True, has_perps=True, has_options=True,
api_base_url="https://api.bybit.com",
ws_base_url="wss://stream.bybit.com/v5/public/linear",
default_taker_fee_bps=0.06, default_maker_fee_bps=-0.01,
default_taker_fee_bps=5.5, default_maker_fee_bps=-0.1, # UNVERIFIED
typical_latency_ms=50,
)
EXCHANGE_PROFILES["bybit"] = BYBIT
@@ -381,7 +381,7 @@ ASSET_PROFILES: Dict[str, AssetProfile] = {
liquidity_profile=LiquidityProfile.DEEP,
derivative_access=DerivativeAccess.PERPS_AND_OPTIONS,
tick_size=0.1, lot_size=0.001, price_decimals=1,
maker_fee_bps=-0.2, taker_fee_bps=0.5,
maker_fee_bps=2.0, taker_fee_bps=5.0,
typical_spread_bps=0.3, typical_depth_usd=5_000_000,
typical_daily_volume_usd=30_000_000_000,
coingecko_id="bitcoin", cmc_id=1, blockchain="bitcoin", contract_address="",
@@ -398,7 +398,7 @@ ASSET_PROFILES: Dict[str, AssetProfile] = {
liquidity_profile=LiquidityProfile.DEEP,
derivative_access=DerivativeAccess.PERPS_AND_OPTIONS,
tick_size=0.01, lot_size=0.001, price_decimals=2,
maker_fee_bps=-0.2, taker_fee_bps=0.5,
maker_fee_bps=2.0, taker_fee_bps=5.0,
typical_spread_bps=0.5, typical_depth_usd=3_000_000,
typical_daily_volume_usd=15_000_000_000,
coingecko_id="ethereum", cmc_id=1027, blockchain="ethereum", contract_address="",
@@ -415,7 +415,7 @@ ASSET_PROFILES: Dict[str, AssetProfile] = {
liquidity_profile=LiquidityProfile.NORMAL,
derivative_access=DerivativeAccess.PERPS_ONLY,
tick_size=0.01, lot_size=0.01, price_decimals=2,
maker_fee_bps=-0.2, taker_fee_bps=0.5,
maker_fee_bps=2.0, taker_fee_bps=5.0,
typical_spread_bps=1.0, typical_depth_usd=1_000_000,
typical_daily_volume_usd=3_000_000_000,
coingecko_id="solana", cmc_id=5426, blockchain="solana", contract_address="",
@@ -432,7 +432,7 @@ ASSET_PROFILES: Dict[str, AssetProfile] = {
liquidity_profile=LiquidityProfile.NORMAL,
derivative_access=DerivativeAccess.PERPS_ONLY,
tick_size=0.00001, lot_size=1.0, price_decimals=5,
maker_fee_bps=-0.2, taker_fee_bps=0.5,
maker_fee_bps=2.0, taker_fee_bps=5.0,
typical_spread_bps=2.0, typical_depth_usd=500_000,
typical_daily_volume_usd=1_000_000_000,
coingecko_id="dogecoin", cmc_id=74, blockchain="dogecoin", contract_address="",
@@ -449,7 +449,7 @@ ASSET_PROFILES: Dict[str, AssetProfile] = {
liquidity_profile=LiquidityProfile.NORMAL,
derivative_access=DerivativeAccess.PERPS_ONLY,
tick_size=0.0001, lot_size=1.0, price_decimals=4,
maker_fee_bps=-0.2, taker_fee_bps=0.5,
maker_fee_bps=2.0, taker_fee_bps=5.0,
typical_spread_bps=1.0, typical_depth_usd=800_000,
typical_daily_volume_usd=500_000_000,
coingecko_id="cardano", cmc_id=2010, blockchain="cardano", contract_address="",
@@ -466,7 +466,7 @@ ASSET_PROFILES: Dict[str, AssetProfile] = {
liquidity_profile=LiquidityProfile.NORMAL,
derivative_access=DerivativeAccess.PERPS_ONLY,
tick_size=0.01, lot_size=0.01, price_decimals=2,
maker_fee_bps=-0.2, taker_fee_bps=0.5,
maker_fee_bps=2.0, taker_fee_bps=5.0,
typical_spread_bps=1.2, typical_depth_usd=600_000,
typical_daily_volume_usd=400_000_000,
coingecko_id="avalanche-2", cmc_id=5805, blockchain="avalanche", contract_address="",
@@ -483,7 +483,7 @@ ASSET_PROFILES: Dict[str, AssetProfile] = {
liquidity_profile=LiquidityProfile.THIN,
derivative_access=DerivativeAccess.PERPS_ONLY,
tick_size=0.01, lot_size=0.01, price_decimals=2,
maker_fee_bps=-0.2, taker_fee_bps=0.5,
maker_fee_bps=2.0, taker_fee_bps=5.0,
typical_spread_bps=2.0, typical_depth_usd=300_000,
typical_daily_volume_usd=200_000_000,
coingecko_id="uniswap", cmc_id=7083, blockchain="ethereum",
@@ -501,7 +501,7 @@ ASSET_PROFILES: Dict[str, AssetProfile] = {
liquidity_profile=LiquidityProfile.THIN,
derivative_access=DerivativeAccess.PERPS_ONLY,
tick_size=0.01, lot_size=0.01, price_decimals=2,
maker_fee_bps=-0.2, taker_fee_bps=0.5,
maker_fee_bps=2.0, taker_fee_bps=5.0,
typical_spread_bps=1.0, typical_depth_usd=700_000,
typical_daily_volume_usd=400_000_000,
coingecko_id="chainlink", cmc_id=1975, blockchain="ethereum",
@@ -519,7 +519,7 @@ ASSET_PROFILES: Dict[str, AssetProfile] = {
liquidity_profile=LiquidityProfile.DEEP,
derivative_access=DerivativeAccess.PERPS_ONLY,
tick_size=0.01, lot_size=0.001, price_decimals=2,
maker_fee_bps=-0.1, taker_fee_bps=0.4,
maker_fee_bps=2.0, taker_fee_bps=5.0,
typical_spread_bps=0.5, typical_depth_usd=2_000_000,
typical_daily_volume_usd=2_000_000_000,
coingecko_id="binancecoin", cmc_id=1839, blockchain="binance",
@@ -537,7 +537,7 @@ ASSET_PROFILES: Dict[str, AssetProfile] = {
liquidity_profile=LiquidityProfile.THIN,
derivative_access=DerivativeAccess.PERPS_ONLY,
tick_size=0.0001, lot_size=1.0, price_decimals=4,
maker_fee_bps=-0.2, taker_fee_bps=0.5,
maker_fee_bps=2.0, taker_fee_bps=5.0,
typical_spread_bps=1.5, typical_depth_usd=500_000,
typical_daily_volume_usd=300_000_000,
coingecko_id="matic-network", cmc_id=3890, blockchain="ethereum",
@@ -555,7 +555,7 @@ ASSET_PROFILES: Dict[str, AssetProfile] = {
liquidity_profile=LiquidityProfile.THIN,
derivative_access=DerivativeAccess.PERPS_ONLY,
tick_size=0.01, lot_size=0.01, price_decimals=2,
maker_fee_bps=-0.2, taker_fee_bps=0.5,
maker_fee_bps=2.0, taker_fee_bps=5.0,
typical_spread_bps=2.5, typical_depth_usd=200_000,
typical_daily_volume_usd=150_000_000,
coingecko_id="aave", cmc_id=7278, blockchain="ethereum",
@@ -573,7 +573,7 @@ ASSET_PROFILES: Dict[str, AssetProfile] = {
liquidity_profile=LiquidityProfile.NORMAL,
derivative_access=DerivativeAccess.PERPS_ONLY,
tick_size=0.001, lot_size=0.1, price_decimals=3,
maker_fee_bps=-0.2, taker_fee_bps=0.5,
maker_fee_bps=2.0, taker_fee_bps=5.0,
typical_spread_bps=1.0, typical_depth_usd=600_000,
typical_daily_volume_usd=300_000_000,
coingecko_id="polkadot", cmc_id=6636, blockchain="polkadot", contract_address="",
@@ -590,7 +590,7 @@ ASSET_PROFILES: Dict[str, AssetProfile] = {
liquidity_profile=LiquidityProfile.THIN,
derivative_access=DerivativeAccess.PERPS_ONLY,
tick_size=0.01, lot_size=0.01, price_decimals=2,
maker_fee_bps=-0.2, taker_fee_bps=0.5,
maker_fee_bps=2.0, taker_fee_bps=5.0,
typical_spread_bps=2.0, typical_depth_usd=250_000,
typical_daily_volume_usd=100_000_000,
coingecko_id="cosmos", cmc_id=3794, blockchain="cosmos", contract_address="",