Dynamic Collateral Control for Permissionless Spot Perpetual Basis Trading
Authors: Anatoly Krestenko, Mikhail Butov, Rostislav Berezovskiy, Danila Bolotin (2026) Source: arXiv:2605.05089 (preprint, công bố 06/05/2026) Tag:
moi:2026-05-16#crypto-perp#basis-trading#collateral#funding-rate#defi#preprint
Ý tưởng cốt lõi
Paper xử lý bài toán cốt lõi của carry trade trên crypto: bạn long spot (BTC/ETH/altcoin), short perpetual cùng đồng để delta-neutral, ăn funding khi funding > 0. Vấn đề thực tế — và là vấn đề mà 90% retail làm sai — là phân bổ vốn giữa spot inventory và margin perp như thế nào cho tối ưu. Phân quá nhiều cho margin → tốn cơ hội ăn spot upside và giảm hiệu suất basis; phân quá ít → bị liquidation khi giá pump mạnh. Tác giả formal hoá đây là một collateral control problem với trois résultats:
Thứ nhất, lời giải static: tìm collateral share (γ = margin/(spot + margin)) tối ưu khi cố định khung điều kiện thị trường. So sánh giữa "economic optimum" (max expected return) và "risk-constrained optimum" (max return subject to VaR constraint), tác giả cho thấy risk-constrained robust hơn nhiều — đặc biệt khi vol stress test. Collateral cần thiết thấp nhất với BTC, tăng đáng kể với long-tail như LINK và DOGE (vol cao + funding spike thường xuyên).
Thứ hai, lời giải dynamic: thay vì giữ γ cố định, tác giả derive một control rule asymmetric với hai biên — biên dưới được lái bởi solvency (chống liquidation), biên trên bị lái bởi trade-off giữa carry loss (vì giữ quá nhiều margin) và rebalancing cost. Monte Carlo cho thấy biên dưới luôn relevant; biên trên chỉ matter trong regime carry cao + cost thấp (tức là khi funding bull-market rõ rệt).
Thứ ba, execution layer: backtest live routed execution cho thấy realized wedge (chênh lệch giữa giả định và thực tế) rất đáng kể, đặc biệt tệ khi sell basis (close short perp + close long spot khi unwind). Điều này biện minh cho minimum effective rebalance size và execution buffer dương — không rebalance chỉ vì γ drift 1 điểm phần trăm. Performance cuối ngày, khi áp dụng fixed rule, bị funding environment chi phối: bạn không tạo alpha bằng rule, bạn ăn carry — vai trò của rule là giảm slippage và prevent blow-up.
Ứng dụng giao dịch chính
Trade core: long spot X, short perp X cùng size USD-neutral, ăn funding khi positive. Công thức γ tối ưu (xấp xỉ Krestenko et al.):
γ* = clip(L_target × σ_funding × √T_holding / σ_price, γ_floor, γ_ceil)Trong đó:
L_target: leverage mục tiêu (1×–3× notional perp / margin),σ_funding: vol của funding rate annualized,σ_price: vol giá spot annualized,T_holding: holding horizon (năm), thường 1 funding cycle ~1/1095 cho 8h.γ_floor: ngưỡng solvency tối thiểu — thường 0.15-0.25 cho BTC, 0.30-0.40 cho altcoin.γ_ceil: trần ngăn carry loss — thường 0.55-0.70.
Logic dynamic rule:
- Khi γ realized < γ_floor + ε → bơm thêm margin (sell một phần spot).
- Khi γ realized > γ_ceil + δ AND carry điều kiện thỏa → withdraw margin (mua thêm spot).
- KHÔNG rebalance nếu ∆γ <
min_rebalance_band(thường 3-5 điểm phần trăm) để tránh execution cost ăn carry.
Trigger emergency: nếu mark price perp tiếp cận liquidation price ở leverage 5× hiện hành → forced inject margin từ reserve.
Áp dụng đa thị trường
VN30F (Hợp đồng tương lai chỉ số Việt Nam)
VN30F không có funding rate (đây là futures truyền thống, không phải perpetual), nên basis trading kiểu paper không port trực tiếp. Tuy vậy, ý tưởng collateral control có ứng dụng quan trọng: VN30F có cơ chế margin requirement IM/MM mà nhà đầu tư cần quản lý dưới regime volatility:
- Khi VN-Index spike vol (>2.5% intraday), HOSE/VSD thường tăng IM. Trader basis spot-future VN30 (long VN30 basket, short VN30F1M) cần buffer margin.
- Áp dụng cùng logic γ_floor: giữ ratio Margin/(Spot + Margin) ≥ 0.25 để chống forced liquidation khi vol spike.
- Cảnh báo: cơ chế quyết toán VN30F là cash-settled tại ngày đáo hạn theo VN30 close — không có funding flow liên tục, nên revenue source duy nhất là basis convergence + alpha từ basket selection.
- Spread basis (F − S) trên VN30F thường ±15-30 điểm; ở regime contango nhẹ có thể cash-and-carry, nhưng phí vay margin lending để long basket > carry → chiến lược chỉ profitable cho member CTCK có cost vốn ưu đãi.
US equity futures (ES, NQ, RTY, YM, MNQ)
Tương tự VN30F, ES/NQ là quarterly-expiry futures không phải perp, nên basis trade kiểu paper chỉ áp dụng được cho calendar spread (mua near-month, bán far-month theo expectation contango/backwardation). Tuy nhiên:
- Trên CME, có "Equity Index Total Return Futures" (TRF) là perpetual-like với dividend & funding embedded → có thể test collateral control rule trực tiếp.
- Cross-market basis arb: long SPY ETF (spot), short ES future → đây là cash-and-carry truyền thống. Margin SPAN cho ES ~$13,000/contract, cần áp dụng γ_floor ≥ 0.20 để vượt qua các stress event (vd: -7% intraday).
- Funding rate proxy = (Futures price − Spot index) / Spot × 365 / days_to_expiry → tính carry similarly.
Crypto spot (BTC, ETH, altcoins)
Đây không phải target market chính của paper, nhưng logic γ-control vẫn hữu ích cho margin lending spot (vay USDT để long thêm spot):
- Trên Aave/Compound, LTV của BTC ~75% → γ_floor = 1 - LTV = 0.25 là kim chỉ nam tối thiểu.
- Khi vol spike, bot rebalance phải hành động trước khi oracle health factor xuống dưới 1.0.
- Strategy "spot + lending" không có funding income, chỉ có lending yield 2-8% USDT — kết hợp với basis trade để tăng IRR tổng.
Crypto perpetual futures
Đây là target chính của paper. Cách triển khai trên Binance/Bybit/Hyperliquid:
- Setup: deposit 1000 USDT, mua 0.5 BTC (~50% = spot leg), giữ 500 USDT làm margin cho short BTC-PERP 0.5 BTC (~3× leverage perp leg).
- γ ban đầu = 500 / (500 spot value + 500 margin) ≈ 0.50.
- Khi giá BTC pump 20%, spot value tăng 600, short perp lỗ ~100 → margin còn 400. γ = 400 / (600 + 400) = 0.40. Vẫn an toàn nhưng đã drift.
- Nếu γ giảm xuống 0.30 → bán bớt 0.05 BTC spot, chuyển USDT vào margin để khôi phục γ ≈ 0.45.
- Nếu γ tăng lên 0.65 (do giá giảm + funding tích cực) → rút bớt margin, mua thêm spot.
Lưu ý execution:
- Trên DEX (Hyperliquid, Drift, dYdX), slippage market order >$100k thường 0.05-0.20%, đáng kể với basis 0.05% mỗi 8h.
- Funding rate có thể flip âm → strategy trở thành drag thay vì carry → cần exit rule khi funding < -0.005% per 8h trong 3 cycles liên tiếp.
- Liquidation risk lớn nhất: long-tail altcoin trong sự kiện exchange depeg (vd: ENA depeg event 2024). Đừng dùng cùng γ cho BTC và DOGE.
Cân nhắc cross-market chung
- Risk-constrained luôn beat economic optimum dài hạn: max expected return trên paper trade thường blow-up trong real.
- Execution buffer là hàm bậc nhất của cost / carry: khi carry cao (10%+ APR), buffer có thể nới rộng; khi carry thấp (1-3%), buffer phải hẹp gần với threshold (tránh ăn cost).
- Asymmetric rule chỉ matter khi bạn quan tâm tới upper bound; nếu chỉ chống blow-up, đặt một lower threshold strict là đủ.
- Cross-asset: nếu chạy basis BTC + ETH + SOL song song, pooled collateral (cross-margin) giảm γ_floor tổng vì correlation cao — nhưng tăng tail risk khi tất cả pump cùng lúc.
- Hedging perp bằng option (long OTM call) là cách tinh tế hơn để cap upside risk thay vì raise γ — paper không cover, nhưng đây là next-step rõ ràng.
Minh họa Python
Code dưới mô phỏng dynamic collateral control rule của Krestenko trên 1 cặp BTC spot + BTC-PERP, dùng dữ liệu giá + funding mô phỏng. Có thể thay bằng dữ liệu Binance/Hyperliquid thật.
# Dynamic Collateral Control cho basis spot-perp
# Theo Krestenko et al. (2026), arXiv:2605.05089
# Yêu cầu: numpy, pandas
import numpy as np
import pandas as pd
def simulate_basis_position(
price: pd.Series,
funding_8h: pd.Series,
init_capital: float = 10_000.0,
gamma_target: float = 0.45,
gamma_floor: float = 0.20,
gamma_ceil: float = 0.65,
min_rebalance_band: float = 0.05,
rebalance_cost_bps: float = 5.0, # 0.05% mỗi side
funding_drag_threshold: float = -0.005 / 100, # exit nếu funding âm 3 cycle liên tiếp
) -> pd.DataFrame:
"""
Mô phỏng chiến lược long spot + short perp với collateral control động.
price: Series giá BTC theo step 8h.
funding_8h: Series funding rate theo step 8h (đã decimal: 0.0001 = 0.01%).
"""
assert price.index.equals(funding_8h.index), "Index phải khớp"
# Khởi tạo
cash_usd = init_capital
p0 = price.iloc[0]
margin_usd = cash_usd * gamma_target
spot_btc = (cash_usd - margin_usd) / p0
perp_short_btc = spot_btc # delta-neutral
perp_entry = p0
rows = []
neg_funding_streak = 0
exited = False
for t, (px, fund) in enumerate(zip(price.values, funding_8h.values)):
if exited:
rows.append(dict(time=price.index[t], status="EXITED"))
continue
# PnL perp short từ giá: short kiếm khi giá giảm
perp_pnl_usd = -perp_short_btc * (px - perp_entry)
margin_now = margin_usd + perp_pnl_usd
# Funding payment: short nhận khi funding > 0
funding_pnl = perp_short_btc * px * fund
margin_now += funding_pnl
# Spot value
spot_value = spot_btc * px
# Total equity và gamma realized
equity = spot_value + margin_now
gamma = margin_now / equity if equity > 0 else 0.0
# Check liquidation hard-stop: nếu margin xuống dưới 5% mark price * size → liquidate
liq_buffer = perp_short_btc * px * 0.05
if margin_now < liq_buffer:
exited = True
rows.append(
dict(
time=price.index[t],
status="LIQUIDATED",
price=px,
gamma=gamma,
equity=equity,
)
)
continue
# Funding regime check: exit nếu funding âm liên tiếp
if fund < funding_drag_threshold:
neg_funding_streak += 1
else:
neg_funding_streak = 0
if neg_funding_streak >= 3:
# Unwind: bán spot, đóng short
cost = (spot_value + margin_now) * rebalance_cost_bps / 10_000
final_equity = spot_value + margin_now - cost
exited = True
rows.append(
dict(
time=price.index[t],
status="EXIT_FUNDING_DRAG",
price=px,
gamma=gamma,
equity=final_equity,
)
)
continue
# Asymmetric rebalance rule
action = "HOLD"
if gamma < gamma_floor + min_rebalance_band:
# Bán bớt spot, chuyển USD vào margin
target_margin = gamma_target * equity
delta = target_margin - margin_now
if delta > 0:
btc_to_sell = delta / px
spot_btc -= btc_to_sell
spot_value = spot_btc * px
margin_now += delta
cost = delta * rebalance_cost_bps / 10_000
margin_now -= cost
action = "INJECT_MARGIN"
elif gamma > gamma_ceil - min_rebalance_band:
# Rút margin, mua thêm spot
target_margin = gamma_target * equity
delta = margin_now - target_margin
if delta > 0:
spot_btc += delta / px
spot_value = spot_btc * px
margin_now -= delta
cost = delta * rebalance_cost_bps / 10_000
margin_now -= cost
action = "WITHDRAW_MARGIN"
# Re-hedge: short thêm/đóng bớt perp về delta-neutral
perp_short_btc = spot_btc
perp_entry = px # reset entry sau rebalance
# Snapshot
margin_usd = margin_now
equity = spot_value + margin_now
gamma = margin_now / equity if equity > 0 else 0.0
rows.append(
dict(
time=price.index[t],
status="OK",
price=px,
funding=fund,
spot_btc=spot_btc,
margin_usd=margin_now,
gamma=gamma,
equity=equity,
action=action,
)
)
return pd.DataFrame(rows).set_index("time")
if __name__ == "__main__":
# Sinh dữ liệu BTC 8h giả lập 90 ngày
rng = np.random.default_rng(7)
n = 90 * 3 # 3 funding cycle/ngày
idx = pd.date_range("2026-02-01", periods=n, freq="8h", tz="UTC")
log_returns = rng.normal(0.0, 0.015, n) # vol ~1.5% mỗi 8h ~ annualized ~70%
price = pd.Series(60_000 * np.exp(np.cumsum(log_returns)), index=idx, name="price")
# Funding hơi positive trung bình + nhiễu (bull market giả định)
funding = pd.Series(rng.normal(0.0001, 0.00015, n), index=idx, name="funding")
result = simulate_basis_position(price, funding)
final = result.dropna(subset=["equity"]).iloc[-1]
print(f"Final equity: {final['equity']:.2f} USD")
print(f"Final status: {final['status']}")
print(f"Total rebalance actions: {(result['action'] != 'HOLD').sum()}")
print(f"Avg realized gamma: {result['gamma'].mean():.3f}")
print(f"Max gamma drift: {result['gamma'].max() - result['gamma'].min():.3f}")