Skip to main content

Layer 8 — Quote Construction & Arbitrage Validation

Direct Book Quote Construction

BID = Adjusted MID − ½ × Total Spread
ASK = Adjusted MID + ½ × Total Spread

Synthetic MYR-IDR Quote

Synthetic MYR/IDR = USD/IDR ÷ USD/MYR + cross spread add-on

Three-Layer Arbitrage Check

Every firm quote must pass all three checks before issuance. Any single failure escalates the corridor to RESTRICT.

CheckRuleFailure Meaning
1. Internal ConsistencyBID < Adjusted MID < ASKSpread construction has a logic error; instant arb against the protocol possible
2. Synthetic vs Direct GapGap between synthetic MYR-IDR (always computed) and direct oracle rate ≤ 0.30% in NORMAL, 0.50% in PROTECT. Synthetic rate is always computed for this check regardless of whether a direct feed is the pricing source.Counterparties can buy from Ratio synthetically and sell externally at a profit
3. Triangular Loop CheckUSD-IDR bid × MYR-IDR ask × (1 / USD-MYR ask) ≤ 1Circular arb path exists; counterparty can loop USD→IDR→MYR→USD and extract risk-free profit

Quote Controls

ControlDescription
expiry_timestampHard timestamp after which the quote cannot be executed
max_sizeMaximum notional the quote covers
allowed_directionBUY or SELL — reflects current state and inventory constraints
state_flagCurrent system state: NORMAL, PROTECT, or RESTRICT
tranche_idPopulated for split orders; identifies this quote as one tranche of a larger parent
rate_sourceMYR-IDR only. DIRECT or SYNTHETIC — always present for MYR-IDR quotes