Course · DIY Perp
EXPERT440 min870 XP
Build OpenHL Liquidation — perpetual position liquidation engine
Build openhl liquidation: margin model with four states, scanner emitting close orders, insurance fund absorbing deficit. Pinned to byte-for-byte answer keys.
Source is the primary text
How this course works
This is a hands-on course, not a feed of articles. The lessons build on each other in order, so what you learn from the source carries over to real code.
Start the course →14 lessons · native player
Difficulty
EXPERT
Workload
440 minutes
Reward
870 XP
Types
Pure compute
- 01Lesson 4 — notional_value + unrealized_pnl — the signed-multiplication trick45 min · 80 XP
- 02Lesson 5 — account_equity + margin_ratio — and the proptest that breaks your first mental model60 min · 100 XP
- 03Lesson 6 — margin_health — the classification cascade and boundary semantics30 min · 60 XP
- 04Lesson 7 — close_order_spec — Stage 10a's last function20 min · 40 XP
Insurance fund
Scanner & capstone
- 01Lesson 11 — Scanner type vocabulary — CloseOutcomeKind, LiquidationRecord, ScanReport, LiquidationScanner25 min · 50 XP
- 02Lesson 12 — scan — the orchestration heart of the safety cascade35 min · 70 XP
- 03Lesson 13 — Scanner capstone — 6 nuanced unit tests + 4 invariant proptests + the Stage 10 retrospective40 min · 80 XP