← Akuna Capital Interview Insights
This was a lot to hold in your head at once.
Start by clarifying requirements and assumptions, then outline the class design with key components: state machine, price calculation, and order management. Walk through the implementation logic step-by-step, emphasizing how each constraint is enforced and potential edge cases.
Pro tip: Emphasize the importance of a robust state machine to prevent race conditions and ensure thread safety, as this is critical in low-latency trading systems. Also, discuss how you would test the class, including unit tests for price alignment and offset enforcement.
Ask clarifying questions about the BBO market, tick size, theoretical price source, and concurrency requirements. State any assumptions you make.
Define the public methods (e.g., quote, onOrderUpdate) and internal components: per-side state machine, price calculator, and order tracker.
Detail how to compute quote prices: apply minimum offset from theoretical price, align to tick size, and adjust to avoid crossing the BBO.
Describe the per-side state machine (e.g., IDLE, PENDING_NEW, ACTIVE, PENDING_DELETE) and how it prevents overlapping in-flight orders.
Mention handling of partial fills, order rejections, and market data updates. Outline a testing strategy to validate constraints.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.