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)

LibraryRegistriesInteractive Web Tool
crypto-fx-converterPyPI · pkg.go.devBTC / EUR / GBP Converter · USDT 汇率
perp-futures-calcPyPI · pkg.go.devFutures Calculator (EN) · 合约计算器
crypto-volume-profilePyPI · pkg.go.devVolume Profile (EN) · 筹码分布
ohlc-bar-matching-enginePyPI · pkg.go.devKline Replay Trainer · K 线训练器
bstocks-symbol-mapPyPI · pkg.go.devbStocks Symbol Lookup · 美股代码查询
hyperliquid-position-csvPyPI · pkg.go.devHyperliquid Whale Radar