Skip to main content
RaoufResearchOS
English
Sydney, AustraliaCurrent Sydney Time—
Press Escape to close this window.
NanoMatch

Engineering

NanoMatch

NanoMatch is a high-performance limit order book and matching engine built in modern C++20. It simulates a financial exchange's core operations, processing buy/sell orders with price-time priority matching at millions of operations per second.

  • C++20
  • CMake
  • Google Test
  • HFT
  • Systems Programming
Project IdentityStill

01 / Overview

Documented technology stack
  • 01C++20
  • 02CMake 3.20+
  • 03Google Test 1.17
  • 04GitHub Actions CI/CD
  • 05AddressSanitizer
  • 06UBSan

Problem

Financial exchanges require ultra-low-latency order matching. Understanding how matching engines work at the systems level demands building one from scratch with real performance constraints.

Solution Overview

  1. Implemented price-time priority (FIFO) matching with support for Limit, Market, IOC, and FOK orders
  2. Designed O(1) order cancellation and modification using hash map indexing
  3. Built a custom pool allocator to eliminate heap allocation overhead on the hot path
  4. Added multi-instrument support with independent order books per symbol

02 / Evidence

Proof & Verification

  • Throughput: 1M+ orders/second (single-thread, synthetic benchmark)
  • Comprehensive test suite with p50/p99 latency benchmarks
  • All 60+ unit tests across 18 test suites passed
  • CI: ASan, UBSan, cppcheck, clang-format on every push

03 / Methods

Build

Tech Stack

  • C++20
  • CMake 3.20+
  • Google Test 1.17
  • GitHub Actions CI/CD
  • AddressSanitizer
  • UBSan
  • Price-time priority (FIFO) matching algorithm
  • 4 order types: Limit, Market, IOC, Fill-or-Kill
  • O(1) order cancellation/modification via hash map
  • Custom pool allocator eliminating heap allocation overhead

Secure

  • AddressSanitizer and UndefinedBehaviorSanitizer in CI
  • 60+ unit tests across 18 test suites
  • cppcheck static analysis on every push
  • No external runtime dependencies

Search

Find a project, paper, write-up, or page.

30 / 41 · Search results

↑ ↓ Workspace NavigationEnter OpenEsc Close