Crypto Quant & Exchange Microstructure Notes
Concise, formula-first engineering notes, worked numerical tables, and open-source Python / Go / JavaScript reference implementations for crypto derivatives and spot settlement.
1. USDⓈ-M Perpetual Liquidation, MMR Brackets & Break-Even Math
Exact isolated and cross-margin liquidation equations, why 10× leverage liquidates at −9.64% rather than −10.00%, funding interval impact, and round-trip taker break-even formulas.
2. USDT Multi-Chain Withdrawal Basis Points & P2P Fiat Spread
Basis-point cost matrix across opBNB, BEP20, Arbitrum, Optimism, Polygon, Solana, ERC20, and TRC20, plus P2P FX quote premium decomposition across EUR, GBP, and CNY.
3. Tokenized US Equities (bStocks) Ticker & Perpetual Mapping
Structural comparison between regulated US shares, tokenized spot pairs (NVDAB, QQQB), and 24/7 USDT-margined equity perpetuals across 105 symbols.
4. OHLCV Volume Profile (POC / VAH / VAL) & Position Cycle Reconstruction
Triangular intrabar density estimation, turnover-decayed cost-basis chips, and flat-to-flat perpetual fill grouping using exact 18-decimal integer arithmetic.
5. Exchange Maker/Taker Schedules, BNB Discount & Rebate Stacking
Multiplicative fee reduction math combining VIP volume tiers, 25% BNB spot deduction, and permanent 20% referral rebates.
Open-Source Polyglot Libraries (MIT, Zero Dependencies)
| Library | Registries | Interactive Web Tool |
|---|---|---|
crypto-fx-converter | PyPI · pkg.go.dev | BTC / EUR / GBP Converter · USDT 汇率 |
perp-futures-calc | PyPI · pkg.go.dev | Futures Calculator (EN) · 合约计算器 |
crypto-volume-profile | PyPI · pkg.go.dev | Volume Profile (EN) · 筹码分布 |
ohlc-bar-matching-engine | PyPI · pkg.go.dev | Kline Replay Trainer · K 线训练器 |
bstocks-symbol-map | PyPI · pkg.go.dev | bStocks Symbol Lookup · 美股代码查询 |
hyperliquid-position-csv | PyPI · pkg.go.dev | Hyperliquid Whale Radar |