Skip to content

Instantly share code, notes, and snippets.

View yongkangc's full-sized avatar
🎃
Focusing

YK yongkangc

🎃
Focusing
View GitHub Profile
@yongkangc
yongkangc / mcuq_equity_curve_embed.html
Created February 18, 2026 14:47
MCUQ + Force Trending equity curve (Feb 11-18 2026)
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABLAAAASTCAIAAADle1MAAAAQAElEQVR4nOzdB3wTZ54//lGXLVnFRXKTjQtgMJhgQ8CQYHoNJQmQQkiW1P8m2d0ke3ebbEuye7fJ3t1m97ebcimEJJAGpAAJobcEDAHbwcbGgAu23CRZVrG6RtL/GUmu2GDABsv+vF/Z2cdfjUajKWK+8515hhshV1IAAAAAAAAw/HApAAAAAAAAGJaQEAIAAAAAAAxTSAgBAAAAAACGKSSEAAAAAAAAwxQSQgAAAAAAgGEKCSEAAAAAAMAwhYQQAAAAAABgmEJCCAAAAAAAMEwhIQQAAAAAABimkBACAAAAAAAMU0gIAQAAAAAAhikkhAAAAAAAAMMUEkIAAAAAAIBhCgkhAAAAAADAMIWEEAAAAAAAYJhCQggAAAAAADBMISEEAAAAAAAYppAQAgAAAAAADFNICAEAAAAAAIYpJIQAAAAAAADDFBJCAAAAAACAYQoJIQAAAAAAwDCFhBAAAAAAAGCYQkIIAAAAAAAwTCEhBAAAAAAAGKaQEAIAAAAAAAxTbApgkBCkPbKlUl1fr67c83y2hPw99tEtF8if9ZXbnsoWUNAbLCgAAAAAuEb9VyEUpD2waccr06T+Pxz5Ly5d+16Zs9Orj2za8VL7q8/PX7uxsv1VSdqCVWuXz8xOT0tPU0mFlEOrrlOXHdz4xhtbinSBMXJf3LH10XTy1tI3Vq18tdDc0+dqtz08/+nduvYXYrIXrFq1fGYmmWy6QuowqSsrKyoKd2/etO1QpZnqT12+ew/UH61c+EJ+/37mdZFkv7hjB7M8L8Nx7IX5D2zqWEvQV5KZr+z6+EFV7yOYjj2//IGNA7toBYl5ax9dkFi5/Y3Nx3XX90mCxKnL1q5amJ2ZTnYlBdk/TVpdXWn+lvf+tulQHbYPAAAAgJA2QJeMCicumJa2saw9IxQkTpuZ2VO+JIiZ+ujf3/jtLEWXdytU
@yongkangc
yongkangc / multiproof-chunk-sweep.md
Last active February 16, 2026 09:07
Multiproof chunk size benchmark sweep — 8 chunks × 4 gas levels (reth, 2026-02-16)

Multiproof Chunk Size Benchmark Sweep

Tested 8 chunk sizes (15, 30, 60, 75, 100, 120, 160, 240) across 4 gas levels (10M, 20M, 30M, 40M).

  • Branch: yk/storage-tries-prune-retain
  • Unwind target block: 24463558
  • Binary: /home/ubuntu/reth/target/maxperf-symbols/reth
  • Machine: dev-yk
  • Date: 2026-02-16
  • Method: warmup pass (discarded) + measured pass per chunk/gas combo
@yongkangc
yongkangc / chunk-size-benchmark-report.md
Created February 16, 2026 06:00
Reth multiproof chunk size benchmark - 10M gas blocks

Multiproof Chunk Size Benchmark Report

Date: 2026-02-16
Commit: f5cf90227b (reth main)
Machine: dev box, 7.8TB NVMe, multi-core
Payload: 345 blocks × ~10M gas each (blocks 24,463,559–24,463,903), gas_limit=60M
Method: reth-bench replay-payloads with --wait-for-persistence --wait-time 400ms

What was tested

@yongkangc
yongkangc / combined_latency.csv
Last active February 16, 2026 13:36
Reth Performance Report — ~10M gas blocks on main (f5cf90227b) — 2026-02-16
block_number gas_limit transaction_count gas_used new_payload_latency fcu_latency total_latency
24463559 60000000 107 9987577 56314 845 57159
24463560 60000000 87 9535441 43001 543 43545
24463561 60000000 158 12258901 34336 522 34858
24463562 60000000 130 17195237 46739 585 47325
24463563 60000000 175 13121861 37485 568 38054
24463564 60000000 143 11837246 26856 596 27453
24463565 60000000 88 13155120 46409 624 47033
24463566 60000000 84 11933465 20521 501 21022
24463567 60000000 73 14555041 37554 571 38125
@yongkangc
yongkangc / FINAL_REPORT.md
Last active February 2, 2026 09:12
RocksDB Parameter Tuning Results for Reth

RocksDB Parameter Tuning - 3-Run Average Results

Executive Summary

After running each configuration 3 times for statistical significance, the baseline configuration performs best for this workload. The tuned configurations show regressions, not improvements.

Performance Summary (3-run average)

Config Ggas/s p50 (ms) p90 (ms) p99 (ms)
@yongkangc
yongkangc / market-maker-spread.md
Created January 30, 2026 12:00
Market Maker Spread Tightening Diagram

Market Maker Spread Tightening

flowchart LR
    subgraph before["Before MM Enters"]
        direction TB
        B1["Best Bid: $0.45"]
        A1["Best Ask: $0.70"]
        S1["Spread: $0.25 (25%)"]
 end
@yongkangc
yongkangc / sweep_report_2h.md
Last active January 30, 2026 10:55
pm-replay parameter sweep results - 100 runs across min_edge_bps, volatility, blend_weight

Parameter Sweep Report - 2 Hour Backtest

Date: 2026-01-30
Time Window: Last 2 hours
Total Runs: 100

Key Findings

All Runs Unprofitable

  • P&L Range: -$112.63 to -$82.21
@yongkangc
yongkangc / reth-trie-guide.md
Created January 28, 2026 07:36
Reth Sparse Trie Guide - Understanding Ethereum's Merkle Patricia Trie
@yongkangc
yongkangc / fill_logic.md
Created January 27, 2026 16:15
pm-mm-rs Paper Trading Fill Logic

Paper Trading Fill Logic - pm-mm-rs

Overview

The paper trading system simulates realistic order fills using PaperVenue which wraps MockVenue. Fills are triggered when real-time Polymarket book updates cross resting order prices.

Two Fill Types

1. Aggressive Fills (Crossing the Spread)

@yongkangc
yongkangc / prune-parallelism-analysis.md
Created January 27, 2026 08:06
ParallelSparseTrie::prune() parallelism analysis - rayon overhead makes parallel path always slower

ParallelSparseTrie::prune() Parallelism Analysis

Summary

Benchmarking revealed that rayon parallelism in ParallelSparseTrie::prune() causes significant overhead without any performance benefit. The parallel path is always slower than serial, even at the maximum of 256 lower subtries.

Benchmark Results

Serial vs Parallel (forced paths)