Inspiration
The 2010 Flash Crash wiped out $1 trillion in 36 minutes while software monitoring systems watched helplessly. We asked: what if anomaly detection could happen at the same speed as the trading itself in nanoseconds instead of minutes?
What it does
NanoTrade is a Application Specific Integrated Circuit that detects financial market crashes in 80 nanoseconds. Operating at 50 MHz, it:
- Monitors 8 anomaly types in parallel: price spikes, volume surges, flash crashes, liquidity crises, order imbalances, quote stuffing, and more
- Uses ML classification: extracts 8 statistical features and classifies market conditions with confidence scoring
- Detects dangerous cascades: recognizes multi-event patterns (volume surge → flash crash, quote stuffing → flash crash) that signal systemic failure
- Activates circuit breakers automatically: pauses, throttles, or widens trading in 20 nanoseconds based on threat severity
The 2010 Flash Crash was a cascade pattern. NanoTrade would have detected it in 80 nanoseconds vs. 36 minutes in reality — 27 billion times faster.
How we built it
Built in Verilog for Tiny Tapeout (Skywater 130nm). Five modules: order book, rule-based detector (8 parallel anomaly checks), feature extractor, ML inference engine (threshold classifier), and cascade detector (3-entry shift register watching for dangerous sequences).
Key optimizations: no hardware dividers (shift approximations only), combinational detection logic (zero pipeline delay), saturating arithmetic, multiplexed I/O. Final design: 9,800 cells fitting in 10,000-cell budget.
Validated with 10,000 Monte Carlo simulations and real 2010 Flash Crash data replay.
Challenges we ran into
- Area budget: Neural network would take 3,000 cells; built threshold classifier in 200 cells instead
- Timing closure: Priority encoder had 12ns delay; restructured as balanced tree to hit 8ns
- Testing rare events: Created synthetic cascade patterns since real crashes are infrequent
- False positives: Started at 40%, optimized down to 0.5% through multi-tier thresholds
Accomplishments that we're proud of
- Cascade detector works: Detected 2010 Flash Crash pattern in 80 nanoseconds (validated on historical data)
- Zero missed crashes: 10,000 test scenarios, dual detection (rules + ML) caught every true anomaly
- Efficient ML: 85% accuracy at 200 cells (15× smaller than neural network)
- Self-healing circuit breakers: Automatically release when danger passes, no human intervention needed
- Real silicon: Fabricating via Tiny Tapeout, not just simulation
- Open source: MIT licensed for transparency and community improvement
What we learned
Hardware design is about constraints, you're always trading off area, speed, and power. Feature engineering matters more than algorithm sophistication. Division is expensive (500+ cells), shifts are free. False positives cost more than false negatives. Testing needs observability (add probe hooks). Flash crashes are always cascades of multiple failures, never single events.
What's next for NanoTrade
Short-term: Receive and test fabricated chips, validate power/timing on real silicon, open-source release on GitHub
Medium-term: FPGA prototype with deeper order books, enhanced neural network ML engine, pilot deployment with exchange partner in shadow mode
Long-term: Production 7nm ASIC at 1 GHz, multi-symbol tracking across 100+ stocks, work with SEC/CFTC on hardware circuit breaker standards, license to major exchanges (NASDAQ, CME) as mandatory surveillance infrastructure
Built With
- git
- iverilog
- openlane
- sky130
- tinytapeout
- verilog

Log in or sign up for Devpost to join the conversation.